Repository navigation
fix(subagents): record failed recovery instead of stranding child results - #176146
xyi74976-del wants to merge 1 commit into
Conversation
|
🦞👀 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 real behavior proof before merge. What this changesRecords failed requester recovery for expiry-suspended child completions before clearing their wake. Example: A child returns "canonical result", direct delivery expires, and requester recovery ends with "requester failed".
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 2 items remain This PR provides a focused repair for a current settlement bug; no introduced correctness or security defect was found. Priority: P1 Before merge
FindingsNone. Tests
Agent review detailsHow this fits togetherSubagent completion settlement consumes requester-wake outcomes and atomically updates native run records and deduplicated notification intents in SQLite. flowchart TD
A[Completed child result] --> B[Direct delivery expires]
B --> C[Requester recovery wake]
C --> D[Completion settlement worker]
D --> E[Retained result and failure receipt]
D --> F[Deduplicated blocked notice]
Technical reviewBest possible solution: Use the existing worker transaction to record terminal recovery failure, retain the child result, deduplicate warnings, and clear the exhausted wake. Do we have a high-confidence way to reproduce the issue? Current-main settlement and its terminal-failure callers establish the reported path; the author reports failing-before/passing-after SQLite regressions, which this read-only review did not execute. Is this the best way to solve the issue? This is the smallest complete repair: broaden the existing expiry exception to both outcomes and retain the established failure, transaction, and notification owners. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 66485231b24d. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceSource -2, Tests +33, Docs +5. Total +36 across 3 files. Added test files: 0. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel changes: No label changes. Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
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 18, 2026, 4:22 AM ET / 08:22 UTC. |
Cover private-parent recovery, retained completion payloads and notice identity, and rollback after a failed settlement write. Keep the existing kernel as the single failure owner. Original fix by Sukhdeep Johar in openclaw#176145; additional regression coverage adapted from openclaw#176146. Co-authored-by: Sukhdeep Johar <[email protected]> Co-authored-by: xyi74976-del <[email protected]>
…mpletion for 7 days (#176145) * fix(subagents): settle expired completions when their requester wake fails * docs(subagents): note failed settlement of expired completions * fix(subagents): preserve failed expiry settlement contracts Cover private-parent recovery, retained completion payloads and notice identity, and rollback after a failed settlement write. Keep the existing kernel as the single failure owner. Original fix by Sukhdeep Johar in #176145; additional regression coverage adapted from #176146. Co-authored-by: Sukhdeep Johar <[email protected]> Co-authored-by: xyi74976-del <[email protected]> --------- Co-authored-by: Peter Steinberger <[email protected]> Co-authored-by: xyi74976-del <[email protected]>
|
Thanks @xyi74976-del! Your approach and private-parent/rejected-write regression coverage were folded into #176145, which landed as 9312615 with your co-author credit. Closing this as covered by the landed fix. |
…mpletion for 7 days (openclaw#176145) * fix(subagents): settle expired completions when their requester wake fails * docs(subagents): note failed settlement of expired completions * fix(subagents): preserve failed expiry settlement contracts Cover private-parent recovery, retained completion payloads and notice identity, and rollback after a failed settlement write. Keep the existing kernel as the single failure owner. Original fix by Sukhdeep Johar in openclaw#176145; additional regression coverage adapted from openclaw#176146. Co-authored-by: Sukhdeep Johar <[email protected]> Co-authored-by: xyi74976-del <[email protected]> --------- Co-authored-by: Peter Steinberger <[email protected]> Co-authored-by: xyi74976-del <[email protected]>
Closes #176117
What Problem This Solves
Fixes completed child results remaining silently suspended when direct delivery expires and the requester recovery wake ultimately fails.
User Impact
Failed recovery now records its concrete delivery failure while retaining the child's result, instead of leaving an unowned suspended completion until age-based discard. Existing blocked-delivery warnings remain deduplicated. This does not restart exhausted retry budgets or guarantee delivery after a permanent failure.
Why This Change Was Made
Expiry transfers settlement to the requester wake. Previously, the settlement owner admitted an expiry-suspended row only for successful outcomes, then cleared the wake even after an unsuccessful outcome. Both outcomes now use the existing settlement path; failure recording, result retention, warning deduplication, and wake removal remain in one worker-owned transaction. Permanent suspensions retain their existing behavior. No schema, dependency, permission, or retention-policy change is introduced.
Evidence
470ba964: reopening SQLite showedsuspendedand the old expiry error instead of the final failure.pnpm tsgo:core), targeted repository lint, three-file formatting, andgit diff --checkpassed. The implementation reuses the existing settlement owner and reduces production code; the additional test code protects the previously missing failure path.autoreviewassessment with the complete settlement kernel and caller context: no actionable P0–P2 findings. This was a static independent review; the reviewer did not execute tests.Local proof used Node 24.21.0 and isolated synthetic SQLite state. No live provider outage, real channel delivery, native Windows run, or full-suite run is claimed. PR CI results and CI seconds are pending.
AI assistance: Codex for investigation, implementation, tests, independent review and this description.