fix: use TitleCase for cancel endpoint path parameter title#2913
Merged
markphelps merged 1 commit intoschema-compare-harnessfrom Apr 7, 2026
Merged
fix: use TitleCase for cancel endpoint path parameter title#2913markphelps merged 1 commit intoschema-compare-harnessfrom
markphelps merged 1 commit intoschema-compare-harnessfrom
Conversation
The static schema generator was using TitleCaseSingle (which only uppercases the first character) instead of TitleCase (which splits on underscores) for the cancel endpoint path parameter. This produced "Prediction_id" instead of "Prediction Id", diverging from the Python runtime schema generator. Found by the test harness schema-compare command.
|
LGTM |
michaeldwan
approved these changes
Apr 7, 2026
github-merge-queue bot
pushed a commit
that referenced
this pull request
Apr 7, 2026
* feat: add schema-compare command to test harness Add a new `schema-compare` command that builds each model twice — once with COG_STATIC_SCHEMA=1 (Go tree-sitter) and once without (Python runtime) — then compares the resulting OpenAPI schemas for exact JSON equality. Differences are reported with a structured diff showing the exact JSON paths that diverge. Also add 7 local fixture models covering the full input type matrix: scalar types, optional types (PEP 604 + typing.Optional), list types, optional list types, constraints/choices, File/Path types, and structured BaseModel output. * feat(test-harness): add --cog-ref flag and parallel schema builds Add --cog-ref to build cog CLI + SDK wheel from any git ref (branch, tag, or commit SHA), enabling testing against main or feature branches without manual builds. When used, the SDK wheel is automatically built from the same ref and passed via COG_SDK_WHEEL. Also parallelize the static/runtime builds in schema-compare using ThreadPoolExecutor with distinct image tags, roughly halving wall-clock time per model. Extract _resolve_versions() helper to consolidate version resolution logic across all commands and produce clearer log output (no spurious PyPI lookups when --cog-ref provides a wheel). * fix: use TitleCase for cancel endpoint path parameter title (#2913) The static schema generator was using TitleCaseSingle (which only uppercases the first character) instead of TitleCase (which splits on underscores) for the cancel endpoint path parameter. This produced "Prediction_id" instead of "Prediction Id", diverging from the Python runtime schema generator. Found by the test harness schema-compare command. --------- Co-authored-by: Michael Dwan <code@michaeldwan.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
One-line fix for a schema mismatch between the static (Go) and runtime (Python) schema generators.
The bug
The static schema generator used
TitleCaseSinglefor the cancel endpoint's path parameter title, which only uppercases the first character:The Python runtime hardcodes the correct
"Prediction Id"title, so the two schemas diverged.The fix
pkg/schema/openapi.go:232— changeTitleCaseSingle(cancelParam)toTitleCase(cancelParam).Found by the test harness
schema-comparecommand.