Repository navigation
fix(responses): keep external task input a user turn in raw-body repairs (carry #6769) - #6795
Conversation
…air; scope compaction docs (#6764)
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. |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 29 minutes. View limit detailsLimit details: You’ve used all 10 included reviews currently available. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (13)
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 |
|
✅ Deterministic PR hygiene checks passed. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4544affcf3
ℹ️ 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".
| 3. Amend `tests/responses/external-task-input-repair.test.ts`: add a case where | ||
| `call_id: " "` external task input reaches the passthrough `buildRequest` and becomes the same | ||
| user message the parser produces, and a case where a real `call_id` with `id/name/namespace` | ||
| stays a tool output. |
There was a problem hiding this comment.
Align the plan with whitespace call-id handling
This plan instructs the next maintainer to promote an envelope with call_id: " " to a user message, but the committed implementation deliberately does the opposite: repairUnidentifiedToolOutputItems returns every nonempty string call ID unchanged, and the new regression test asserts that whitespace remains a tool result because Zod accepts it and strips the envelope metadata. Since this open roadmap also lists promotion as an acceptance criterion, following it would reintroduce the parser/raw-path mismatch that the final source change avoids; update the amendment, test instructions, and acceptance section to describe the behavior actually committed.
Useful? React with 👍 / 👎.
Summary
Maintainer carry of #6769 by @robin-bially, so the full CI can run on an
originbranch. Refs #6764.Codex submits an external task as a
function_call_outputthat hasid,nameandnamespacebut no pairingcall_id. The parser already reads that envelope as a user turn, but the raw-body repairs in the Responses passthrough (repairUnidentifiedToolOutputItems,repairOrphanedInputItems) wrapped it as[tool output for unknown call]. A routed compaction summarizer then read the authorized handover as a stray tool result.After this change both raw-body repairs emit a recognized envelope as a plain user message, using the parser's own recognizer (
externalTaskInputResponsesContentinsrc/responses/task-input.ts). Image detailoriginalmaps tohigh, as on translated routes. Ordinary orphaned outputs keep the existing marker.Maintainer changes on top of the contributor's three commits:
call_id, including whitespace, stays a tool result in both repairs. The request schema accepts a whitespacecall_idas afunction_call_outputand strips the envelope fields (src/responses/schema.ts), so the parsed path treats it as a tool result and the raw path now agrees. A regression test pins that parity againstparseRequest.docs-siteadapters reference and sub-agent guide,structure/providers/chat-compat.md) now say the mapping applies to passthrough and routed (portable) compaction; the direct native/responses/compactforward keeps its existing raw-body handling.devlog/_plan/261009_l3_compaction_responses/records the lane roadmap for this and two related carries.The issue also reports a Claude continuation picking an already completed task after a correct summary. Task selection after replay is not changed here, so this references #6764 rather than closing it.
Co-authored-by: Robin Bially 7304732+robin-bially@users.noreply.github.com
Verification
bun test tests/responses/external-task-input-repair.test.ts tests/responses/openai-responses-passthrough.test.ts tests/responses/responses-compaction-routing.test.ts tests/responses/responses-parser.test.ts tests/test-layout.test.ts tests/test-layout-tooling.test.ts: 432 pass, 0 fail.call_idregression test fails with the source fix reverted (1 fail) and passes with it.bun run typecheck,bun run structure:check,bun run privacy:scan: pass.tests/responses/openai-responses-passthrough.test.tsstays at its 4809-line cap;structure/providers/chat-compat.mdstays at 600 lines.bun run testsuite was not run locally (lane constraint: minimal local tests, several worktrees running in parallel on this machine). Exact-head hosted CI is the full-suite evidence.Checklist