Skip to content

Add protobuf converter for test files and generate pb versions#145

Draft
leoromanovsky wants to merge 5 commits intomainfrom
lr/add-protobuf-converter
Draft

Add protobuf converter for test files and generate pb versions#145
leoromanovsky wants to merge 5 commits intomainfrom
lr/add-protobuf-converter

Conversation

@leoromanovsky
Copy link
Member

No description provided.

leoromanovsky and others added 5 commits November 6, 2025 08:40
This test demonstrates that null is a valid JSON value that should be returned by SDKs when a JSON flag variation is explicitly set to null. This addresses the issue where checking `if (variant != null)` might incorrectly skip returning null values when null is a legitimate JSON response.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add comprehensive protobuf converter tool for JSON UFC files
- Support bulk conversion of all UFC files in ufc/ directory
- Add validation tool to verify protobuf binary integrity
- Include complete TypeScript DTOs and protobuf bindings
- Generate .pb test fixtures from existing JSON UFC files
- Achieve 76-82% compression ratio (JSON → protobuf)

Features:
- Auto-detect and convert valid UFC JSON files
- Skip non-UFC files (like bandit models) automatically
- Round-trip validation to ensure data integrity
- CLI tools for conversion and validation
- Generated protobuf binaries for SDK testing

Generated test data:
- flags-v1.pb (20KB from 85KB JSON, 76% compression)
- bandit-flags-v1.pb (2KB from 11KB JSON, 82% compression)

Usage:
- yarn convert:protobuf - Convert all UFC files
- yarn validate:protobuf - Validate protobuf binaries
🚀 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Removed json-null-value-flag from flags-v1.json
- Regenerated flags-v1.pb with updated data
- Related test case automatically removed

🚀 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant