Skip to content

Fix FixOpenAI for repeated well-known types, remove Taskfile - #38

Merged
birdayz merged 8 commits into
mainfrom
jb/fix-openai-repeated-wkt-and-remove-taskfile
Mar 13, 2026
Merged

birdayz merged 8 commits into
mainfrom
jb/fix-openai-repeated-wkt-and-remove-taskfile

Conversation

@birdayz

@birdayz birdayz commented Mar 13, 2026

Copy link
Copy Markdown
Contributor

What

Fix FixOpenAI to handle well-known types inside repeated fields. Remove Taskfile.yml/taskw in favor of just.

Why

FixOpenAI silently skipped string-encoded well-known types (Value, ListValue, Struct) when they appeared as elements of repeated fields. The repeated field handler only checked for map[string]any elements (regular nested messages), so the string-to-JSON conversion for WKTs never fired. Reported in #34.

The Taskfile was redundant -- all build/test commands now go through just after the Bazel migration.

Implementation details

Bug fix (pkg/runtime/fix.go): The IsList() branch now switches on the message full name before falling through to the default recursion. For WKT types, it deserializes string elements back to proper JSON -- same logic that already existed for singular fields.

Taskfile removal: Ported remaining useful targets (test-cover, conformancetest, integrationtest, install, lint, fmt) to the justfile. Updated all references in CLAUDE.md, README.md, integration/example READMEs, and the golden test error message.

References

Closes #34

birdayz added 2 commits March 13, 2026 11:20
FixOpenAI silently skipped string-encoded well-known types (Value,
ListValue, Struct) when they appeared as elements of repeated fields.
The repeated field handler only checked for map[string]any elements,
missing the string->JSON conversion entirely.

Also remove Taskfile.yml/taskw/.taskversion -- everything runs through
just now. Port remaining useful targets (test-cover, conformancetest,
integrationtest, install, lint, fmt) to the justfile.

Closes #34
Literal adaptation of the JSON from the bug report: repeated message
containing a map field that FixOpenAI previously failed to convert.
birdayz added 4 commits March 13, 2026 11:28
The conformance/integration Bazel targets are tagged manual, so
bazelisk test //... never ran them. Add a separate step that
explicitly invokes them with the API key secrets passed through.

Skipped on fork PRs where secrets aren't available.
The if-condition already skips fork PRs, but add an explicit runtime
check for empty secrets as a second safety net. GitHub itself never
populates secrets for fork workflows, so this is triple-layered.
Add --test_output=all --test_arg=-test.v so Bazel prints every
test function name instead of just package-level PASS/FAIL.
Add --test_summary=detailed and --test_arg=-test.v to .bazelrc so
individual test cases show up in every bazelisk test run, locally
and in CI, without per-command flags.
@birdayz
birdayz force-pushed the jb/fix-openai-repeated-wkt-and-remove-taskfile branch from c76fd85 to 5648fad Compare March 13, 2026 11:14
birdayz added 2 commits March 13, 2026 12:15
Show individual test case names in CI output while keeping short
summary locally.
rules_go generates test.xml (JUnit) automatically, which is what
--test_summary=detailed parses. The -test.v flag only controls raw
stdout verbosity -- irrelevant when --test_output=errors suppresses
it anyway.
@gousteris
gousteris requested a review from a team March 13, 2026 11:38
@birdayz
birdayz merged commit a1ab020 into main Mar 13, 2026
1 check passed
@birdayz
birdayz deleted the jb/fix-openai-repeated-wkt-and-remove-taskfile branch March 13, 2026 21:32
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.

Does runtime.FixOpenAI not support lists

2 participants