Repository navigation
fix(qa): count Codex retries for the dropped tool-call batch - #205135
Conversation
Forward-port 51563a9 from 2026.11.10. Reuse the existing pending-call calculation so unrelated outputs do not hide a retry of the dropped cohort. Co-authored-by: RomneyDa <[email protected]> Co-authored-by: jalehman <[email protected]>
Worked on by: - @jalehman - @RomneyDa Co-authored-by: jalehman <[email protected]> Co-authored-by: RomneyDa <[email protected]> OpenClaw-Publication: 9c455b0b-9a48-48f3-9df9-e040b6fda636
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Codex review: needs maintainer review before merge. What this changesThis PR counts retries using acknowledgments for the dropped tool-call batch instead of checking whether any tool output exists. Example: After dropping 20 calls, a retry contains function_call_output for call_other_0 but none for the measured batch.
Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored PR fixes a concrete fixture-accounting error still present on main, preserves the pressure assertions, and introduces no actionable defect. Reviewed head: Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe QA fixture supplies deterministic provider responses to a real Gateway and Codex runtime, then checks retries, policy hooks, tool results, workspace files, health, and process cleanup. flowchart LR
A[Gateway chat request] --> B[Codex runtime]
B --> C[Mock provider fixture]
C --> D[Call ID acknowledgments]
D --> E[Pending calls and retry count]
E --> B
B --> F[Native tools and policy hooks]
F --> G[Pressure assertions]
Technical reviewBest possible solution: Use the existing pending-call IDs as the sole acknowledgment boundary for retry accounting while retaining all pressure assertions. Do we have a high-confidence way to reproduce the issue? Source establishes the failing input: an unrelated output makes outputs.length nonzero even when every measured call remains pending; the PR reports matching synthetic reproduction, but no tests were run during this read-only review. Is this the best way to solve the issue? This is the smallest complete fix: it aligns the counter with the existing replay owner without adding state, helpers, transport changes, or weaker assertions. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 50f5d88f656a. Provenance checked
TestingProof path: unit tests only. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceTests +1. Total +1 across 1 file. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 25, 2026, 1:31 AM ET / 06:31 UTC. |
* test(qa): count Codex retries by cohort acknowledgment Forward-port 51563a9 from 2026.11.10. Reuse the existing pending-call calculation so unrelated outputs do not hide a retry of the dropped cohort. Co-authored-by: RomneyDa <[email protected]> Co-authored-by: jalehman <[email protected]> * fix(qa): count Codex retries for the dropped tool-call batch Worked on by: - @jalehman - @RomneyDa Co-authored-by: jalehman <[email protected]> Co-authored-by: RomneyDa <[email protected]> OpenClaw-Publication: 9c455b0b-9a48-48f3-9df9-e040b6fda636 --------- Co-authored-by: RomneyDa <[email protected]> Co-authored-by: jalehman <[email protected]> (cherry picked from commit 1cffd02)
…w#205135) * test(qa): count Codex retries by cohort acknowledgment Forward-port 51563a9 from 2026.11.10. Reuse the existing pending-call calculation so unrelated outputs do not hide a retry of the dropped cohort. Co-authored-by: RomneyDa <[email protected]> Co-authored-by: jalehman <[email protected]> * fix(qa): count Codex retries for the dropped tool-call batch Worked on by: - @jalehman - @RomneyDa Co-authored-by: jalehman <[email protected]> Co-authored-by: RomneyDa <[email protected]> OpenClaw-Publication: 9c455b0b-9a48-48f3-9df9-e040b6fda636 --------- Co-authored-by: RomneyDa <[email protected]> Co-authored-by: jalehman <[email protected]>
What Problem This Solves
The Codex native-hook pressure test intentionally drops a batch of 20 tool calls and checks that Codex retries before any of those calls is acknowledged. An unrelated tool output in the request can make the fixture miss that retry and report a false failure.
User Impact
QA now distinguishes outputs from the measured batch from unrelated outputs. No production code, configuration, or timeout changes.
Why This Change Was Made
Forward-ports OpenClaw 2026.11.10 commit
51563a98836bfa9c60398a58342226f0a63c8835from candidate6ea542fd97e2876aa4c871ccc494ed5419a03c5cwithout changing the patch. The retry counter now uses the pending call IDs that already govern which calls are reissued. The retry, hook-count, health, and tool-effect assertions are unchanged.Evidence
0retries instead of1with unrelated outputs) and passed after the port. Cases also covered no prior failure, partial acknowledgment, carried-forward acknowledgment, and full acknowledgment.rust-v0.169.0(d32063f96c2d), including call-ID-bearing shell results incodex-rs/core/src/tools/context.rsand full versus incremental input incodex-rs/core/src/client.rs.git diff --checkpassed. Type-aware lint preparation did not complete locally.bwrap: loopback: Failed RTM_NEWADDR: Operation not permitted. No sandbox settings were relaxed; a sandbox-capable Linux runner is needed for live pressure evidence.Worked on by