Repository navigation
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
Codex Review Summary: ✅ CompletedThis 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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cef1a23bd2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@clawsweeper re-review Please review final head |
|
🦞👀 Re-review progress:
|
|
Codex review: needs maintainer review before merge. What this changesThis PR records a visible notice when required private subagent completion delivery permanently fails. Example: A private child finishes, but its completion delivery to requester session failed-delivery-requester is permanently retired.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this is a useful maintainer-authored repair, the prior findings are addressed, and no new blocking code defect was identified. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe subagent completion owner settles delivery through the SQLite worker and records failure notices through the existing session transcript owner. flowchart TD
A[Child execution ends] --> B[Completion delivery owner]
B --> C[SQLite settlement]
C --> D[Permanent delivery failure]
D --> E[Session transcript owner]
E --> F[Original requester conversation]
Technical reviewBest possible solution: Use the existing completion and transcript owners to report permanent failures while preserving quiet successful processing and original requester identity. Do we have a high-confidence way to reproduce the issue? Current-main source permits silent store-retirement settlement, and the author reports matching red/green native SQLite regressions; this read-only review ran no target code. Is this the best way to solve the issue? The patch is a focused repair using existing owners, with shared cohort identity and no replacement queue, schema, or configuration option. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 09d322ab2048. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +98, Tests +212, Docs +3. Total +313 across 7 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Review metrics
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 HistoryReview history (2 earlier review cycles)
Reviewed November 14, 2026, 6:16 AM ET / 11:16 UTC (Revision 3). |
|
Addressed all three numbered items from the latest review on final head
Validation: 38 focused completion/expiry/mailbox tests passed; the final owner suite replay passed 21 tests. Final core typecheck, targeted lint and formatting passed. Final isolated Codex autoreview is scoped-clean. The unchanged sweeper characterization is retained because the requested investigation explicitly asks whether that exact diagnostic remains possible with a current requester row. It is identified as predicate proof, not a regression fixed by this PR. Earlier real Gateway restart probes passed unchanged main and did not recreate the historical lost-cohort transition; no claim of that missing reproduction is made. The visibility regression uses the actual delivery owner, native worker, persisted requester transcript, and replacement identity boundary. @clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Addressing the latest review's remaining item on final head
All three items from the previous review remain addressed by the unchanged production fix and native persistence regressions described in the earlier numbered response. Fresh exact-head CI is running at https://github.com/openclaw/openclaw/actions/runs/43588400098. @clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Merged via squash.
|
…198807) * fix(subagents): show required completion delivery failures * fix(subagents): preserve failure notice settlement boundaries * test(gateway): expect required completion failure notice
…es, steer races and expiry (#200649) ## What Problem This Solves A finished subagent's result could be lost even though the child did its work. Three paths dropped it on current `main`: - **Access-policy outage:** a temporary "Gateway access policy is unavailable; retry the operation." during requester settlement was recorded as a permanent delivery failure. The parent never received the result, even after the policy recovered. - **Steer race:** when a busy parent accepted the child's result by steering, and the delivery owner changed afterward, the run was recorded as intentional non-delivery. The parent had the result, but the record said it didn't. The run could later "expire" and send a misleading failure. - **Expiry:** a suspended required completion was discarded after seven days with no notice in the requester conversation. Only an operator log line recorded it. On one Gateway, the access-policy class alone accounted for 25 failed child results in a week. ## User Impact A temporary access-policy outage now only delays a child's result; it is delivered after the policy returns. A result steered into a busy parent is recorded as delivered. A required result that finally expires records the existing visible failure notice ("The child result couldn't be delivered to this conversation…") instead of disappearing silently. ## Why This Change Was Made Each fix is at the existing owner: - **Settle wake:** a policy-unavailable error now joins the existing "no delivery was admitted, retry" class, alongside database-busy and overloaded errors, instead of the permanent-failure path. - **Direct delivery:** an accepted, committed steer returns `delivered` before the delivery-owner check. Only an unconfirmed commit still depends on its owner. - **Seven-day discard:** this path now calls the same failure-notice writer that other permanent failures already use (#198807). Explicit stop, cancellation, requester deletion and real revocation are unchanged. ## Evidence - **Regressions** drive the real lifecycle, announce, completion and SQLite owners: `subagent-result-owed.{policy-outage,expiry-discard}.test.ts`, plus the updated `steering $outcome after $change` direct-delivery contract (accepted-steer rows fail on base). Each fails on the base commit and passes with the fix: - policy outage: recorded `failed` before, owed and then delivered after; - steer race: receipt not delivered before, `{delivered: true, path: "steered"}` after; - expiry: no notice before, exactly one visible notice after. - **Existing suites:** announce, settle, lifecycle, completion authority, store-replaced, steer-restart and yielded-run settlement all pass, 500+ tests. The `steering $outcome after $change` contract was updated: an accepted steer is now delivered after an owner change, and indeterminate steers keep the old outcome. - **End to end (source tier, `ocx src`):** an isolated Gateway with a stub model. A busy parent received its finished child's result through a steer into the same run, and `subagent_runs` recorded `delivered/delivered`. - **Not in this PR:** splitting settle batches that mix operator invocations (a separate fix with its own proof), and the session-store-switch suspension policy (#152828, unchanged). Co-authored-by: Ayaan Zaidi <[email protected]>
…es, steer races and expiry (openclaw#200649) ## What Problem This Solves A finished subagent's result could be lost even though the child did its work. Three paths dropped it on current `main`: - **Access-policy outage:** a temporary "Gateway access policy is unavailable; retry the operation." during requester settlement was recorded as a permanent delivery failure. The parent never received the result, even after the policy recovered. - **Steer race:** when a busy parent accepted the child's result by steering, and the delivery owner changed afterward, the run was recorded as intentional non-delivery. The parent had the result, but the record said it didn't. The run could later "expire" and send a misleading failure. - **Expiry:** a suspended required completion was discarded after seven days with no notice in the requester conversation. Only an operator log line recorded it. On one Gateway, the access-policy class alone accounted for 25 failed child results in a week. ## User Impact A temporary access-policy outage now only delays a child's result; it is delivered after the policy returns. A result steered into a busy parent is recorded as delivered. A required result that finally expires records the existing visible failure notice ("The child result couldn't be delivered to this conversation…") instead of disappearing silently. ## Why This Change Was Made Each fix is at the existing owner: - **Settle wake:** a policy-unavailable error now joins the existing "no delivery was admitted, retry" class, alongside database-busy and overloaded errors, instead of the permanent-failure path. - **Direct delivery:** an accepted, committed steer returns `delivered` before the delivery-owner check. Only an unconfirmed commit still depends on its owner. - **Seven-day discard:** this path now calls the same failure-notice writer that other permanent failures already use (openclaw#198807). Explicit stop, cancellation, requester deletion and real revocation are unchanged. ## Evidence - **Regressions** drive the real lifecycle, announce, completion and SQLite owners: `subagent-result-owed.{policy-outage,expiry-discard}.test.ts`, plus the updated `steering $outcome after $change` direct-delivery contract (accepted-steer rows fail on base). Each fails on the base commit and passes with the fix: - policy outage: recorded `failed` before, owed and then delivered after; - steer race: receipt not delivered before, `{delivered: true, path: "steered"}` after; - expiry: no notice before, exactly one visible notice after. - **Existing suites:** announce, settle, lifecycle, completion authority, store-replaced, steer-restart and yielded-run settlement all pass, 500+ tests. The `steering $outcome after $change` contract was updated: an accepted steer is now delivered after an owner change, and indeterminate steers keep the old outcome. - **End to end (source tier, `ocx src`):** an isolated Gateway with a stub model. A busy parent received its finished child's result through a steer into the same run, and `subagent_runs` recorded `delivered/delivered`. - **Not in this PR:** splitting settle batches that mix operator invocations (a separate fix with its own proof), and the session-store-switch suspension policy (openclaw#152828, unchanged). Co-authored-by: Ayaan Zaidi <[email protected]>
…es, steer races and expiry (#200649) ## What Problem This Solves A finished subagent's result could be lost even though the child did its work. Three paths dropped it on current `main`: - **Access-policy outage:** a temporary "Gateway access policy is unavailable; retry the operation." during requester settlement was recorded as a permanent delivery failure. The parent never received the result, even after the policy recovered. - **Steer race:** when a busy parent accepted the child's result by steering, and the delivery owner changed afterward, the run was recorded as intentional non-delivery. The parent had the result, but the record said it didn't. The run could later "expire" and send a misleading failure. - **Expiry:** a suspended required completion was discarded after seven days with no notice in the requester conversation. Only an operator log line recorded it. On one Gateway, the access-policy class alone accounted for 25 failed child results in a week. ## User Impact A temporary access-policy outage now only delays a child's result; it is delivered after the policy returns. A result steered into a busy parent is recorded as delivered. A required result that finally expires records the existing visible failure notice ("The child result couldn't be delivered to this conversation…") instead of disappearing silently. ## Why This Change Was Made Each fix is at the existing owner: - **Settle wake:** a policy-unavailable error now joins the existing "no delivery was admitted, retry" class, alongside database-busy and overloaded errors, instead of the permanent-failure path. - **Direct delivery:** an accepted, committed steer returns `delivered` before the delivery-owner check. Only an unconfirmed commit still depends on its owner. - **Seven-day discard:** this path now calls the same failure-notice writer that other permanent failures already use (#198807). Explicit stop, cancellation, requester deletion and real revocation are unchanged. ## Evidence - **Regressions** drive the real lifecycle, announce, completion and SQLite owners: `subagent-result-owed.{policy-outage,expiry-discard}.test.ts`, plus the updated `steering $outcome after $change` direct-delivery contract (accepted-steer rows fail on base). Each fails on the base commit and passes with the fix: - policy outage: recorded `failed` before, owed and then delivered after; - steer race: receipt not delivered before, `{delivered: true, path: "steered"}` after; - expiry: no notice before, exactly one visible notice after. - **Existing suites:** announce, settle, lifecycle, completion authority, store-replaced, steer-restart and yielded-run settlement all pass, 500+ tests. The `steering $outcome after $change` contract was updated: an accepted steer is now delivered after an owner change, and indeterminate steers keep the old outcome. - **End to end (source tier, `ocx src`):** an isolated Gateway with a stub model. A busy parent received its finished child's result through a steer into the same run, and `subagent_runs` recorded `delivered/delivered`. - **Not in this PR:** splitting settle batches that mix operator invocations (a separate fix with its own proof), and the session-store-switch suspension policy (#152828, unchanged). Co-authored-by: Ayaan Zaidi <[email protected]> (cherry picked from commit 3b61a7c) Companion audit: #200581 included; existing authority outage classifier and completion failure owner are present. Co-authored-by: RomneyDa <[email protected]> (cherry picked from commit eadbf05817ce8aa5dc0c0e8daf8594486dc7e581)
What Problem This Solves
Required child completions can end as a silent
intentional_non_deliverywhen their completion custody retires, leaving the requester unaware that delegated work failed.User Impact
A permanently undeliverable parent completion records a visible failure notice in the original requester conversation, with guidance to inspect saved child work and retry. Delivery state records a permanent failure. Deleted or reset requester sessions are never recreated or redirected to receive the notice.
Why This Change Was Made
The delivery owner reports failures for both direct suspension and requester-batch settlement. The transcript notice targets the recorded session ID and lifecycle revision without starting an agent turn or reusing retired execution authority. Batches share one failure identity. Direct store retirement carries the existing requester cohort through the mutation, including retained batches lacking a requester run ID or stored member list. Expiry alone remains silent while requester settlement can still succeed; final failure records the notice for successful or failed child executions. Failed child executions can also reach permanent delivery suspension instead of being excluded by the successful-result guard.
The sweeper's existing unreachable-descendant error remains possible after retirement; this change makes that outcome visible rather than replaying the old task. No config, schema, cache, or UI import changes. Production growth is 98 lines: one shared failure-report path for two mutation entry points, using the existing transcript report and lifecycle identity owners. Tests grow by 212 lines.
Evidence
07e049f8d440because the requester transcript is empty; both pass with the fix.pnpm check:changedcompleted; all selected checks passed except the unrelatedMEMBER_ROLE_PRESETSproduction unused-export failure. It reproduces on exact main parent07e049f8d440; the export was introduced by4fc7acf90a73(feat(openclaw-id): member roles come from gateway.roles.definitions #197739). This is a main regression, not a passing check or a suppression. Final targeted lint, formatting and core typechecking cover the subsequent cohort repair.07e049f8d440because the required notice is absent (7 history entries instead of 8), and passes with exactly one recorded host failure notice, unchanged prior message content, no revoked tool effects or final reply, and no revoked requester publications. The earlier exact-head CI failure was this affected consumer expecting no new history row; its expectation is repaired, not waived as inherited.