Repository navigation
fix: repair stale Gateway service definitions during updates - #152120
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: blocked before merge. Reviewed September 19, 2026, 4:26 AM ET / 08:26 UTC (Revision 20). ClawSweeper reviewWhat this changesUpdates repair recognized stale Gateway service definitions through existing installers, preserve operator edits, and retain verified backups for recovery. Merge readiness⛔ Blocked before merge - 1 item remains This remains useful, unsuperseded work. No blocking defect was found, and the recorded upgrade, preservation, and rollback evidence addresses the previous compatibility reminder. Priority: P1 Review scores
Verification
How this fits togetherGateway service definitions tell systemd, launchd, or Windows Task Scheduler how to run OpenClaw. Update finalization compares the installed definition with the candidate installer’s plan, then repairs or preserves it and records the outcome. flowchart TD
A[Package update] --> B[Inspect installed service]
B --> C{Recognized managed definition?}
C -->|No| D[Preserve definition and warn]
C -->|Yes| E[Capture verified backup]
E --> F[Existing platform installer]
F --> G{Installation succeeds?}
G -->|Yes| H[Verify Gateway and record outcome]
G -->|No| E
Before merge
Agent review detailsSecurityNone. PR surfacePR surface statistics unavailable: the file list is incomplete. Review metrics
Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Keep one audit and backup owner coordinating the existing platform installers, with verified restoration before generated-input cleanup. Do we have a high-confidence way to reproduce the issue? No independent current-main reproduction was run in this read-only review; the supplied native evidence demonstrates the published 2026.9.4 stale-unit upgrade scenario and its repaired outcome. Is this the best way to solve the issue? Yes. The patch extends the existing audit and installers, preserves ordinary-install behavior, and consolidates transactional compensation instead of adding another service writer. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against ec7c47a6d508. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (19 earlier review cycles; latest 8 shown)
|
…w#152120) Updates could leave managed Gateway service definitions on stale policies, including missing systemd KillMode=mixed and Windows tasks with no crash-restart retries. Series B follows PR A openclaw#151691 and the reporting prerequisite openclaw#151777. Extend the existing service audit and platform installers to repair recognized drift after package activation, preserve operator edits and foreign definitions, and back up definitions before publication. One verified receipt owner restores native references before retiring generated inputs. Inspection and repair hiccups become recorded warnings; recovery refuses replacement when retained bytes or live ownership cannot be verified. Updater-only Doctor writes are retired so they cannot bypass the backup transaction. Published 2026.9.4 rollback retains its old installer behavior; candidate-owned rollback restores captured definition bytes and the verified previous runtime. There are no new public options, dependencies, or SQLite schema changes. Standalone Doctor repair and series documentation remain Part C. Thanks to the Discord reporter of the stale 2026.9.4 systemd policy and @Andapeng for the Windows crash-recovery report in openclaw#151325. Validation: 691 focused tests and check:changed passed. Exact-head CI run 35430346960 completed with 141 successful jobs, 15 skipped, and zero failures. The two earlier security-review dependency refusals reported no security finding. The review of record is scoped-clean; ClawSweeper found no actionable correctness or security findings. Its compatibility reminder is satisfied by the published-driver upgrade, operator-edit preservation, and both rollback-owner evidence. Four recorded Linux live cells passed at 9f39024; later compensation changes have current-head fault regressions. Windows and launchd lifecycle proof remains helper-based, as accepted for this landing.
…nclaw#152717) Restore node-host workspace downloads on hosts using umask 0002. The runtime, contained-directory, and seed-cache owners now create directories at 0700 and repair existing 0775 ancestry through the shared descriptor-based permission helpers. Filesystem safety validation and transferred payload permissions remain unchanged. Cover fresh private-directory creation and legacy reopening through a child process and real HTTP workspace transfer. Give related test fixtures explicit private modes and document recovery without changing the host umask. Validation: 30 transfer/startup tests under umask 0002, 28 seed/retention tests, 32 shared-state tests, hosted Testbox 70 passed, selected changed-file gates, and scoped-clean Codex review. Exact-head CI verified by the campaign lead. Related: openclaw#152120
Related: #151691, #151325; series B of the stale-service-definition repair, after #151777
What Problem This Solves
Fixes upgrades leaving older managed Gateway service definitions stale, including the Discord report of missing systemd
KillMode=mixedon 2026.9.4 and the Windows task with zero crash-restart retries in #151325.User Impact
After package activation, update repairs recognized stale definitions through the existing platform installer, backs up the previous files first, and records the changed keys in the update outcome, status, and bounded report. Operator edits and unknown or foreign definitions stay intact, with warnings that name the affected keys. Inspection or repair hiccups remain warnings; recovery refuses replacement when it cannot verify the retained bytes or current owner.
When published 2026.9.4 owns rollback, it restores the old package and uses that release’s install/restart flow, regenerating its previous definition with that release’s preservation behavior. Candidate-owned rollback restores the captured definition files byte for byte and restarts the verified previous runtime.
Why This Change Was Made
The existing service audit remains the drift owner, now comparing the actual prepared install plan for settings the rewrite would discard. The existing systemd, launchd, and Scheduled Task installers remain the writers. Their publication hooks bind the audit to captured files, verify the installer’s output, and retain a private backup receipt for rollback; later operator changes prevent replacement. Warning projection uses the existing update ledger and report converter. Install path discovery recognizes the public shim and direct updater entrypoint of the same package, preserving PATH order without admitting a foreign installation.
B also retires updater-only Doctor writes and ensures updater restart retries preserve the definition, so neither can bypass the backup transaction. Standalone Doctor repair and the series documentation remain Part C. No new options, environment variables, dependencies, or database schema changes are included.
Net production growth is 1,221 lines (+2,047/−826), within B’s 1,225-line umbrella share: backup/receipt/reconciliation adds 676 lines, audit adds 355, native installers and shared installation identity add 241, update integration adds 121, and removing updater-only Doctor writers saves 172. Tests/support add 2,287 net lines (+3,054/−767). Round four is production +16/−19 (net −3) and tests +131/−0. Existing receipt compensation absorbs all transactional restoration; removing redundant installer recovery plumbing pays for the explicit delegation. No assertions, suppressions, or baselines were removed to fit the change.
The atomic-publication follow-up fixes a failed-write window in the Windows launcher and launchd environment/wrapper installers: truncating the live file before recording publication could leave recovery refusing an empty or partial launcher. Those installers now use the existing atomic-file primitive through the shared service publication hook. Systemd retains its existing atomic writer. Each replacement is prepared beside the target and renamed only after the backup receipt records the prepared file identity; publication is acknowledged after rename. After checkpoint I/O, the same backup owner revalidates live files and native inventory before publication without discarding prepared evidence. Recovery accepts unchanged original files or the exact prepared publication, while refusing later operator replacements, including identical bytes on another inode.
Windows uses Node’s native rename-over operation. If an open launcher prevents replacement (
EPERM,EBUSY, orEEXIST), the old file stays intact and existing warning/compensation handling runs; there is no unlink/copy fallback or retry loop. The retained private receipt is a backup artifact replayable by the existing restore API, not a new whole-updater automatic-resume protocol.Scheduled Task XML replacement now checkpoints its intended XML before
/Create /F, both during installation and rollback. Recovery uses the existing task audit to recognize Scheduler’s SID/default normalization, records whether it found the previous or prepared policy, and rejects foreign policy before changing launchers. The systemd restore path also repeats its guardeddaemon-reloadwhen a prior attempt restored the unit but stopped before refreshing the manager; it reloads before removing old inputs.Evidence
Codex round-four validation at
f2a56ab4bf2e8239e7266a153cc0cf8534894e41:pnpm check:changed: passed, exit 0. Formatting, both typechecks, all unused-export scans, core lint, schema/storage guards, and runtime/request boundaries passed. Only existing warning-only line-count and asynchronous database-fixture advisories remain; no suppressions or baseline edits were added.--mode branch --base origin/main --max-priority P1, private DarwinTMPDIR): scoped-clean, confidence 0.84. The local pre-commit review was also clean (0.93). One intervening finding was rejected against source evidence: it conflated the candidate package transaction, which restores package files/global CLI shims, with the separate published 2026.9.4 rollback orchestrator that calls the old service installer. The fresh review included both exact implementations and confirmed the distinction; receipt identity checks were not weakened.f2a56ab4bf2e8239e7266a153cc0cf8534894e41. All 156 jobs completed: 141 successful, 15 skipped, zero failures. The native watcher attached, then hit shared GraphQL quota; the authorized exact-run REST watcher exited 0. The long extension bundle also passed. Campaign red-main class#116did not recur. No CI job was rerun.The post-completion exact-head check snapshot contains 210 completed checks: 165 successful, 42 skipped, one neutral, two failed. Both failures are earlier security-review dependency gates, not test or security findings:
reviewjob 105863699427reviewjob 105863721795All seven Security High jobs and
security-fastpassed. The PR is open, non-draft, and mergeable; GitHub reported aggregatemergeable_state=unstableat that snapshot, alongside the earlier failed checks. This does not change the exact CI workflow’s terminal success above.Exact-head ClawSweeper review also found no actionable findings (readiness/quality 4/6, proof 5/6). Its config/data compatibility reminders are addressed by the retained published-driver upgrade/rollback and operator-preservation evidence, plus the current regression proof; this round changes no config surface, receipt shape, or SQLite schema. Native Windows/launchd coverage remains helper-based.
The accepted P1 escaped the receipt owner's ordering through systemd's own catch handler, which could delete a newly generated environment file after restoration of the referencing unit failed. Its lower publication helper could also independently restore a file after acknowledgement failure. Both now propagate errors unchanged to receipt compensation when a transaction exists. Standalone systemd installation retains its own recovery contract and stops before input cleanup if restoring the unit throws.
restoreGatewayServiceDefinitionBackup: restore existing inputs and unit, perform guardeddaemon-reload, then retire new environment files. The installer catch and mutation helper no longer compensate independently./Change, direct fallback, and Startup migration; finalizers remove only temporary XML input. No Scheduled Task code change was needed.The recorded four Linux live cells below remain attributed to
9f3902454, run 35422060057. This round's additional installer-failure paths have current-head filesystem/native-helper proof; no new Linux live run or native Windows/launchd execution is claimed. No config/env/CLI option, schema, dependency, receipt shape, or second writer was introduced. No landing or Part C work was performed.Round-three validation and previously recorded native proof
Codex round-three validation at
341f1c436dda936226970b428fed99441896fc33:umask 077; the publisher regressions run isolated child processes under000and077.0666instead of0600under umask000). They pass after the fixes. Existing operator-edit refusals and non-service rollback diagnostics remain intact; warnings retain the ledger’s existing home-path redaction.pnpm check:changed: passed, exit 0, including both typechecks, lint, export scans, storage and boundary guards. Only existing warning-only line-count and asynchronous database-fixture advisories remain; no suppressions or baseline edits were added.--mode branch --base origin/main --max-priority P1with private DarwinTMPDIR: scoped-clean, no actionable P0/P1 findings, confidence 0.90.341f1c436dda936226970b428fed99441896fc33. All 156 jobs completed: 139 successful, 15 skipped, two failed. The extension bundle completed successfully. The native watcher hit shared GraphQL quota; the exact-run REST watcher and final REST inventory supplied the terminal result. No job was rerun.The final exact-head inventory contains 210 completed checks: 163 successful, 42 skipped, one neutral, four failed. Every failed check is classified below; no numbered campaign flake class is assigned without evidence.
checks-node-compact-small-10StateDatabaseCoordinatorContentionErrorafter 5,311/5,283 ms. CI tested merge4b8a7167f6381fe2eed5c0c098df996c2e914f54, combining this head with mainc75457234770789f759079728c1c7406bba72c8f. #152361 added the fixtures; #152377 moved fresh lifecycle acquisition into the worker. The fixtures hold a host coordinator inside interceptedWorker.postMessageuntil the worker operation finishes, so the worker now waits on the fixture-held lock while the fixture awaits worker completion. The responsible owners are SQLite worker lifecycle admission and its plugin-state custody fixture; B changes neither those owners nor their shared test infrastructure.openclaw/ci-gatereviewjob 105857103180reviewjob 105857229968Exact-head ClawSweeper revision 17 found no actionable correctness or security findings (readiness/quality 4/6; proof 5/6). Its native-platform coverage reminder retains the lead’s explicit acceptance of helper-based Windows/launchd coverage plus refreshed Linux proof. Its compatibility reminder is covered by the published 2026.9.4 upgrade/rollback observations and operator-edit preservation below; this round adds no config/default surface. These reminders do not turn the failed CI run green. The PR remains open, non-draft and mergeable, with
mergeable_state=unstable; no landing or Part C work was performed.The accepted Windows finding was a dangling-reference window: generic file restoration removed a candidate-only VBS launcher before native task XML stopped referencing it. The compensation owner now restores the old input bytes, restores and verifies task XML at the primary-reference phase, and only then retires newly introduced files. A failed, interrupted, or unverified XML replacement preserves the new launcher and warns with its path and the backed-up XML to restore before cleanup. Candidate rollback records the same diagnostic as a warning in the existing update result/history surfaces.
/Create /F→ verify/checkpoint through the existing task audit → delete the new VBS launcher. Unchanged primary bytes still require native-reference verification.daemon-reload, including interrupted-reload replay → delete newly introduced environment files.The launchd and systemd ordering contracts were already correct and remain unchanged. No new writer, public option, environment variable, dependency, or SQLite schema was added; receipt shape is unchanged in this round.
Mode audit: the shared publisher already delegates to the installed fs-safe primitive’s temporary-descriptor
chmodbefore rename; systemd independently applies its explicit mode through its temporary descriptor. Launchd plist uses0644; its shell wrapper uses0700; env files, Windows CMD/VBS launchers, and backup receipts use0600. The systemd installer restricts the unit to owner-only bits (normally0600), while receipt restoration preserves the captured mode. This corrects the earlier summary’s0644claim for systemd installation; no mode code changed in round four. Temporary task XML was the missing class and now uses that same atomic publisher with explicit0600. Windows POSIX-mode tests do not claim native ACL coverage.The live prelude’s
0700versus0755failure was the newly created LaunchAgents directory, not a published file. Its fixture now separately proves tightening writable existing directories and preserving private ones, while accounting for umask when creating a new directory. Production directory permissions are not widened. The new mode regression observes temporary-file modes before rename as well as final modes (0600,0644,0700,0755) underumask 077.The lead accepts the four Linux live cells on
9f3902454for this round’s Windows reference-ordering and mode work. The saved addendum follows; its earlier helper-fixture failure is now addressed by the strict-umask test above. Windows/launchd native lifecycle evidence remains helper-based. No landing or Part C work is included.Final-head Linux live addendum — 2026-09-19
Codex reran each of the four requested Linux cells once on unchanged head
9f3902454088a39d2f64e4c371a9f80f3f4a1f97. This refreshes the four Linux flows described in the earlier baseline; Windows/launchd native service-manager coverage remains helper-based. No product source or test source changed (production/test LOC delta: 0/0), no commit or push was made, and Part C was not started.Provider: Blacksmith Testbox, run 35422060057, lease
tbx_01m2vzkxyjbzmgypksj2837sda, pinned to the PR branch. The existing repository wrapper transferred one source-capsule file with targeted sync in 74.611 seconds and verified source tree0005b65637cb74b856d8f7dcfe801437d6da73e9before building. The candidate tarball passed package checks; SHA-256:4004cc5a94001d8c4ab0cb26d3be44325d8c09ba72518c0bd9d5cbe21f4d8f99.The original rig's helper prelude stopped before any live cell: 685 tests passed, one failed, 26 skipped, with the remaining installer-helper group not run. The failure was
launchd install tightens writable bits on launch agent dirs and plistatsrc/daemon/launchd.test.ts:2558: the real filesystem helper inherited the rig'sumask 077, so the newly created LaunchAgents directory was0700, while the assertion expected0755(expected 448 to be 493). The directory owner deliberately removes writable bits without broadening stricter permissions. This fixture assumption is retained as a failure, not converted to a passing test or retried.A single live-only continuation reused the same lease and unchanged verified tarball, asserted that none of the live cells had started, and ran the unchanged cell scripts. Its required one-file targeted sync took 28.591 seconds. No provisioning or sync failure was retried, no helper test was rerun, and no live cell was replayed. The live matrix completed exit 0 in 10m24.419s.
KillMode=mixed,NeedDaemonReload=no. Backup matches the stale original. Changed-key warnings survive outcome, update status, CLI text, and the 1,153-character bounded report.Nice=7editcontrol-group. ExactService.Nicewarning survives the reporting surfaces and 952-character bounded report; candidate is healthy.KillMode=mixed, no pending reload; warning retained in the 1,109-character report.2026.9.4-l685b.0returns healthy. The previous unit and live definition files restore byte-for-byte from backup. EffectiveKillMode=control-group, no pending reload; warning retained in the 1,500-character report.The fault injector waited for the exact run's durable reconciliation warning and verified backup, targeted only its synthetic service account's candidate process, and stopped on package restoration. Each cell used an isolated state directory and a free port. All four database inventories remained unchanged at core schema 17. The target tarball hash was rechecked after the matrix; downloaded terminal outcome JSON independently matches all four run IDs and expected terminal states.
Redacted per-cell proof output:
All four fixture services were stopped and linger disabled. The only lease created for this rerun was stopped, and the provider independently reports completed. The local and remote PR heads were verified unchanged. No landing was performed.
Historical PR B evidence through 9f39024
Codex validation for native publication recovery at
9f3902454088a39d2f64e4c371a9f80f3f4a1f97:e59d648430eafter systemd cleanup (386 daemon, 19 CLI). These runs overlap and are not an additive test count./Createcases refused recovery (after-create, normalized export, and rollback create); interrupted systemd reload broke replay; unchanged native policy restored but had no recorded decision. All six cases pass after the owner fixes, and existing operator-edit refusal cases remain intact.--mode branch --base origin/main --max-priority P1, private DarwinTMPDIR): scoped-clean, no actionable P0/P1 findings, confidence 0.89. The earlier Windows PATH finding was rejected against the actual renderer, which deliberately omits PATH; all nine existing Scheduled Task preservation cases pass, including the hand-edited PATH case.pnpm check:changed --staged --base 0cbbec0272859b4700ce48179fb2c4a96625d576: passed for the exact tree later committed as the current head. Both typechecks, lint, all dead-export scans, storage and boundary guards passed. The earlier unqualifiedpnpm check:changedate59d648430ealso passed. Warning-only line-count advisories in untouchedsrc/cron/service/timer.test.tsandsrc/infra/sqlite-worker-broker.tsremain; no suppression or baseline edit was added. The existing temp-fixture advisory remains because rollback fixtures await database closure.9f3902454088a39d2f64e4c371a9f80f3f4a1f97. All 157 jobs completed: 142 successful, 15 skipped, zero failures. The required native watcher attached to that run, then encountered the shared GraphQL quota; the exact-run REST watcher completed successfully under the lane’s quota fallback. No job was rerun.mergeable_state=unstableat that read. The product CI run above is terminal green, and the subsequent exact-head ClawSweeper review is complete.e59d648430ewas being validated; the native watcher stopped immediately withCONFLICTING, so no completed CI is claimed for that intermediate head. The current head integrates main0cbbec0272859b4700ce48179fb2c4a96625d576: the import-only conflict retains both B’s recovery receipt and main’s Gateway-marker stripping. All 228 affected tests across six files pass after integration (199 daemon, 29 CLI), including the managed child-environment cases. The final B LOC totals are unchanged.a28aa71b565head completed CI run 35415970508 successfully; the native watcher returnedGREENand REST independently confirmed completed/success on that SHA. ClawSweeper then found the late systemd deletion issue below, so that green run is not presented as final-head validation.1657f786ecbhit an unrelated memory-core lock-contention assertion in CI run 35409720880: a workspace-lock timeout appeared where the unchanged test expectedSQLITE_BUSY/LOCKED. The native watcher then stopped withCONFLICTING-MID-WAITafter fix(mac): preserve LaunchAgent bytes and permissions on rollback #152195 landed. No failed job was rerun; the final head integrates that main change.definitionRecovery.unverified; failed compensation remains blocked. All assertions and cases are retained, with a shared receipt-reading test helper keeping the file below its line cap.ClawSweeper revision 13’s late P1 is fixed: an originally absent generated systemd environment file is now removed through the existing receipt-aware
remove()operation during internal compensation. The real installer regression first creates that file, then injects ENOSPC into the following unit write. It failed before the fix withUPDATE_NATIVE_AUTHORITY; it now restores the original unit, records the generated file’s absence, and emits the normal preserved-definition warning. The inline-only sibling and operator-edit refusals remain intact. This fix adds three net production lines and 18 test lines. Compared with the previous atomic-publication report, the PR totals grow by six net production lines and 120 test/support lines after excluding integrated upstream changes.previous, clear pending intent, and resume restoration. Skip another/Createwhen the task already matches its backup.prepared, pin the observed native policy hash, then restore the backed-up XML and launcher bytes.Native steps checked: both installer
/Create /Fpaths and rollback/Create /Fnow prepare receipts. Task/Runand/Endchange runtime state;/ENABLEand/DISABLEremain lifecycle-owned and excluded from the policy comparison, while transactional/Change /TRis disabled. Launchdbootout/unload,enable, andbootstraphave no stale native-policy checksum gate: recovery probes loaded/absent state and unloads a cached job before restoring files. Systemddaemon-reloadnow repeats safely during restoration, including replay after primary-file publication;enable, start, and restart have no receipt-policy acknowledgement window. Existing platform helpers and the new cached-manager regression cover these boundaries.The existing private receipt artifact gains optional
preparedXmlandrecoveredPolicyfacts; there is no SQLite schema, option, environment variable, or dependency change. Older receipts without these facts remain valid. The intended XML is retained because native exports can normalize account names, default fields, and metadata; the existing audit remains the comparison owner. Completed publication clears pending XML, and interrupted recovery retains its observed decision. Published 2026.9.4 rollback continues through its old installer, as described above.Exact-head ClawSweeper revision 15 confirms the prior systemd compensation P1 is fixed and identifies no new actionable code finding: 4/6 overall and patch quality, 5/6 proof confidence. Its native-evidence landing decision remains explicit below. Compatibility is recorded above: no new config/CLI options or SQLite schema change, optional backward-compatible facts in the existing private receipt, and published-driver rollback retains the old installer contract. The attributed native baseline and current receipt regressions are retained; no new native-platform claim is made.
Native Linux lifecycle evidence remains the attributed
fd25b2320baseline below; this follow-up adds local native-boundary helper regressions and CI, not a new Testbox run. Windows/launchd service-manager behavior remains helper-based. No landing or Part C work is included.Historical file-publication follow-up at b566357
Codex validation for the atomic-publication follow-up at
b566357a4153f82a593c10850037b4ca3c33896b:pnpm check:changed: passed. Fresh committed-branch Codex review through the API route, with--mode branch --base origin/main --max-priority P1and private DarwinTMPDIR: scoped-clean, no actionable P0/P1 findings, confidence 0.86. The warning-only temp-fixture advisory remains because the rollback fixtures await database closure before removing their isolated homes.checks-node-compact-small-20: an unimplemented directory stat in the program-argument test and authority revocation tied to the previous temporary-file suffix. The current tests use real directory stats and revoke after the actual asynchronous write, preserving their original assertions. Their 47-test run passes. That run finished with 158 completed jobs: only this test job and the aggregateopenclaw/ci-gatefailed. No failed job was rerun.Data-model compatibility: the follow-up adds no SQLite schema or migration. Its optional
preparedfact belongs to the private backup receipt and is removed when publication is acknowledged; completed installer receipts retain their prior shape. Existing completed-receipt restoration tests and the new serialized interrupted-receipt replay tests pass. The published-driver upgrade and both rollback-owner cells below remain the Linux compatibility evidence, with core schema 17 unchanged; the supported old-runtime agent-database creation is disclosed in that baseline record.Exact-head ClawSweeper revision 9 reports no actionable code findings, 4/6 overall and patch quality, and 5/6 proof confidence. Its compatibility reminder is addressed by the receipt and published-driver evidence above. Its native-proof merge-risk reminder is retained explicitly: this follow-up order requested installer/failure regressions, changed checks, API review, and CI; a new native Testbox run was not performed. The lead must decide that remaining merge risk before landing. No landing is attempted here.
The native Linux Testbox evidence below is from the prior
fd25b2320baseline, not the new atomic-publication head. This follow-up was validated locally with injected filesystem failures and process crashes; Windows/launchd service-manager behavior remains helper-based.Historical PR B proof at fd25b23
Codex validation for
fd25b2320c7d2a592d60dda2c46463e1f1058c4e:pnpm check:changed: passed. Fresh committed-branch review with--mode branch --base origin/main --max-priority P1and private DarwinTMPDIR: scoped-clean. The warning-only temp-fixture advisory is retained because rollback fixtures await canonical asynchronous database closure before removing their homes.SERVICE_DEFINITION_UNKNOWNhid the outer failed-compensation error. The receiver now retainsUPDATE_NATIVE_AUTHORITYand leaves rollback unverified.Baseline-head Linux systemd proof passed in one native command (24m20s, exit 0) on Testbox run 35396907470, lease
tbx_01m2v6pn69qn4sgf13t198mjsq. The wrapper verified tree72d32b36a007fb5dbfdbeed9877c896a76de0d5eand all 77 changed-file hashes before the canonical build and package checks. Tarball SHA-256:8e5516b4a00646fa8da58e7452e4460b6324b2a47eda865824c1ed1970f3b7ab. Remote focused validation passed 660 tests across 16 files, with 26 existing launchd skips; this includes both final regression fixes.KillMode=mixed, no pending daemon reload, healthy runtime. Backup byte-matches the stale definition.Unit.StartLimitBurst,Unit.StartLimitIntervalSec, andService.KillModewarnings survive outcome, status, CLI text, and the 1,050-character bounded report.Nice=7editService.Nicewarning survives every reporting surface; bounded report is 976 characters.2026.9.4-l685b.0restored healthy after 8 scoped crashes. Unit and live definition files restore byte for byte from backup; systemd uses the restoredcontrol-grouppolicy with no reload pending. Warnings persist in the 1,475-character bounded report.Fault injection waits for the durable reconciliation warning and verified backup, targets only the fixture-owned candidate, and stops when the previous package returns. The candidate-owned cell uses the same code in an older-version fixture; the target tarball remains unchanged. Core schema stayed at 17 in all four cells. After published rollback, the restored runtime naturally created an agent database at schema 19, matching the published release’s
OPENCLAW_AGENT_SCHEMA_VERSION; the other three database inventories were unchanged. An extra post-download inventory-equality assertion flagged that supported creation; the original snapshots and its failure are retained. No schema markers were edited, and no update was replayed. These completed observations satisfied the remaining Linux proof reminder in ClawSweeper’s review of that baseline head, which found no additional blocking code defect.All fixture-owned services were stopped, linger was disabled, and every command/download was joined. The Testbox lease was stopped and independently verified completed; the native proof command’s exit 0 above is separate from lease-workflow cleanup.
Sanitized native proof output:
Baseline-head CI run 35396446317 completed successfully: 158 jobs completed, zero failures. The required native watcher also returned
STATUS rollup=green github_rollup=SUCCESS pending=0andGREEN. No failed job was rerun. Earlier CI exposed stale B fixtures and unrelated upstream duplicate declarations; B’s fixture failures were corrected, and the final run is green.Windows and launchd lifecycle evidence is helper-based; no native Windows or launchd service lifecycle claim is made.