Replay hidden signed thinking metadata - #4307
Conversation
This stage-one follow-up makes Anthropic raw assistant metadata authoritative for historical signed thinking replay. The request builder now marks assistant turns with raw thinking or redacted thinking blocks for exact replay, preserving provider block ordering and signatures without requiring those opaque blocks to appear as displayed transcript text. Confidence: high Scope-risk: narrow Tested: deno task test:file extensions/ext-llm-anthropic/src/anthropic-request-builder.test.ts; deno fmt --check extensions/ext-llm-anthropic/src/anthropic-request-builder.ts extensions/ext-llm-anthropic/src/anthropic-request-builder.test.ts Not-tested: full repository suite before CI
📦 Client bundle boundary
A server module in a client graph aborts hydration in the browser. New leaks fail CI; known leaks are tracked in |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
This stage-one follow-up makes Anthropic raw assistant metadata authoritative for historical signed thinking replay. The request builder now marks assistant turns with raw thinking or redacted thinking blocks for exact replay, preserving provider block ordering and signatures without requiring those opaque blocks to appear as displayed transcript text. Confidence: high Scope-risk: narrow Tested: deno task test:file extensions/ext-llm-anthropic/src/anthropic-request-builder.test.ts; deno fmt --check extensions/ext-llm-anthropic/src/anthropic-request-builder.ts extensions/ext-llm-anthropic/src/anthropic-request-builder.test.ts Not-tested: full repository suite before CI
|
You have reached your Codex usage limits for security reviews. Please try again later. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Greptile SummaryThis follow-up preserves hidden Anthropic thinking metadata during resumed assistant replay while retaining canonical visible content.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| extensions/ext-llm-anthropic/src/anthropic-request-builder.ts | Adds replay planning and reconstruction paths that preserve hidden signed-thinking blocks while emitting canonical assistant content. |
| extensions/ext-llm-anthropic/src/anthropic-request-builder.test.ts | Adds coverage for resumed hidden thinking, pause-turn boundaries, and split compacted provider history. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Historical assistant message] --> B{Raw Anthropic metadata?}
B -- No --> C[Emit canonical content]
B -- Yes --> D[Plan replay indices]
D --> E{Replay mode}
E -- Exact --> F[Validate and replay raw messages]
E -- Thinking only --> G[Validate raw history]
G --> H[Preserve thinking blocks]
H --> I[Insert canonical visible content]
E -- Validation only --> J[Validate provider tool state]
F --> K[Anthropic request messages]
I --> K
J --> C
C --> K
Reviews (8): Last reviewed commit: "refactor(anthropic): deduplicate thinkin..." | Re-trigger Greptile
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e33f38f7de
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
You have reached your Codex usage limits for security reviews. Please try again later. |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0d7fa92c23
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
You have reached your Codex usage limits for security reviews. Please try again later. |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a29f15fe1f
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
You have reached your Codex usage limits for security reviews. Please try again later. |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9e4d6f986e
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
@codex review |
|
You have reached your Codex usage limits for security reviews. Please try again later. |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1898e2f925
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
@codex review |
|
You have reached your Codex usage limits for security reviews. Please try again later. |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6fc6a03301
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
@codex review |
|
You have reached your Codex usage limits for security reviews. Please try again later. |
|
@codex review |
481e285 to
6d2f27c
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. Breezy! Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
|
Resolves the anthropic-request-builder.test.ts overlap with #4307: both the branch's checkpoint-shaped byte-exact replay test and main's hidden-thinking canonical-content tests are kept.



Summary
This is a narrow follow-up for https://github.com/veryfront/veryfront-issue-inbox/issues/522.
Anthropic raw assistant metadata now forces exact replay for hidden signed thinking and redacted-thinking blocks. This preserves provider block ordering and signatures without exposing opaque blocks as displayed transcript text.
Scope
thinkingandredacted_thinkingblocks while planning Anthropic raw assistant replay.Verification
deno task test:file extensions/ext-llm-anthropic/src/anthropic-request-builder.test.tsdeno fmt --check extensions/ext-llm-anthropic/src/anthropic-request-builder.ts extensions/ext-llm-anthropic/src/anthropic-request-builder.test.tsThis change is additive to stage 1. It does not enable provider replay checkpoint emission and does not claim API append/load support.