Repository navigation
Conversation
Use visible unsent parent output to exercise direct completion fallback after #185388 and #185667 made ordinary parent silence optional. Preserve exact-once notices, child failure and side-effect facts, sanitization, private review, and restart assertions. Align the ACK fixture receipt and stale completion docs with the current contract.
|
🦞👀 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 SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex review: needs maintainer review before merge. What this changesThis PR uses visible unsent parent output to exercise completion fallback, updates the ACK receipt fixture, and aligns completion documentation. Example: Run subagent-empty-completion-recovery after the child performs its write and returns no result.
Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR: it repairs stale QA fixtures against the current completion contract while preserving delivery, sanitization, and restart assertions; no introduced defect was found. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherQA Lab drives an isolated Gateway with a scripted provider and QA channel, then checks native subagent outcomes, outbound messages, delivery receipts, and restart behavior. flowchart LR
A[QA scenario runner] --> B[Isolated Gateway]
B --> C[Native child run]
D[Mock provider] --> C
C --> E[Parent completion]
D --> E
E --> F[Existing direct fallback]
F --> G[QA channel capture]
Technical reviewBest possible solution: Retain this focused fixture repair and the existing runtime owners, with ordinary exact-head CI gates controlling landing. Do we have a high-confidence way to reproduce the issue? Source inspection confirms the stale empty-parent trigger and obsolete ACK receipt; the author reports baseline failures, but this read-only review ran no reproduction. Is this the best way to solve the issue? The patch repairs the fixture producer and receipt input while preserving the independent end-to-end assertions, making it the smallest complete fix. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 0f074a2ca7e3. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
PR surfaceSource 0, Tests +2, Docs 0, Other +2. Total +4 across 6 files. Added test files: 0. View PR surface stats
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 October 27, 2026, 7:31 AM ET / 11:31 UTC. |
Use visible unsent parent output to exercise direct completion fallback after openclaw#185388 and openclaw#185667 made ordinary parent silence optional. Preserve exact-once notices, child failure and side-effect facts, sanitization, private review, and restart assertions. Align the ACK fixture receipt and stale completion docs with the current contract.
Upstream openclaw#185388 is 1aba44b. The private-completion half was carried in "carry upstream openclaw#185388" earlier in this stack; this commit carries the rest, with the reply-expectation precedence of openclaw#185667 b3b0f1b and the QA fixture follow-up of openclaw#185840 fc06d3c. User-visible changes: - Removed notice. When a successful child's completion delivery was blocked (the requester settle failed, or delivery was suspended on expiry or permanent failure), the completion kernel queued a system event into the requester session, text "Subagent completion delivery is blocked: <reason> (run <runId>)", with the requester's origin as its delivery context. That event started another model turn in the parent session, and its reply went to the parent's conversation, so the user saw whatever the parent said about the blocked delivery (on 11.2 that turn once sent the child's raw result to Telegram). Nothing is queued now and no extra turn runs. The failure stays on the child run's delivery state (status failed or suspended, lastError = the reason), which subagents list/wait report as deliveryStatus and the parent's runtime context shows as delivery=failed/suspended on its next turn. - Public completions. A user-facing completion turn that ends with NO_REPLY or no text used to be retried once with a visible-answer continuation; if it stayed silent, core sent the child's raw result (or, for a failed child, "A delegated task failed before it could report a result. Please retry the task.") to the chat as a direct-message fallback. It now settles as delivered on the first silent turn, with no retry and no fallback send; the child result stays in the child session and the Subagents panel. A visible parent reply that was not delivered still uses the fallback. Explicit visible-reply obligations (requireVisibleReply) keep their required expectation and retries. Source: - subagent-announce-direct-response.ts: successful silent completion and settle turns return delivered before the fallback paths; the settle-only optional branch it replaces is removed. Kept from this branch: a terminal reply snapshot marked visible is not treated as silence. - subagent-announce-direct-delivery.ts: completion and settle inputs owe no reply unless requireVisibleReply is set (openclaw#185667's resolveCompletionInputReplyExpectation, inlined here); other completion producers stay required. - resolveCommandReplyExpectation (attempt-execution.helpers.ts): the subagent_announce/subagent_settle provenance default is optional for all completion inputs, not only private ones; an explicit producer expectation still wins (the openclaw#185667 precedence). - Completion kernel and store: the blocked-notice producer, its queue intent receipts (queueIds/queueReceipts), the post-commit scheduling and subagent-completion-queue-receipt.ts are removed. - Docs: announce.md and slash-command.md describe quiet settlement and the missing notice. Adaptations: - Classifier: the branch has no "result-required" expectation and its fallback block differs; the quiet-settle return is placed after the delivery-failure check as upstream, using this branch's payload facts. - Tests, rewritten on this branch's fixtures where upstream's files differ: the queue-receipt test now proves a failed settle commits without any system event and replays without a second write; the yielded-settle, direct-delivery and delivery settle cases take upstream's new expectations (silent successful turns settle; cases that need a missing reply now use unsent visible text); requester-wake expects no system events; the reply-policy table and CLI announce cases expect optional completion processing and keep explicit required rows. The product test now runs the user target too (NO_REPLY, empty and visible). Branch-only tests that pinned the old classifier: settle-dispatch's optional cohorts now settle once even when a child result was owed (the same change openclaw#185667 made to its settle-dispatch case); progress-draft's silent retries now model the runner's incomplete turn under a required expectation, so the wake still retries; restart-recovery's receipt tests now assert that replay classifies the bounded receipt like the original turn, and an empty legacy receipt settles without a visible final; the requester-wake e2e case whose woken requester accepts no next child now settles on that empty successful turn instead of retrying it. Not on this branch, so not carried: upstream's mailbox test, the settle-replay recovery harness, and the restart-sentinel blocked-notice case. - openclaw#185840: the qa-lab mock leaves visible parent text unsent for the visible terminal case, so the direct-fallback scenario still exercises fallback; its unit test and the scenario's descriptions follow. Its terminal-ack fixture and empty-completion-recovery wording are not carried (this branch's fixtures and wording differ). Upgrade: blocked-notice system events already queued by 11.1/11.2 stay in the session delivery queue and drain once through the generic session delivery runtime; nothing new is written. Proof (M4, Node 26.12.1, OPENCLAW_VITEST_RUNTIME=node, each file alone with --maxWorkers=1 unless noted): - Changed tests green: server.subagent-silent-completion.product 1 passed (6 cases, 14.4 s test, 35.9 s file), attempt-execution.cli 87, subagent-announce-delivery 137, yielded-settle 20, direct-delivery 35, queue-receipt 1, requester-wake 37, subagent-registry-lifecycle 249, qa-lab mock-openai server 115, agent-command-restart-recovery 33, requester-settle-dispatch 20, subagent-progress-draft 11, delivery-completion.recovery.integration 18. - Red-before (this commit's source files at the parent, tests kept): the product test fails 'user completion "NO_REPLY": expected 2 to be 1' (a retried silent public completion); attempt-execution.cli 20 failed | 67; yielded-settle 2 | 18; queue-receipt 1 failed (a system event is queued); requester-wake 8 | 29; mock-openai server 1 | 114. The delivery and direct-delivery fixture changes pass both ways. - Wider suites (continue-on-failure): src/agents/subagents, src/agents/command, the private-completion, restart-sentinel and product gateway tests, the 17 sessions tool tests, subagents tool and scope tests, commands-subagents, session-utils.subagent, requester-pause-authority, sessions.abort-completion-publication, sessions-send-child-coordination, agent-command-restart-recovery and the qa-lab scenario-catalog, coverage, smoke-plan, terminal-ack and mock tests: 251 files, 3675 passed, 1 skipped, 0 failed. - E2E: subagent-completion-blocked, gateway-restored-requester-settle, gateway-subagent-restart, subagent-requester-owner, announce format and the three registry e2e files pass (139 of 141 before the requester-wake adaptation; that file then 32 passed). gateway-completion-replay fails "expected 2 to be 1" (a second requester tool effect after a silent-stop nudge) both here and at the parent efa05c6, so it is not from this change. - Gates on this commit: check-line-cap-ratchet and check-test-mock-exports against v2026.11.2 exit 0; run-oxlint on the touched .ts files 0 errors; oxfmt --check exit 0; tsgo:core, tsgo:extensions, tsgo:test:src and tsgo:test:extensions exit 0. No config change, so config:docs:check was not needed.
Related: #185388, #185667
What Problem This Solves
Repairs the
subagent-empty-completion-recoveryandsubagent-completion-direct-fallbackQA smoke fixtures, which still used empty parent output to trigger direct delivery.User Impact
No runtime behavior changes. QA continues to prove exact-once failure notices and sanitized child-result delivery, plus no replay after restart, under the current completion contract.
Why This Change Was Made
These are stale fixture expectations after #185388, not a product regression. The documented announce contract allows ordinary parent completions to return empty text or
NO_REPLYand settle quietly. #185667 preserves explicit child-result obligations without making ordinary parent completion output required. Both commits are ancestors of the reported CI evidence build5efafd1f0de1.The mock now produces visible parent text without sending it. That exercises the existing direct-message fallback: successful children deliver their original sanitized result, while a failed empty child produces the canonical system notice. The child remains empty and failed, with exactly one successful write. All executable scenario assertions remain intact. The associated ACK fixture now uses the current automation-result receipt shape, and stale command documentation agrees with the announce contract.
Evidence
Current-main runtime:
712a32e5d7761a3d6c721747d975da2e316bae34. Built once withOPENCLAW_BUILD_PRIVATE_QA=1 pnpm build qaRuntime; base and candidate use that identical runtime through the real QA Lab runner, mock provider, and isolated local QA channel. Only the source mock fixture changes. The final rebase toff7ab0a379a1changes none of the QA Lab, scenario, or subagent owners exercised by this proof.public:visibletimeout after 60 seconds.82f654b8961b818716f5f8b5117a3404eff7c817: all four QA Smoke CI profiles, the full selected test/build/lint/ratchet checks, andopenclaw/ci-gatepassed. Profiles 2 and 4 include every sibling of the repaired scenarios. No CI rerun or gate exception was used.Production runtime LOC delta: 0. Mock dispatcher LOC delta: 0; this is a QA contract repair, not a performance change, so allocation/CPU microbenchmarks and Gateway load tests do not apply. No Team access or Testbox lease was used.
The initial packaged-candidate bootstrap did not reach scenario execution; it was stopped and replaced with QA Lab's standard source-checkout plugin staging. This setup attempt is not counted as product proof.