Skip to content

fix(codex): recover admitted native completions after restart - #147903

Merged
fuller-stack-dev merged 9 commits into
mainfrom
openclaw/orchestration-native-completion-recovery-20260913
Sep 16, 2026
Merged

fuller-stack-dev merged 9 commits into
mainfrom
openclaw/orchestration-native-completion-recovery-20260913

Conversation

@fuller-stack-dev

@fuller-stack-dev fuller-stack-dev commented Sep 14, 2026 •

Copy link
Copy Markdown
Member

Previous qualified head: 2dcfff81328c84a178155f7e216df7b6d6c8229b. The earlier Matrix follow-up preserved all 34 then-qualified recovery files. Current transport integration and main synchronization are described below; earlier results remain source-scoped historical evidence.

What Problem This Solves

Recover an already-admitted native child completion when the Gateway and native processes die while the parent is preparing its final reply. Keep the original task and input identities, and mark delivery complete only after a qualifying final response.

Why This Change Was Made

The native task remains succeeded with delivery pending after process loss. Ordinary completion-report cascade protection retires the interrupted parent turn, while native restoration waits for another parent registration. Neither owns autonomous completion of that already-admitted reply.

  • Bind the existing parent restart claim to the exact task, admitted terminal outcome, requester lifecycle, original input and delivery route.
  • Resume only still-owed admitted completions. Preserve ordinary report replay protection, cancellation, input fences and rejection of intervening human work.
  • Reconcile final delivery through existing bounded session receipts and the task registry; no additional scheduler or receipt table.
  • Preserve native history ownership and the selected task ID across cold reads and delivery. Retire stale local projections without discarding durable task custody.
  • Recognize an exact admitted recovery input before native mirroring adds its run annotation. Require a present annotation to agree with the input identity.

User Impact

A parent can finish an already-admitted native child completion after process loss. The child is not rerun, and pending work is not credited as delivered. Existing cancellation, lifecycle and ordinary-report replay protections remain.

Evidence

Unmodified pinned upstream reproduced the missing continuation after a real native child finished, its parent consumed the completion input, and the owned Gateway/native processes were killed during final processing. The result remained stored and pending; the observation is bounded, not a claim of permanent loss under every schedule.

The retained 971fa3a candidate passed the same process-loss cut using the real native app-server, a local synthetic provider, SQLite custody and a recording QA channel:

  • One child request and one original completion input.
  • One parent final after replacement; the exact task changes from pending to delivered.
  • A second physical replacement followed by 65 seconds of observation produces no duplicate child request or final.
  • Heartbeat disabled on all three boots. All captured processes stopped, three ports closed, temporary runtime removed; 29 raw-artifact hashes verified.

Retained original 29-file qualification (unchanged by the five-file follow-up): 664eb250f8ca4b8797e1cb1cef1153ad85a7bb8d, qualification base 5bdea2bb29fb832e6d6493c8925b8b26ee791661.

  • Final custody suites: 79 passed. Main-session recovery: 216 passed on identical production source before test-only relocation.
  • Source-bound integrated coverage: 475 tests on the preceding composition; only changed coverage was rerun, not counted again as a unique total.
  • Full pinned repository check plus the matching final two-file check passed; final build passed.
  • Fresh independent full-candidate review: seven partitions, no actionable P0–P2 findings.

The failed intermediate runtime that exposed the recorder/mirror ordering defect is retained. Its final real-recorder regressions fail twice before the repair, retain four rejection controls, and pass after repair. Earlier review disagreements are also retained: automatic outbound delivery is separate from message-tool authority, and the alleged native-history rewrite was not produced by the native writer. Real task-store controls preserve creation-time ownership through replacement and cold reload; arbitrary explicit internal metadata rewrites are not covered by that evidence.

Final-send review repair

Previously qualified head: 971fa3a495f92051870375e63cf26240ea1e4759. Its tree matches tested local commit 60aa83398fb45846ef26ca5e8be454139da9a0a3 after native publication.

Hosted review found that command delivery checked completion custody before send preparation, but did not forward that check to the final platform boundary. Four real-store cases reproduced stale writes after cancellation or outcome replacement during a reply hook or adapter preparation. Two more cases reproduced stale writes after a retryable transport failure and actual persisted-queue recovery.

The follow-up carries the existing batch completion explicitly through the command payload projection, preserves its exact task/outcome join in the existing session-writer authority, and revalidates it at live and recovered transport handoff. Execution cleanup does not invalidate an otherwise authorized persisted transport intent. No additional queue, table, or scheduler is introduced.

All 208 affected tests pass, including 12 sender/SQLite cases across hook, preparation, queued retry and post-cleanup retry. The follow-up's independent P0–P2 review found no actionable issues. Prior failed regressions and the incomplete-attribution review are retained; neither is relabeled as clean. The final callback annotation was requalified with all 12 cases passing. Required checks passed via the retained unchanged-source prefix plus all 11 final continuation stages. The final exact-source build and native crash/replacement proof passed on the published tree. Runtime5 retains one child request, one input and one final across two process replacements; its 29 artifact hashes and owned cleanup verify. The canonical public package passed its closure/integrity checks and the installed CLI/SDK upgrade and backup-restore sequence below. The earlier private-QA archive was correctly rejected by public-package integrity rules and is retained as a failed packaging attempt, not a passing release artifact.

Compatibility and scope

No database schema, canonical codec or storage-version change. Added fields live in existing optional, bounded session metadata; the published 2026.9.4 Doctor/upsert envelope probe retained the raw fields, but its normalized receipt reader omitted the task join and result count. This synthetic envelope probe is not a database downgrade or complete upgrade proof. Core and the native plugin must both be updated for recovery joining.

Installed-package transition on task-owned state:

  • Genuine published [email protected] created an ordinary session and a verified pre-upgrade backup.
  • The exact candidate was built with the canonical public-package profile, packed with bundled workspace dependencies, passed archive/import-closure checks, and installed into a separate prefix.
  • Candidate Doctor and the installed session SDK preserved the ordinary session ID and label while the inherited upstream schema advanced from 19 to 20. This PR itself introduces no schema-version change.
  • The published older SDK refused the newer database with newer-schema / gateway.maintenance_required.
  • The published backup command restored the verified pre-upgrade archive; schema returned to 19 and the original session ID/label read successfully. Newer state was preserved separately, not deleted. Post-backup work is not part of that rollback guarantee.
  • Public candidate tarball SHA-256: 205e09d6a1ee8ee8a3063fbe402238a88286e968466b3ade2fb362c22d538bbd.

The package proof exercises installed CLI/SDK state behavior. npm 11.19 emitted default install-hook restriction warnings; it does not establish execution of every third-party lifecycle hook. The actual bundled native process recovery is covered by the separately pinned exact-source runtime proof above.

This covers newly recorded admitted completions with an outbound channel route. It does not claim route-less/Control UI recovery, pre-admission recovery, remote-worker recovery, or exactly-once external effects after a lost acknowledgment. The actual channel proof uses the recording QA transport, not a live messaging service.

The earlier native yield/teardown work in #137822 and ordinary requester-settlement work in #140956 have different failure boundaries and remain separate. The landed execution-owner restore repair #147585 is included in the qualification base.

Release-note context

Recover an admitted native child completion after Gateway process loss without rerunning the child or crediting unfinished delivery. Preserve cancellation, requester-generation and ordinary-report replay protections.

Earlier recovery size and design tradeoff

Production: +1312 / -97. Tests: +2929 / -2. Docs: +18 / -0. Config: +1 / -1. The growth adds the previously absent durable task/outcome/input binding and validates it through the existing recovery and delivery owners. Removing the ordinary completion-report guard would be smaller but would authorize replay without custody. A separate scheduler or receipt store would duplicate those owners. No schema or storage-version bump is introduced.

Recording-channel runtime verdict:

{
  "result": "pass",
  "head": "971fa3a495f92051870375e63cf26240ea1e4759",
  "nativeAppServer": "real installed binary",
  "provider": "local synthetic",
  "channel": "recording QA transport",
  "childRequests": 1,
  "originalCompletionInputs": 1,
  "parentFinals": 1,
  "taskDelivery": "pending -> delivered",
  "secondReplacementObservationMs": 65000,
  "heartbeatEnabled": false,
  "artifactHashesVerified": 29,
  "ownedCleanupConfirmed": true
}

Matrix multi-event follow-up

The hosted review correctly found that Matrix invoked the final authority callback only for its first event. Actual matrix-js-sdk loopback HTTP reproduced four stale sends after canonical task cancellation or outcome replacement, in durable and non-durable modes. Both unchanged controls sent all three chunks. The repair validates every event, after network preparation and across redirects; ephemeral transaction IDs use the SDK's existing generator. No queue schema, receipt store, shared channel policy, or retry budget changed.

Actual task/HTTP case Before Repaired
Unchanged task, durable 3 sends 3 sends
Cancelled after first event, durable 3 sends 1 send
Outcome replaced after first event, durable 3 sends 1 send
Unchanged task, non-durable 3 sends 3 sends
Cancelled after first event, non-durable 3 sends 1 send
Outcome replaced after first event, non-durable 3 sends 1 send

Four affected Matrix suites pass 288 tests; the separate six-case actual task/SQLite/HTTP proof passes. Additional real HTTP controls cover SDK preparation and 307 redirects, including unchanged redirects. The already-accepted first event is retained; no later event is sent after revocation. This is actual loopback protocol transport, not an authenticated Matrix homeserver, encrypted-room end-to-end proof, or lost-ack exactly-once claim.

All earlier 34 files are byte-identical to the native restart/package-qualified head. The follow-up changes four Matrix production files, adds the HTTP regression file, and shrinks the existing assertion baseline by one after removing a cast. Final independent P0–P2 review found no actionable issues with 0.95 confidence. Final SDK/HTTP requalification passed 158 tests, and all six canonical task/HTTP cases passed again. Formatting, both extension type lanes, lint, export and boundary checks, storage/media/sidecar guards, and import-cycle checks passed through recorded source-bound continuations. Earlier failed checks remain recorded; they are not relabeled as passing. The canonical public artifact build passed in 1 minute 36 seconds with all forty source-file hashes unchanged. The prior native restart and installed-package transition remain qualified on their unchanged core/plugin paths; they were not rerun for this Matrix-only correction.

Candidate reopen after older writer

The installed candidate Doctor and public SDK reopened a copy of the genuine released session after the released Doctor/upsert round trip of the captured metadata envelope. Ordinary session identity, the admitted claim, and one joined receipt with its result count survived. This is a synthetic future-metadata envelope on a real released database, separate from the installed full-database upgrade/refusal/backup rollback already reported. It does not make a newer-schema database readable by the older release.

Maintainer compatibility disposition

Accept the narrow coupled core/native-plugin recovery contract under the existing repair-and-land mandate. The published-driver upgrade, actual older-writer metadata round trip, installed candidate reopen, older-reader refusal, and verified-backup rollback are now measured. Missing saved ownership remains a fail-closed recovery condition. Do not downgrade in place with pending new-protocol obligations; finish them on the candidate or use the verified pre-upgrade backup. This adds no schema migration or retention policy, and does not waive Matrix authority or CI checks.

Production transport integration

The actual supervisor and child callers now receive the relay adapter before asynchronous private-input readiness completes, so output and exact raw stream errors remain observable throughout construction and final cleanup. Premature stream close rejects instead of being treated as EOF. Successful native cleanup joins final output drainage; a known native cleanup failure rejects promptly even while a pipe remains open. Terminal results are immutable.

The maintained awaited-stdout owner, secret-delivery disposal, cancellation and original monotonic cleanup deadline remain intact. The merge with main composes Matrix recovery-key persistence with the existing per-request authority guard, including redirects; it does not introduce another fetch wrapper or authority owner. No live Gateway restart or deployment is part of this integration.

Source qualification for local commit 550e13d57c1017a52518069dd1052e9b36ec11e5 (tree 3aec4d0e7363fabb190aa56b4190ec5d8497e1ce):

  • 132 relevant transport/product tests passed, including real private-input consume/cancel, pending readiness, final output, late raw errors, cancellation, shutdown and original-deadline behavior.
  • The cleanup-failure regression first failed in all three cancel/deadline/shutdown cases; all pass after the correction. Failure logs are retained.
  • Final Matrix persistence/real SDK HTTP authority composition: 32 tests passed.
  • Full core and extension types, canonical services test types, focused process lint and final formatting passed.
  • Independent review of the exact nine-file integration delta passed with no actionable P0–P2 findings, resolving the cleanup-failure finding. Prior recovery reviews remain scoped to their original source.
  • Final Matrix lint initially stopped in declaration preparation because the checkout was nested below another install. Native required gates use an independent checkout with no ancestor node_modules; the source is unchanged and the original failed log is retained.

Native full build and repository check passed, including final Matrix lint and all configured type/format/policy lanes. The broad local test command selected 722 shards and was deliberately stopped in favor of the maintained hosted exact-head CI gate; no complete local-suite pass is claimed. Published-head CI remains pending. Historical synthetic controller/provider afterimages and their 102 TypeScript/22 Python cases were preserved, not transplanted into production or replayed.

Published integration head: 25f6db55a47eab3d89a0f35940d424c4013d1ad5. GitHub verifies its SSH signature. Signing changed only commit metadata; the reviewed tree and upstream/contributor ancestry are preserved.

Current CI repair

Hosted CI exposed inherited source-file growth and two stale test type assumptions. The repair extracts registry state, final-delivery authority, native completion parsing, and complete recovery test fixtures without changing their owners or widening baselines. The cancellation test awaits the maintained asynchronous database close operation; the Matrix test narrows its observed dispatch before asserting its transaction ID.

  • 679 focused tests passed across 10 files and five shards. Full core production, extension production/test, and all 20 core-test type graphs passed.
  • Changed core/extension lint, formatting, line-cap no-growth, and assertion-safety checks passed. No assertions were removed or thresholds raised.
  • The final duplicate-import consolidation is mechanical and recorded separately from the frozen independent-review snapshot.
  • Full build passed in 7m34s. Independent P0–P2 review of the exact final 15-file delta passed with no findings; all source pins and qualification-log hashes verified.
  • The unrelated publisher-inventory failure was repaired by canonical fix(plugins): keep unpublished packages bundled until release #150316, merged as 20230c35f018997ae72b562327dd370f44d43ffc. The subsequent upstream fix: keep source-only sessions free of dependency installs #149587 restored pre-deferral expectations; the follow-up below restores the exact current declarations without changing publication eligibility.

Earlier failures remain recorded. The next publication requires fresh exact-head CI; the interrupted 722-shard local run remains incomplete.

Published repair head: 6fe18abbe12e6fb5d97e405584664a45bf9d8a74, tested/reviewed tree 82ca7897857e8a3b5cdb99fe62003dd491abe200. GitHub verifies the maintainer SSH signature. Fresh exact-head CI and the updated hosted review are required before native landing.

Final CI reconciliation

The next hosted run exposed a runtime-boundary scan of the moved test registration modules. They now use the established .test-harness.ts naming convention; both module bodies are byte-identical, and only their two import paths changed. No guard or allowlist changed. Five task-boundary tests and all 13 moved recovery cases passed (18 selected; 340 unselected cases skipped), as did both owning test type graphs and formatting.

The current committed inventory test passed against the actual package declarations: 95 npm / 91 ClawHub, preserving #150316's three bundled-only deferrals after #149587 restored stale 98/94 expectations. Only those exact assertions changed; producer rules, manifests and catalog entries are untouched. One selected inventory test passed; 107 unrelated cases were skipped.

Canonical #150330 landed the unrelated main formatting repair. Its two whitespace-only joins are consumed from main, not duplicated here. All nine independently reviewed integration files and all four naming-fix files remain hash-identical after the final main merge. Earlier source-scoped qualifications and failures remain retained; these focused checks are not a replay of the full 679-test or historical runtime suites.

Final signed candidate: 02956a0aabdd8abf5acbbedc3e646f4b8e31f8cc. Current-head hosted CI and review are required before native landing. The coupled core/plugin compatibility disposition above remains unchanged.

Final landing gates

Exact-head CI run35157494788 and required openclaw/ci-gate passed for 02956a0aabdd8abf5acbbedc3e646f4b8e31f8cc. The current-head review completed with no actionable findings and explicitly confirms that the documented compatibility disposition requires no further decision. Native hosted preparation passed without changing or repushing the candidate.

@clawsweeper

clawsweeper Bot commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime agents Agent runtime and tooling extensions: codex size: XL maintainer Maintainer-authored PR labels Sep 14, 2026
@fuller-stack-dev fuller-stack-dev self-assigned this Sep 14, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 14, 2026
@clawsweeper

clawsweeper Bot commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 16, 2026, 6:35 PM ET / 22:35 UTC (Revision 7).

ClawSweeper review

What this changes

Recovers admitted native child completions after restart, preserves their authority through channel delivery, and retains child-process output during startup and cleanup.

Merge readiness

⛔ Blocked before merge - 1 item remains

This PR still addresses a recovery gap on main. The final changes introduce no new blocking findings, the earlier delivery-authority findings remain resolved, and the recorded compatibility disposition does not require another decision.

Priority: P2
Reviewed head: 02956a0aabdd8abf5acbbedc3e646f4b8e31f8cc

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A coherent recovery repair with strong source-scoped behavior evidence, resolved prior findings and an explicitly accepted compatibility boundary.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): Recorded native app-server/SQLite recovery shows one final reply across two process replacements; real sender and Matrix HTTP controls reject cancelled or replaced custody before later sends. Relay consume/cancel and package-transition evidence remain source-scoped, and the final naming changes preserve their production owners.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): Recorded native app-server/SQLite recovery shows one final reply across two process replacements; real sender and Matrix HTTP controls reject cancelled or replaced custody before later sends. Relay consume/cancel and package-transition evidence remain source-scoped, and the final naming changes preserve their production owners.
Evidence reviewed 11 items Current main still has the recovery gap: Main routes completion-report tails through interrupted-report reconciliation without the branch's exact admitted harness-completion exception. The related merged execution-owner repair addresses orphaned running tasks, not this pending parent reply.
Complete captured discussion inspected: The full fetched PR body matches the supplied snapshot: 19,208 UTF-16 units and SHA-256 728509ff978b7f9f3f22eae78bb6225435e83a7ec75b0e77463b12173ec7c632. Its omitted portion explicitly accepts coupled core/plugin updates and verified-backup rollback, and records the final transport and test-registration qualifications.
Final test-registration changes preserve bodies: The naming commit changes two imports and renames two registration modules. Their previous blobs, 8949d9da9d012a3bfa37c785a7822a23f5eca889 and b59fa99dc44c00fa0ae8329957d6f9f0efdc7d70, match the current harness files exactly. The complete bodies retain cancellation, missing-input, intervening-human-work, and recovery cases.
Findings None None.
Security None None.

How this fits together

OpenClaw records native child results as tasks and admits their completion into a parent conversation. Gateway recovery resumes eligible interrupted replies, while the outbound delivery owner records whether the final response reached its channel.

flowchart TD
  A[Native child result] --> B[Task and requester identity]
  B --> C[Admitted parent completion]
  C --> D[Gateway restart recovery]
  D --> E{Current task and session?}
  E -->|Yes| F[Guarded channel delivery]
  E -->|No| G[Retain pending task]
  F --> H[Final receipt settles task]
Loading

Before merge

  • Resolve merge risk (P1) - Mixed core/plugin versions or an in-place downgrade with pending new completion claims can strand recovery or discard receipt joins; the recorded disposition accepts coupled updates and verified pre-upgrade backup recovery.
Agent review details

Security

None.

PR surface

Source +1453, Tests +3838, Docs +18, Other 0. Total +5309 across 60 files.

View PR surface stats
Area Files Added Removed Net
Source 35 1815 362 +1453
Tests 23 4334 496 +3838
Docs 1 18 0 +18
Config 0 0 0 0
Generated 0 0 0 0
Other 1 1 1 0
Total 60 6168 859 +5309

Review metrics

Metric Value Why it matters
Re-review continuity 2 test-registration bodies preserved byte-for-byte The naming correction preserves the previously qualified recovery assertions.

Merge-risk options

Maintainer options:

  1. Retain the accepted upgrade contract (recommended)
    Use the documented coupled core/plugin update and verified-backup rollback boundary without reopening the already recorded compatibility decision.

Technical review

Best possible solution:

Keep completion recovery within the existing task, session and delivery owners, with coupled core/plugin updates and the accepted backup-based rollback contract.

Do we have a high-confidence way to reproduce the issue?

Yes: kill the Gateway and native processes after the parent consumes a child completion but before final delivery. The recorded native run demonstrates this boundary, and main's completion-report reconciliation explains the missing continuation; this review did not rerun it.

Is this the best way to solve the issue?

Yes: the patch extends existing recovery and receipt ownership while retaining cancellation, requester identity and replay fences; the final test naming and inventory corrections preserve that design.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 6f08e4ea3c56.

Labels

Label justifications:

  • P2: This repairs a bounded restart-recovery failure affecting admitted native completion replies.
  • merge-risk: 🚨 compatibility: The new persisted completion joins require coupled core/plugin updates and cannot promise safe in-place downgrade with pending obligations.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): Recorded native app-server/SQLite recovery shows one final reply across two process replacements; real sender and Matrix HTTP controls reject cancelled or replaced custody before later sends. Relay consume/cancel and package-transition evidence remain source-scoped, and the final naming changes preserve their production owners.
  • proof: sufficient: Contributor real behavior proof is sufficient. Recorded native app-server/SQLite recovery shows one final reply across two process replacements; real sender and Matrix HTTP controls reject cancelled or replaced custody before later sends. Relay consume/cancel and package-transition evidence remain source-scoped, and the final naming changes preserve their production owners.

Evidence

What I checked:

  • Current main still has the recovery gap: Main routes completion-report tails through interrupted-report reconciliation without the branch's exact admitted harness-completion exception. The related merged execution-owner repair addresses orphaned running tasks, not this pending parent reply. (src/agents/main-session-recovery/main-session-restart-recovery-store.ts:558, 6f08e4ea3c56)
  • Complete captured discussion inspected: The full fetched PR body matches the supplied snapshot: 19,208 UTF-16 units and SHA-256 728509ff978b7f9f3f22eae78bb6225435e83a7ec75b0e77463b12173ec7c632. Its omitted portion explicitly accepts coupled core/plugin updates and verified-backup rollback, and records the final transport and test-registration qualifications. (02956a0aabdd)
  • Final test-registration changes preserve bodies: The naming commit changes two imports and renames two registration modules. Their previous blobs, 8949d9da9d012a3bfa37c785a7822a23f5eca889 and b59fa99dc44c00fa0ae8329957d6f9f0efdc7d70, match the current harness files exactly. The complete bodies retain cancellation, missing-input, intervening-human-work, and recovery cases. (src/agents/agent-command.restart-recovery.test-harness.ts:30, 2adac0b1bb3f)
  • Current integration preserves reviewed source: Current blob identities match the previous review for both renamed harness bodies, the process supervisor, and the publisher-inventory test. The inventory assertions retain 95 npm and 91 ClawHub packages, consistent with the three bundled-only declarations retained from fix(plugins): keep unpublished packages bundled until release #150316. (test/scripts/release-plan-producer.test.ts:1775, 02956a0aabdd)
  • Authority remains bound to current custody: The task owner checks exact task identity, terminal status, requester ownership, session ID and lifecycle revision. Command delivery forwards its guard to platform handoff; queued delivery retains the same task/session constraint after execution cleanup. (src/tasks/agent-harness-completion-recovery.ts:103, 02956a0aabdd)
  • Prior Matrix finding remains repaired: Every message event receives the final authority callback, including ephemeral transaction IDs. Transport invokes it after network preparation and on redirects, while preserving uncertainty once an earlier request crossed the network boundary. The body records real SDK/SQLite/HTTP controls: unchanged tasks send three chunks, while cancellation or outcome replacement after the first event prevents later chunks. (extensions/matrix/src/matrix/sdk/transport.ts:203, 02956a0aabdd)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • vincentkoc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (6 earlier review cycles)
  • reviewed 2026-09-14T04:53:49.264Z sha 664eb25 :: needs real behavior proof before merge. :: [P1] Carry the completion guard through automatic send preparation
  • reviewed 2026-09-14T05:33:46.454Z sha 971fa3a :: needs real behavior proof before merge. :: [P1] Revalidate completion custody before every Matrix event
  • reviewed 2026-09-14T05:49:38.996Z sha 971fa3a :: needs real behavior proof before merge. :: [P1] Revalidate completion custody before every Matrix event
  • reviewed 2026-09-14T06:10:39.089Z sha 2dcfff8 :: blocked before merge. :: none
  • reviewed 2026-09-16T21:28:00.194Z sha 25f6db5 :: blocked before merge. :: none
  • reviewed 2026-09-16T22:07:09.869Z sha 6fe18ab :: blocked before merge. :: none

@fuller-stack-dev

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Exact head 971fa3a495f92051870375e63cf26240ea1e4759 resolves the retained final-send finding. The body now records real allowed/revoked sender and persisted-queue controls, 208 affected tests, final source-bound review/checks, exact-source native crash + two-replacement proof, and installed published-release upgrade/older-reader refusal/verified-backup rollback. Failed intermediate attempts and scope limits remain explicit.

CI's separate test-merge startup-JS budget overage remains unresolved and is being coordinated with the current UI owner; no check waiver or tolerance increase is requested.

@clawsweeper

clawsweeper Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

@clawsweeper

clawsweeper Bot commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@fuller-stack-dev

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Exact head 2dcfff81328c84a178155f7e216df7b6d6c8229b repairs the retained Matrix per-event authority finding. The real Matrix SDK and loopback HTTP now revalidate before every event and redirect. Canonical task/SQLite controls reproduce four stale-send failures before repair and pass all six cases afterward: an accepted first event remains, but cancellation or outcome replacement prevents later chunks. SDK preparation and redirect controls also pass.

Final independent P0-P2 review has no actionable findings; required checks and the exact-source public build pass. The original 34 recovery files are byte-identical to the completed native crash/two-replacement and installed-package transition proofs. The body records those boundaries, actual older-writer/candidate reopen evidence, and the maintainer compatibility disposition under the existing repair-and-land mandate. Earlier findings and failed attempts remain preserved.

Fresh exact-head CI is required. The previous head's UI startup-budget failure is not waived, and no tolerance increase or automated merge is requested.

@clawsweeper

clawsweeper Bot commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 14, 2026
@fuller-stack-dev
fuller-stack-dev requested a review from a team as a code owner September 16, 2026 22:00
@fuller-stack-dev

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Exact head 6fe18abbe12e6fb5d97e405584664a45bf9d8a74 integrates the production relay with actual callers and the supervisor: raw observation begins before private-input readiness, successful cleanup drains final output, and native cleanup failure rejects without waiting forever on an open pipe. Original deadlines, cancellation, secret disposal, authority checks and terminal-result immutability remain intact.

The prior hosted run exposed inherited line-cap growth and two stale test assumptions. The final15-file repair extracts existing owners/test fixtures without widening baselines or dropping assertions, awaits the maintained database-close operation, and narrows the Matrix observed dispatch. Independent P0–P2 review of this exact delta passed. All679 focused tests, full core/extension production and test types, all20 canonical core-test graphs, changed lint/ratchets, and the full build passed. Prior132 transport and32 Matrix results remain source-scoped; no original runtime proof is relabeled.

Canonical #150316 has landed the separate main publisher-inventory correction. The body preserves the earlier failures, actual behavior evidence, compatibility disposition and remaining proof boundaries. Fresh exact-head CI is required; this requests review only, not automated merge.

@clawsweeper

clawsweeper Bot commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

@fuller-stack-dev

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Updated head 02956a0aabdd8abf5acbbedc3e646f4b8e31f8cc: canonical test-harness classification (byte-identical moved bodies), exact current95/91 inventory assertions following #150316, and consumed canonical formatting fix #150330. Eighteen relevant boundary/recovery cases, both owning type graphs, formatting, and the committed-head inventory case pass. The previous exact fifteen-file independent review remains applicable to unchanged code.

The documented coupled core/plugin update and verified pre-upgrade backup rollback disposition remains accepted and unchanged; no mixed-version or lost-ack exactly-once claim is made. Please review this final delta and current integration; historical proof remains source-scoped.

@clawsweeper

clawsweeper Bot commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@fuller-stack-dev
fuller-stack-dev merged commit 6caadad into main Sep 16, 2026
224 checks passed
@fuller-stack-dev
fuller-stack-dev deleted the openclaw/orchestration-native-completion-recovery-20260913 branch September 16, 2026 22:45
@fuller-stack-dev

Copy link
Copy Markdown
Member Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 17, 2026
…aw#147903)

* fix(codex): recover admitted native completions after restart

* fix(agents): retain completion custody through final delivery

* fix(matrix): revalidate authority for every wire event

* fix(agents): preserve recovery contracts under current CI

* test(agents): classify recovery registrations as test harnesses
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling channel: matrix Channel integration: matrix docs Improvements or additions to documentation extensions: codex gateway Gateway runtime maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XL status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant