Repository navigation
fix(qa): count Code Mode nested tool activity as transcript tool evidence - #155976
Conversation
…ence Since #155614 made an absent tools.codeMode behave as "auto", preferred models run the runtime-tool fixtures through Code Mode in the OpenClaw runtime. The product persists the nested target call as an openclaw.nested-tool.v1 transcript row, but the QA transcript summary only counted direct toolResult rows, so waitForPersistedTranscriptToolEvidence timed out for web_fetch, web_search, session_status and sessions_spawn even though the work was done and persisted.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs changes before merge. Reviewed September 22, 2026, 6:04 PM ET / 22:04 UTC. ClawSweeper reviewWhat this changesUpdates QA Lab’s transcript reader to count completed nested Code Mode tools and adds regression coverage for successful and failed calls. Merge readiness⛔ Needs changes before merge - 1 item remains This remains a useful QA repair: current main still misses the persisted evidence, and the related merged fix addresses a different assertion. No introduced correctness defect was found; the maintainer-authored PR remains protected from cleanup. Priority: P2 Review scores
Verification
How this fits togetherQA Lab reads persisted agent transcripts to verify that scenario tools actually completed. Its summary feeds the checks that decide whether runtime validation passes or times out. flowchart LR
A[Agent executes tools] --> B[Persisted transcript]
B --> C[Direct tool results]
B --> D[Nested tool activity]
C --> E[QA transcript summary]
D --> E
E --> F[Completion and success checks]
F --> G[Scenario passes or times out]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +22, Tests +60. Total +82 across 2 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep one QA transcript summary that recognizes both direct results and OpenClaw’s existing nested terminal activity while preserving failure and duplicate-result checks. Do we have a high-confidence way to reproduce the issue? Yes, from source: a persisted custom nested-tool result is skipped by current main, so the runtime scenario's target-tool completion check cannot succeed. The body reports this failure, but no runtime reproduction was executed during this review. Is this the best way to solve the issue? Yes. Adapting the existing QA reader to the canonical terminal activity format fixes the observation error without changing product execution, transcript storage, or scenario timeouts. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 2299989bf447. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
* commit '7d7f977ccfc1ac177526232e4f4960febd010015': (91 commits) test: avoid unused target setup in package profile fixtures (#155972) fix(worktrees): batch snapshot metadata reads test(plugin-state): distinguish borrowed and foreign lifecycle owners refactor(agents): share external harness session and attempt machinery (#152181) chore(i18n): refresh native locales (#156006) chore(test): retain Doctor fixture settlement diagnostics (#155944) perf(codex): reuse unchanged inference request bytes (#155987) perf(test): prepare snapshot ownership subprocess imports (#155973) perf(test): consolidate channel registry coverage (#155014) fix(runtime): preserve Node worker dependencies and cleanup diagnostics (#155292) perf(test): prepare worktree GC child runtime (#155928) fix(ui): open browser cards after delayed panel renders (#153253) fix(update): retain the running updater by hard link instead of copying the package (#155977) feat(decisions): add explicit evaluation and Labs opt-in foundation (#155134) fix(state): preserve lifecycle custody across worker dispatch improve: reuse shared tooling fixtures and defer legacy updater proof (#155731) improve(ui): reduce real-Gateway test preparation (#155979) perf(state): move session RPC SQL off the Gateway main thread (#155740) docs(freebsd): explain native Codex runtime limits (#155980) fix(qa): count Code Mode nested tool activity as transcript tool evidence (#155976) ...
…ence (#155976) ## Summary Unblocks the 2026.9.6 Full Release Validation runtime-pair core lane: `runtime-tool-{web-fetch,web-search,session-status,sessions-spawn}` failed in the OpenClaw cell with `timed out after 5000ms waiting for persisted <tool> transcript evidence` (runs 35742760135, 35760444831, 35775979903, and locally). ## Root cause Not a product regression; transcripts are persisted. #155614 made an absent `tools.codeMode` behave as `"auto"`, so `openai/gpt-5.6-luna` (catalog `codeMode: "preferred"`) now runs these fixtures through Code Mode in the OpenClaw runtime. The mock provider correctly wraps the planned `web_fetch` call in a guest `exec` (`qa-code-mode-target:` marker), the product executes it, and the session transcript records: - the assistant `exec` tool call and its `toolResult` (`{"status":"completed", "value": {...web_fetch result...}}`), and - a `custom` row `openclaw.nested-tool.v1` whose `details` name the nested `web_fetch` call (`toolCallId`, `toolName`, `input`, `result`, `isError`). `summarizeSessionTranscriptEvents` (qa-lab) only counted `toolResult` rows correlated with assistant tool calls by name, so `completedToolCallCounts.web_fetch` stayed 0 and `waitForPersistedTranscriptToolEvidence` timed out even though the product had done the work. The Codex cell still calls `web_fetch` directly and passed, which is why the scenario read as "OpenClaw lost the transcript". Same family as #155811 (compaction-retry terminal evidence keyed on the exec surface). ## Fix - `extensions/qa-lab/src/suite-runtime-agent-session.ts`: Code Mode nested tool activity rows feed the same planned/completed/successful accounting as direct tool results, keyed on the nested `toolCallId`/`toolName`/`isError`/`timestamp`. - Unit test: nested `web_fetch` activity under an `exec` call counts one completed success and one completed failure, alongside the `exec` result itself. ## Proof - Repro on origin/main (`8e185919954`): `qa suite --provider-mode mock-openai --runtime-pair openclaw,codex --scenario runtime-tool-web-fetch` fails the openclaw cell with the 5s transcript-evidence timeout; the preserved agent DB shows 11 persisted transcript rows for the happy session including the nested `web_fetch` activity with a 200 result. - With this change: `qa suite --provider-mode mock-openai --concurrency 1 --model openai/gpt-5.6-luna --alt-model openai/gpt-5.6-luna-alt --runtime-pair openclaw,codex --scenario runtime-tool-web-fetch --scenario runtime-tool-web-search --scenario runtime-tool-session-status --scenario runtime-tool-sessions-spawn` passes 4/4 (openclaw cells: toolCalls=4/4/4/6, codex cells: toolCalls=2; drift step pass). - Unit: `suite-runtime-agent-session.test.ts` (new nested-tool case + existing), `suite-runtime-agent-process.test.ts` + `runtime-tool-fixture.test.ts` (100 passed).
…ence (openclaw#155976) ## Summary Unblocks the 2026.9.6 Full Release Validation runtime-pair core lane: `runtime-tool-{web-fetch,web-search,session-status,sessions-spawn}` failed in the OpenClaw cell with `timed out after 5000ms waiting for persisted <tool> transcript evidence` (runs 35742760135, 35760444831, 35775979903, and locally). ## Root cause Not a product regression; transcripts are persisted. openclaw#155614 made an absent `tools.codeMode` behave as `"auto"`, so `openai/gpt-5.6-luna` (catalog `codeMode: "preferred"`) now runs these fixtures through Code Mode in the OpenClaw runtime. The mock provider correctly wraps the planned `web_fetch` call in a guest `exec` (`qa-code-mode-target:` marker), the product executes it, and the session transcript records: - the assistant `exec` tool call and its `toolResult` (`{"status":"completed", "value": {...web_fetch result...}}`), and - a `custom` row `openclaw.nested-tool.v1` whose `details` name the nested `web_fetch` call (`toolCallId`, `toolName`, `input`, `result`, `isError`). `summarizeSessionTranscriptEvents` (qa-lab) only counted `toolResult` rows correlated with assistant tool calls by name, so `completedToolCallCounts.web_fetch` stayed 0 and `waitForPersistedTranscriptToolEvidence` timed out even though the product had done the work. The Codex cell still calls `web_fetch` directly and passed, which is why the scenario read as "OpenClaw lost the transcript". Same family as openclaw#155811 (compaction-retry terminal evidence keyed on the exec surface). ## Fix - `extensions/qa-lab/src/suite-runtime-agent-session.ts`: Code Mode nested tool activity rows feed the same planned/completed/successful accounting as direct tool results, keyed on the nested `toolCallId`/`toolName`/`isError`/`timestamp`. - Unit test: nested `web_fetch` activity under an `exec` call counts one completed success and one completed failure, alongside the `exec` result itself. ## Proof - Repro on origin/main (`9b0fb911a05`): `qa suite --provider-mode mock-openai --runtime-pair openclaw,codex --scenario runtime-tool-web-fetch` fails the openclaw cell with the 5s transcript-evidence timeout; the preserved agent DB shows 11 persisted transcript rows for the happy session including the nested `web_fetch` activity with a 200 result. - With this change: `qa suite --provider-mode mock-openai --concurrency 1 --model openai/gpt-5.6-luna --alt-model openai/gpt-5.6-luna-alt --runtime-pair openclaw,codex --scenario runtime-tool-web-fetch --scenario runtime-tool-web-search --scenario runtime-tool-session-status --scenario runtime-tool-sessions-spawn` passes 4/4 (openclaw cells: toolCalls=4/4/4/6, codex cells: toolCalls=2; drift step pass). - Unit: `suite-runtime-agent-session.test.ts` (new nested-tool case + existing), `suite-runtime-agent-process.test.ts` + `runtime-tool-fixture.test.ts` (100 passed).
Summary
Unblocks the 2026.9.6 Full Release Validation runtime-pair core lane:
runtime-tool-{web-fetch,web-search,session-status,sessions-spawn}failed in the OpenClaw cell withtimed out after 5000ms waiting for persisted <tool> transcript evidence(runs 35742760135, 35760444831, 35775979903, and locally).Root cause
Not a product regression; transcripts are persisted. #155614 made an absent
tools.codeModebehave as"auto", soopenai/gpt-5.6-luna(catalogcodeMode: "preferred") now runs these fixtures through Code Mode in the OpenClaw runtime. The mock provider correctly wraps the plannedweb_fetchcall in a guestexec(qa-code-mode-target:marker), the product executes it, and the session transcript records:exectool call and itstoolResult({"status":"completed", "value": {...web_fetch result...}}), andcustomrowopenclaw.nested-tool.v1whosedetailsname the nestedweb_fetchcall (toolCallId,toolName,input,result,isError).summarizeSessionTranscriptEvents(qa-lab) only countedtoolResultrows correlated with assistant tool calls by name, socompletedToolCallCounts.web_fetchstayed 0 andwaitForPersistedTranscriptToolEvidencetimed out even though the product had done the work. The Codex cell still callsweb_fetchdirectly and passed, which is why the scenario read as "OpenClaw lost the transcript".Same family as #155811 (compaction-retry terminal evidence keyed on the exec surface).
Fix
extensions/qa-lab/src/suite-runtime-agent-session.ts: Code Mode nested tool activity rows feed the same planned/completed/successful accounting as direct tool results, keyed on the nestedtoolCallId/toolName/isError/timestamp.web_fetchactivity under anexeccall counts one completed success and one completed failure, alongside theexecresult itself.Proof
8e185919954):qa suite --provider-mode mock-openai --runtime-pair openclaw,codex --scenario runtime-tool-web-fetchfails the openclaw cell with the 5s transcript-evidence timeout; the preserved agent DB shows 11 persisted transcript rows for the happy session including the nestedweb_fetchactivity with a 200 result.qa suite --provider-mode mock-openai --concurrency 1 --model openai/gpt-5.6-luna --alt-model openai/gpt-5.6-luna-alt --runtime-pair openclaw,codex --scenario runtime-tool-web-fetch --scenario runtime-tool-web-search --scenario runtime-tool-session-status --scenario runtime-tool-sessions-spawnpasses 4/4 (openclaw cells: toolCalls=4/4/4/6, codex cells: toolCalls=2; drift step pass).suite-runtime-agent-session.test.ts(new nested-tool case + existing),suite-runtime-agent-process.test.ts+runtime-tool-fixture.test.ts(100 passed).