chore: merge train 260821 — land #2281 (Claude Code thought-signature replay) - #2328
Merged
Conversation
Claude Code's Anthropic Messages path never received a reasoning-replay scope because it does not send the Codex parent-thread header. Derive one from the stable per-session prompt_cache_key (metadata.user_id) so Gemini/Antigravity thought signatures are remembered by call_id and survive history replay. Also read nested extra_content.google.thought_signature when parsing Google responses.
Adds regression coverage for the Anthropic Messages reasoning-replay scope and for reading nested extra_content.google.thought_signature from Google response parts.
…picSessionKeyFromParts Pre-merge blocker (a): the replay-scope assignment stored the raw prompt_cache_key, diverging from the affinity/session-key path. Normalize via anthropicSessionKeyFromParts so overlong keys are hashed and trimming matches; regression rows for the >128-char hash and whitespace-only no-op.
Contributor
|
✅ Deterministic PR hygiene checks passed. |
Contributor
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (6)
📝 WalkthroughWalkthroughThe change adds nested Google thought-signature handling and derives normalized Anthropic reasoning-replay scopes from eligible prompt cache keys. It adds regression tests and updates merge-train planning and triage records. ChangesReasoning replay updates
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant AnthropicRequest
participant handleResponses
participant anthropicSessionKeyFromParts
participant OcxParsedRequest
AnthropicRequest->>handleResponses: Send prompt_cache_key
handleResponses->>anthropicSessionKeyFromParts: Normalize eligible key
anthropicSessionKeyFromParts-->>handleResponses: Return normalized key or no key
handleResponses->>OcxParsedRequest: Set _reasoningReplayScope
Suggested reviewers: ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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
Sixth leg of the merge train: lands #2281 — fix: enable call_id thought-signature replay for Claude Code plus the pre-merge normalization fix.
Review chain:
anthropicSessionKeyFromPartsbefore scope assignment (trim + sha256-over-128 parity with the affinity path); overlong-hash and whitespace regression rows shipped — resolves theintake: hygiene-blockedlabelVerification
Checklist
Summary by CodeRabbit
Bug Fixes
Tests