Repository navigation
fix(compiler): reject duplicate limits and named entries - #45
Merged
haseebahmed248 merged 2 commits intoSep 6, 2026
Merged
haseebahmed248 merged 2 commits into
haseebahmed248 merged 2 commits into
Conversation
Signed-off-by: omergungor11 <omergungor99@gmail.com>
haseebahmed248
previously approved these changes
Sep 6, 2026
Owner
There was a problem hiding this comment.
Thanks, this covers #38 cleanly. The checks and all 77 tests pass; I also verified that identical duplicates are rejected and malformed replacement values cannot hide the duplicate error. CI is green.
One merge detail: this and #44 both add to docs/DIAGNOSTICS.md and fixtures/diagnostics/manifest.json. After #44 merges, please update this branch, keeping both sets of additions, and rerun the checks.
Signed-off-by: omergungor11 <omergungor99@gmail.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
Repeated limit entries, named tool arguments and model context keys currently overwrite earlier values. For example, a second
tool_calls <= 1silently replaces an earlier zero-call limit. Reject the second occurrence at its name token before parsing or assigning the replacement value.Related issue
Closes #38
Changes
GS1101with the repeated key and its exact source range.Validation
npm run checknpm run check:generatednpm test— 116 tests passedAdditional validation:
npm run test:release(4 passed),npm run test:package. Tested on Node 22.22.3. The six new corpus fixtures produced 12 failing tests before the fix and all passed after it. No host effects or model providers were executed for these regressions.Risk and compatibility
Checklist
Signed-off-byline.Updated against upstream main after #44 merged, preserving both comparison and duplicate-entry diagnostics and corpus fixtures. All validation above was rerun on the combined tree. Implementation and test preparation were assisted by OpenAI Codex; the validation commands above were run against this patch.