Repository navigation
fix(commandcode): preserve CLI envelope and compose field recovery - #16136
Merged
diegosouzapw merged 1 commit intoOct 10, 2026
Merged
Conversation
Contributor
CI Coverage Report
Coverage artifact was not available for this run. |
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.
CommandCode's CLI fallback passed its whole envelope to reasoning recovery, so a rejected field inside
paramswas not corrected. Its primary endpoint also returned known-field HTTP 400s without using the existing field-downgrade helper.The CLI now passes
paramsto recovery and rebuilds the complete original envelope for retry. The primary endpoint composes the bounded field helper after reasoning recovery. Both paths preserve the effective request body, headers, signal, tools and caller input; shared helpers and transport policy are unchanged.Refs #14629
This covers the CommandCode portion of the umbrella. NineRouter is covered by #16133 and GLM by #16135; CLIProxyAPI and override-contract/guard acceptance are tracked separately. This PR must not automatically close the umbrella.
Validation
Two TDD stages on base
122b43b35dbacab03ea67d0f0b46e713280ccd86, with an identical fixture hash within each failing/passing pair:The final matrix passed 26/26, including Chat/Responses/Claude, CLI 403/404 fallback, reasoning 400/422 versus field 400, learning across calls and model separation, caller immutability, tool restoration, useful SSE, bounded retries and abort.
The 39-file importer/related selection reported 411 runner entries: 410 passed and one suite-process wrapper failed, with no skipped/cancelled tests. All seven assertions in that legacy suite passed, but its intentional real-network-failure case caused three connection attempts blocked by the deny-all guard (exit86). The unchanged suite then passed 7/7 with one exact synthetic transport failure and zero network attempts. This complementary run and the 26 focused cases overlap the selection; they are not added to its count. The initial wrapper failure is retained as a harness limitation.
Core/dashboard typechecks, both complexity gates, focused ESLint/Prettier, file-size, changelog integrity and test discovery passed. Independent SPEC/Standards review found no blockers and verified excluded dependencies unchanged. Tests use synthetic state and intercepted transport; no live provider account was used.
Normal automatic commit hooks passed with all three file hashes unchanged. Source/test, anti-masking and PR-evidence policies passed against the actual committed diff before publication. Hosted CI and merge remain pending.