Skip to content

fix(qa): count Codex retries for the dropped tool-call batch - #205135

Merged
RomneyDa merged 2 commits into
mainfrom
openclaw/fp1110-qa-cohort
Nov 25, 2026
Merged

RomneyDa merged 2 commits into
mainfrom
openclaw/fp1110-qa-cohort

Conversation

@tideclaw-bot

Copy link
Copy Markdown
Collaborator

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 51563a98836bfa9c60398a58342226f0a63c8835 from candidate 6ea542fd97e2876aa4c871ccc494ed5419a03c5c without 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

  • Running the exact fixture accounting block against synthetic requests reproduced the bug on main (0 retries instead of 1 with unrelated outputs) and passed after the port. Cases also covered no prior failure, partial acknowledgment, carried-forward acknowledgment, and full acknowledgment.
  • Inspected pinned Codex rust-v0.169.0 (d32063f96c2d), including call-ID-bearing shell results in codex-rs/core/src/tools/context.rs and full versus incremental input in codex-rs/core/src/client.rs.
  • Targeted TypeScript check, focused Oxlint, Oxfmt, and git diff --check passed. Type-aware lint preparation did not complete locally.
  • Real Gateway E2E remains unverified. Isolated local attempts stopped during managed-artifact/worker preparation; the baseline attempt took 11 seconds and never reached a test assertion. A separate run of the suite’s exact workspace-write sandbox probe with the pinned CLI returned 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

tideclaw-bot and others added 2 commits November 25, 2026 06:25
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
@clawsweeper

clawsweeper Bot commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@tideclaw-bot

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 25, 2026
@clawsweeper

clawsweeper Bot commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This 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.

  • Before: The fixture records 0 unacknowledged retries and can fail its retry assertion.
  • After: The fixture records 1 unacknowledged retry because all 20 measured calls remain pending.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The patch is focused and source-correct; validation confidence is limited to reported synthetic cases and static checks because the changed pressure suite did not complete.
Proof confidence 🦐 gold shrimp (3/6) This test-only change needs no shipped-entry-point proof; supplied validation covers synthetic accounting cases and static checks, while the full Gateway pressure suite remains unverified.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
User problem: QA can falsely reject a successful retry because an unrelated tool output is mistaken for acknowledgment of the measured batch.
Reason: The maintainer-authored direction repairs a demonstrated false-failure condition with a narrowly scoped fixture change.

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: 4c0ba5d9ccaab5f248f3850fd706617b680110fc

Before merge

None.

Findings

None.

Agent review details

How this fits together

The 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]
Loading

Technical review

Best 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

  • Dropped-response retry accounting keeps the original intent (961f5c0: The earlier repair replaced issuance tracking with exact call-ID acknowledgments, retained a dropped-response scenario, and required a retry before execution.)

Testing

Proof path: unit tests only.

Security

None.

Evidence

What I checked:

Likely related people:

  • Dallin Romney: Raw commit 961f5c0 adds extensions/qa-lab/src/codex-native-hook-pressure.e2e.test.ts:274 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 961f5c0b7099; files: extensions/qa-lab/src/codex-native-hook-pressure.e2e.test.ts)
  • Peter Steinberger: Raw commit 754f467 adds extensions/qa-lab/src/codex-native-hook-pressure.e2e.test.ts:186 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 754f467deabc; files: extensions/qa-lab/src/codex-native-hook-pressure.e2e.test.ts)
  • Vincent Koc: Raw commit 3a99779 adds extensions/qa-lab/src/codex-native-hook-pressure.e2e.test.ts:127 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 3a997793133c; files: extensions/qa-lab/src/codex-native-hook-pressure.e2e.test.ts)

PR surface

Tests +1. Total +1 across 1 file. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 4 3 +1
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 4 3 +1

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 25, 2026, 1:31 AM ET / 06:31 UTC.

@RomneyDa
RomneyDa merged commit 1cffd02 into main Nov 25, 2026
123 checks passed
@RomneyDa
RomneyDa deleted the openclaw/fp1110-qa-cohort branch November 25, 2026 07:06
tideclaw-bot added a commit that referenced this pull request Nov 25, 2026
* 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)
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 26, 2026
…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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extensions: qa-lab P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants