Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 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 |
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b69dfbfe48
ℹ️ 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".
| // Only one signature can ride the prompt, so take the last block that has | ||
| // one: that is the block the turn actually ended on. | ||
| const signature = blocks.filter(b => b.signature).at(-1)?.signature; | ||
| const block = blocks.findLast(b => Boolean(b.thinking || b.signature)); |
There was a problem hiding this comment.
Select the last block with reasoning text
When a valid thinking/signature pair is followed by a signature-only block, this predicate selects the latter even though it has no replayable text. Such blocks are valid internal input: src/responses/parser.ts creates them for an envelope containing sig but no plaintext. For a reasoning-only assistant turn, mapOneMessage then drops the entire turn because reasoning.thinking is absent; otherwise it emits an unusable detached signature and loses the earlier valid pair. Search for the last block with non-empty thinking, then carry that same block's signature, as the newly documented contract states.
AGENTS.md reference: src/AGENTS.md:L19-L19
Useful? React with 👍 / 👎.
|
✅ Deterministic PR hygiene checks passed. |
Motivation
thinkingblocks while independently picking the last available signature, which could pair a block's text with a different block's signature and produce an invalid replay to Cognition.Description
assistantThinkinginsrc/adapters/devin.tsto select the final non-empty thinking block as a unit and emit itsthinkingandsignaturetogether instead of concatenating all texts and independently choosing a signature.tests/providers/devin-hardening.test.tsthat verifies multiple independently-signed thinking blocks keep the final block's text/signature pair and that an unsigned final block does not inherit a prior signature.structure/docs (adapters/registry.md,data-planes/inbound-compat.md,providers/*,transports/*,runtime.md) to record the adapter's single-pair Devin replay contract and the intended behavior.Testing
bun test tests/providers/devin-hardening.test.ts --timeout 20000which passed (35 tests, 0 failed).bun run structure:checkwhich passed (structure SSOT checks passed).bun run typecheckwhich completed successfully.bun run test; the run produced many passing tests but also surfaced unrelated environment/shared-state failures (process-group and probe fixtures, forbidden proxy env, and some management-route 403s) that are not caused by this focused change.Codex Task