Skip to content

fix(cliproxyapi): preserve recovery bodies and tool identity - #16137

Merged
diegosouzapw merged 1 commit into
release/v3.8.52from
fix/14629-cliproxyapi-recovery-1010
Oct 10, 2026
Merged

diegosouzapw merged 1 commit into
release/v3.8.52from
fix/14629-cliproxyapi-recovery-1010

Conversation

@diegosouzapw

Copy link
Copy Markdown
Owner

CLIProxyAPI could return the rejected original request body after a successful retry, lose private tool identity metadata while copying request bodies, and bypass known-field HTTP 400 recovery or repeat already learned reasoning rejections.

The executor now adopts the effective recovery body, composes the existing bounded field-downgrade helper, and applies observed reasoning limits on later requests. Body copies preserve tool-map descriptors; cloaking copies aliases without mutating the caller, and both private metadata channels remain excluded from every HTTP attempt. Shared recovery helpers remain unchanged.

Refs #14629

This is the CLIProxyAPI portion of the umbrella. NineRouter #16133, GLM #16135 and CommandCode #16136 are separate deliveries. Override-contract documentation and the preventive guard remain tracked; this PR does not automatically close the umbrella.

Validation

Three TDD stages on base 122b43b35dbacab03ea67d0f0b46e713280ccd86, each with an identical fixture hash within its failing/passing pair:

  • Effective body and private maps: 1 passing control / 5 failures, then 6/6 passed.
  • Direct and chained known-field 400: 6 controls / 4 failures, then 10/10 passed.
  • Learned capabilities: 10 controls / 5 failures, then 15/15 passed.

The final focused matrix passed 28/28. It exercises both CPA transports, real Responses translation into CPA and restoration of tool aliases/namespaces, caller immutability, retry bounds, provider/model separation, SSE, signal, headers and credential attribution.

All 37 importer/related files passed: 506/506 tests, with zero failures, skipped or cancelled cases. The 28 focused cases are included in this count. No full-repository suite or live CPA instance is claimed.

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.

Normal automatic commit hooks passed with all three hashes unchanged. Source/test, anti-masking and PR-evidence policies passed against the actual committed diff before publication. Hosted CI and merge remain pending.

The anti-masking gate emits one report-only similarity advisory for descriptor?.value instanceof Map. Review confirmed this is a positive shape assertion on the real executor/translator result, followed by descriptor, alias and round-trip assertions; it does not reimplement the copy helper. No suppression or policy change was added.

@github-actions

Copy link
Copy Markdown
Contributor

CI Coverage Report

  • Coverage job: skipped
  • PR test policy: success

Coverage artifact was not available for this run.

@diegosouzapw
diegosouzapw merged commit 189a0f8 into release/v3.8.52 Oct 10, 2026
30 of 56 checks passed
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