Repository navigation
fix(qa): allow standalone utility completions after observing sessions - #158452
Conversation
Co-authored-by: RomneyDa <[email protected]>
|
🦞👀 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: blocked before merge. Reviewed September 25, 2026, 8:23 PM ET / September 26, 2026, 00:23 UTC (Revision 2). ClawSweeper reviewWhat this changesQA Lab’s mock provider now accepts three tool-free utility completion prompts after observing an agent session and adds HTTP regression cases for accepted and rejected requests. Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readiness⛔ Blocked before merge - 3 items remain Keep this PR open. The latest correction addresses the prior tool-output finding, but the session-isolation rule still admits history-bearing requests as standalone utility calls. Priority: P2 Review scores
Verification
How this fits togetherQA Lab’s mock provider receives model requests from OpenClaw test runs. Its session resolver selects isolated scenario state before the server returns a simulated model response. flowchart LR
A[QA test run] --> B[Mock provider request]
B --> C[Session observer]
C --> D[Session identity decision]
D --> E[Scenario state]
E --> F[Simulated response]
Before merge
Findings
Agent review detailsSecurityNone. PR surfaceSource +21, Tests +61. Total +82 across 3 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Copy recommended automerge instructionTechnical reviewBest possible solution: Accept the existing utility prompts only for history-free, tool-free completion inputs; require affinity for every conversation continuation. Do we have a high-confidence way to reproduce the issue? Yes, from source: observe a session, then send a Responses request with a utility instruction prefix, Is this the best way to solve the issue? No, as written. The exception should also establish that the input is a standalone utility turn before selecting anonymous state. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 08f3c02abd65. LabelsLabel changes:
Label justifications:
EvidenceAcceptance criteria:
What 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
HistoryReview history (1 earlier review cycle)
|
Keep the standalone utility exception free of function and custom tool outputs, including empty or earlier-history results. Reuse the canonical input predicate and cover missing versus admitted affinity at the registered HTTP boundary. Co-authored-by: RomneyDa <[email protected]>
|
Addressed the P2 utility-continuation finding. The sessionless exception now requires that the request contain no Responses function-call or custom-tool output items, using the existing input owner's predicate rather than a second type classification. This also excludes empty results and earlier tool history; a later user item cannot disguise session-bound state as a standalone utility completion. Three registered-server cases failed before the guard (HTTP200 instead of the required missing-affinity rejection). The corrected session-identity and Responses-input suites pass20/20. The new cases also verify that providing valid affinity admits the same requests. All three legitimate standalone utility contracts and interleaved session isolation still pass. This is boundary proof, not an additional live Gateway/FRV replay. Exact correction head: 3d55cd2. Full selected changed checks passed, including production/test types, lint, guards, dead exports, and runtime import-cycle checks. The two-file test command completed in 26.46 seconds wall (mostly cold worker compilation); the new HTTP cases took 7–9 ms each. A fresh bounded local independent review again produced no verdict (reviewer_unavailable/timeout), not a clean review. This correction is submitted for hosted CI and exact-head ClawSweeper review under the current publication instruction. No merge or validation-target change. @clawsweeper re-review |
|
🦞👀 Re-review progress:
|
openclaw#158452) * fix(qa): accept standalone utility completions after session observation Co-authored-by: RomneyDa <[email protected]> * fix(qa): reject sessionless tool-result continuations Keep the standalone utility exception free of function and custom tool outputs, including empty or earlier-history results. Reuse the canonical input predicate and cover missing versus admitted affinity at the registered HTTP boundary. Co-authored-by: RomneyDa <[email protected]> --------- Co-authored-by: roboclaw-bot <[email protected]> Co-authored-by: RomneyDa <[email protected]>
What Problem This Solves
Fixes: QA mock-provider runs reject standalone JSON and memory-dreaming completions after an agent session has been observed, even though those host-prepared utility calls intentionally carry no session affinity.
User Impact
No shipped user-facing behavior changes. QA can exercise the utility completion and dreaming flows without assigning utility calls to an unrelated conversation. Agent calls still require transport identity after session observation; quoted utility text and tool-enabled requests do not bypass that requirement.
Why This Change Was Made
Recognize the three existing tool-free system-prompt contracts at the mock session-identity owner. Do not recover conversation identity from prompt text. The registered-server regression covers accepted utility calls and rejected quoted/tool-enabled lookalikes.
This narrowly scoped fix is submitted for hosted CI and ClawSweeper review at the maintainer's explicit request after the local independent reviewer became unavailable. It is not a merge or release request.
Evidence
Inspected the complete affected resolver and server tests, utility prompt producers, and current main. These changes are not already on main at
b74bd07a2fb073d04b1f2de3687513d495d26f11.Registered mock-server boundary reproduced red before the fix; corrected suite passed 11/11. Measured wall time: 31.58 s Vitest / 36.10 s wrapper, dominated by cold transform; the five new cases took 12–19 ms each.
Both original memory-dreaming Gateway E2E cases passed, 68.843 s and 64.168 s. These existing real-Gateway tests cover provenance and explicit workspace-owner routing; they are not new per-PR compositions.
Changed-file checks completed with 0 warnings and 0 errors;
git diff --checkpassed. Evidence was collected on base0e56c40dcf6with this exact patch and a separate, disjoint file-transfer test-inventory patch. This PR contains only the utility fix.Independent local review unavailable: required review was attempted but returned HTTP 403 / reviewer_unavailable, with no accepted findings. Manual source inspection is not a successful independent review. Hosted review is requested; no ready-for-release claim.
Broader validation remains incomplete: the combined seven-file run had four failures and nineteen skipped tests. OTEL and timeout exact E2Es were blocked by the packaged-artifact publication guard; a subagent recovery case also hit a QA-channel module-loading failure. These are disclosed gaps, not passing qualification. No full release validation was dispatched by this PR task.
Published-head CI is attached to
3292f40b736b25b54f978546b654b84fcc702fa8: CI run 36202744736, currently in progress. CI duration and outcome are pending. ClawSweeper acknowledged the PR; independent hosted review has not completed.Contributor credit: RomneyDa (commit co-author).
ClawSweeper finding addressed
Addressed the P2 utility-continuation finding. The sessionless exception now requires that the request contain no Responses function-call or custom-tool output items, using the existing input owner's predicate rather than a second type classification. This also excludes empty results and earlier tool history; a later user item cannot disguise session-bound state as a standalone utility completion.
Three registered-server cases failed before the guard (HTTP200 instead of the required missing-affinity rejection). The corrected session-identity and Responses-input suites pass20/20. The new cases also verify that providing valid affinity admits the same requests. All three legitimate standalone utility contracts and interleaved session isolation still pass. This is boundary proof, not an additional live Gateway/FRV replay.
Exact correction head: 3d55cd2. Full selected changed checks passed, including production/test types, lint, guards, dead exports, and runtime import-cycle checks. The two-file test command completed in 26.46 seconds wall (mostly cold worker compilation); the new HTTP cases took 7–9 ms each.
A fresh bounded local independent review again produced no verdict (reviewer_unavailable/timeout), not a clean review. This correction is submitted for hosted CI and exact-head ClawSweeper review under the current publication instruction. No merge or validation-target change.