Repository navigation
fix(qa): complete images when generation tool is unavailable - #116234
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 30, 2026, 12:53 AM ET / 04:53 UTC. ClawSweeper reviewWhat this changesThe PR makes the QA mock provider inspect the latest raw user turn for an internal completed-image carrier while preserving carrier-free prompt selection, with a regression test for an unavailable image-generation tool on the completion turn. Merge readiness⛔ Blocked until real behavior proof from a real setup is added - 4 items remain Keep this PR open for the normal protected-label maintainer review path. The supplied diff is narrowly targeted at QA mock completion handling and includes a focused regression, but a read-only shell failure prevented the required current-main, scoped-policy, history, and maintainer-note inspection needed for a high-confidence merge verdict. Priority: P3 Review scores
Verification
How this fits togetherQA Lab's mock OpenAI provider turns synthetic Responses API inputs into deterministic assistant output for release and channel scenarios. It must distinguish the visible user prompt used to choose a response from internal runtime completion events that tell the mock to return generated media instead of requesting another tool call. flowchart TD
A[QA scenario input] --> B[Mock OpenAI provider]
B --> C[Visible prompt selection]
B --> D[Latest raw user turn]
D --> E[Internal image completion detection]
E -->|completed media found| F[Return media completion]
E -->|no completion| G[Normal tool or message response]
F --> H[QA scenario result]
G --> H
Decision needed
Why: The Before merge
Agent review detailsSecurityNone. PR surfaceSource +1, Tests +26. Total +27 across 2 files. View PR surface stats
Review metricsNone. Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain the narrow raw-turn completion check, confirm its helper contract against sibling input parsing and historical-completion tests, then merge only after a maintainer accepts the proof and remaining CI for this exact head. Do we have a high-confidence way to reproduce the issue? Unclear for a live runtime reproduction; the supplied regression test models the reported path, so the QA mock behavior is source-reproducible but was not independently exercised in this review. Is this the best way to solve the issue? Unclear; separating latest raw completion-carrier detection from carrier-filtered prompt selection appears appropriately narrow, but the helper's full caller and sibling contract still needs direct inspection before calling it the best fix. AGENTS.md: unclear because the file could not be read completely. Codex review notes: model internal, reasoning high; reviewed against 5e1e70e423f1. 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.
|
* origin/main: (24 commits) fix(e2e): apply default service identity per flow (openclaw#116265) chore(android): record 2026.7.4 Play metadata fix(ci): accept one verified Telegram SUT launch (openclaw#116267) chore(android): prepare 2026.7.4 Play release fix(e2e): align service account state (openclaw#116254) refactor(qa): remove live-channel scenario registries and wrappers (openclaw#115752) fix(ci): let trusted Telegram QA stage runtime (openclaw#116252) fix(plugins): plugin install survives pnpm-only overrides (openclaw#116245) test(qa): recognize internal image completions (openclaw#116234) fix(test): review Codex runtime scan chunks (openclaw#116212) fix(systemd): clear start-limit latch before gateway start (openclaw#116178) fix(security): expose every executable call in plugin scans (openclaw#116222) chore(sdk): repin the API baseline after the resolver signature change test(e2e): delay the draft-proof final answer past the start gate fix(channels): resolve tool progress against the caller's stream mode fix(ci): satisfy docs formatting, lint, and the SDK API baseline test(e2e): add a progress-draft scenario to the mock provider docs(telegram): call out the changed default preview on upgrade refactor(channels): render the progress label as a block, not a line fix(channels): show tool lines under the progress status headline ...
What Problem This Solves
Fixes an issue where the QA mock provider could miss a completed background image generation when the runtime delivered that completion in its internal context carrier. The mock would then fall back to the earlier user prompt and try to call
image_generateagain even though that tool was unavailable on the completion turn.Why This Change Was Made
Completion recognition now reads only the latest raw user turn, which includes the internal runtime carrier, while ordinary prompt selection continues to skip that carrier. This keeps completion handling current-turn scoped and preserves the existing protection against replaying historical completion events.
User Impact
No production runtime behavior changes. Release and QA image-generation scenarios now finish reliably after an asynchronous completion instead of attempting an unavailable duplicate tool call.
Evidence
Blacksmith Testbox
tbx_01kyrnjx0n2yt3fjgxekkcxmw1:pnpm test extensions/qa-lab/src/providers/mock-openai/server.test.ts— 159/159 tests passed.Regression models the initial image tool call, its async-started output, the internal completion carrier, and a completion turn where only the message tool is available.
The after-fix mock-server completion turn produced no
image_generatefunction call and returned exactly:Existing historical-completion regression remains in the same focused suite.
Maintainer contract review confirmed
extractAllUserTexts(input).at(-1)includes the current internal carrier, whileextractLastUserText(input)deliberately retains the prior non-carrier prompt. Inspecting only the latest raw turn preserves the historical non-replay invariant.Autoreview: clean, no accepted or actionable findings.