Skip to content

fix(responses): preserve provider aliases alongside namespace identities - #12839

Merged
diegosouzapw merged 4 commits into
cheaper-inference:release/v3.8.51from
Pllutonyy:codex/antigravity-namespace-parity
Sep 29, 2026
Merged

diegosouzapw merged 4 commits into
cheaper-inference:release/v3.8.51from
Pllutonyy:codex/antigravity-namespace-parity

Conversation

@Pllutonyy

@Pllutonyy Pllutonyy commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Preserve both request-scoped tool metadata maps before stripping their transport side channels.
  • Responses pivots carry object-valued namespace identities plus string-valued provider aliases. The previous extraction preferred the namespace map and deleted the alias map; its recovery fallback could not recover strings from namespace objects.
  • Add extractRequestToolMetadata and use its captured alias ledger in chatCore, while retaining later provider-specific map precedence and legacy extraction behavior for other callers.
  • No sanitizer changes, guessed name mappings, auth changes, new provider or runtime feature flag.

Related Issues

Validation

  • Change type: routing / provider translation
  • Red-before-green: four new namespace/alias cases reproduced the loss before the fix; the namespace-only guard already passed.
  • Focused five-file suite: 30 passed; one additional parallel-MCP regression subsequently passed (31 distinct checks across those runs).
  • Scoped ESLint on both production files and the new test file.
  • Changed metadata helper coverage: 100% lines, branches and functions in the focused coverage run.
  • Live Responses SSE namespace/collision identity and tool-result continuation.
  • Native Codex CLI 0.153.3: real Graft freshness and OpenViking health calls completed, final exact marker returned, exit 0.
  • Full lint/CI/coverage matrix and production packaging.
  • Production changes include a regression test.
  • npm run typecheck:core: clean.
  • check:provider-consistency and check:provider-assets: pass.
  • git diff --check: clean.

Tests Added Or Updated

  • tests/unit/antigravity-responses-tool-metadata-roundtrip.test.ts exercises real request and response translators, the chatCore metadata-extraction helper, exact namespace/name restoration on added/done/completed events, genuine sanitizer collisions, four-turn replay without hash growth, alias-only and namespace-only requests, and parallel native MCP calls following reasoning.

Coverage Notes

  • The changed open-sse/handlers/chatCore/requestToolIdentity.ts reached 100% line/branch/function coverage. Live HTTP and native-client tests cover the new chatCore wiring; they do not replace the full cross-platform build/CI matrix.

Reviewer Notes

  • The live tests ran the isolated worktree's actual Next HTTP server in full profile on loopback, not a modified production deployment.
  • Model: antigravity/gemini-3.1-pro-low, explicitly present in the account's synced catalog. This is evidence for that route, not every Antigravity model or multi-account behavior.
  • Cleanup: temporary credentials inactive/cleared, child processes exited, test listeners closed. The running full build remains at 2265ce761f76b6c81e34515cc8483ca127d4b414.
  • This does not establish Claude Code continuation, multi-account/long-session parity or release readiness. Nothing was promoted.

@diegosouzapw

Copy link
Copy Markdown
Collaborator

This looks like the safer, more conservative half of the namespace/alias overlap with
#12928 — capturing both the alias ledger and the namespace-identity ledger before either
side channel is stripped, without introducing any name-guessing heuristics. The new
roundtrip test is thorough and exercises real translator code. Two asks before merge: add a
changelog fragment, and let's confirm merge order against #12928 (which touches a
different part of the same file) so the two don't fight each other. Queuing for a final
test run.

Pllutonyy and others added 3 commits September 15, 2026 17:59
Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
…red identities

Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
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.

2 participants