Skip to content

fix(update): warn when Git updates replace a live Gateway runtime - #193242

Merged
steipete merged 8 commits into
mainfrom
fix/fix-193163
Nov 5, 2026
Merged

steipete merged 8 commits into
mainfrom
fix/fix-193163

Conversation

@steipete

@steipete steipete commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Related: #193163
Companion: #193190 (merged)

What Problem This Solves

Git updates can replace checkout and runtime files beneath a foreground or custom-supervised Gateway that native service discovery misses, without a specific warning to restart that process.

User Impact

The update continues and warns that the Gateway keeps running its previous runtime and may fail on lazily loaded chunks until restarted. The warning names the PID and installation root when known and gives the next step through the actual service manager or original terminal. It reaches human output, the JSON result, and recorded update history. Positively identified disjoint installations stay silent. The existing replacement monitor may retire a foreground Gateway when its on-disk runtime changes; it still needs a manual relaunch in that case.

Existing refusals for a live owned service that the update did not stop, a discovered overlapping service, and PostgreSQL capture remain intact. Package update behavior is unchanged. No new configuration, schema, dependency, or protocol.

Why This Change Was Made

The existing persisted-owner probe supplies a recoverable advisory to the existing post-stop update step. That step already owns progress output, JSON, and history; no separate warning or service-discovery mechanism was added. The warning is also retained by the existing bounded history codec, so diagnostic floods cannot silently remove its restart instruction. The foreground update.run handoff still parks its parent before publication.

Published-driver × candidate: source inspection of latest stable v2026.10.10 shows that its updater lacks this warning. A fixed candidate cannot change that already-running driver. The compiled-driver × synthetic Git-candidate cells below exercise the new behavior; they are not a published-binary upgrade proof. The reported 0.372-second worker exit is not claimed fixed.

Evidence

  • Red on main: the three unowned-owner cases completed without the warning; managed/disjoint controls passed. Red on the prior PR head: those three cases refused the update. The final merged regression passes all six cases.
  • Final merged owner suites: 58 execution cases and 13 snapshot-retention cases pass, including the six PostgreSQL held/free/SQLite controls. The real synthetic-process case also passes: old PID keeps serving its startup generation while disk advances, then a restarted process serves the new generation. Complete wrapper: 301.58 s; the process case: 10.90 s.
  • Real built Gateway, final second-terminal pnpm openclaw update --yes --json --timeout 600: exit 0 / status ok in 349.915 s. JSON includes PID 91935 and the installation root; persisted history preserves the exact warning with canonical path redaction, and human update status renders it. Manual relaunch changed PID 91935 to 35676 and protocol hello from fixture runtime .2 to .3. The old PID was retired by the existing gateway.installation_replaced policy from fix: restart Gateway after manual package replacement #153078, so the requested old-PID-keeps-serving cell did not pass. No fake build identity was used to suppress it.
  • The real run exposed history compaction dropping the warning at the 16 KiB bound. The codec fix passes 69 compaction/projection/report cases in 60.54 s; its compaction regression fails before the fix.
  • Real foreground update.run also passed end to end in 361.431 s: the handoff recorded foregroundOrigin and completionOwner: gateway-restart, the child exited 0, the run finished succeeded, PID 40401 became 69024, and protocol hello changed from fixture runtime .3 to .4. The child did not treat its own parent as a blocking owner.
  • Full pnpm build passes (final rebuild phase time 3m 56s), as do scoped types/lint, formatting, and all ten final-head baseline ratchets. No test allocation or ceiling increase; the inherited tree is 29 lines above its ceiling and this patch's delta is zero.
  • CI and openclaw/ci-gate passed on cf0af5c74fa646766a7f02b3a485712581a00c2c: exact-head run, 50 successful jobs and 27 skipped.
  • Codex autoreview: scoped-clean through P2 at cf0af5c74fa646766a7f02b3a485712581a00c2c, including the history codec fix, documentation caveat, and shipped replacement-policy context; no actionable findings. Supplied diff/source context reviewed; reviewer did not execute tests.

Production +44/-27 = +17 lines; tests +39/-39 = 0. The test changes retain the managed/disjoint controls and main's shared Git/package retention matrix, reset reused step receipts, preserve filesystem retention proof, and extend the existing bounded-history regression. Only redundant presence/uniqueness assertions were removed.

Local limitation: two existing source-publication heartbeat cases failed with the same OPENCLAW_STATE_LEASE_LOST / state lease heartbeat is not running signature on the original patch and unmodified main. Their tests and timeouts remain unchanged. Platform proof is macOS only; native custom-service/PostgreSQL deployment and published-driver binary upgrade cells are not claimed.

ClawSweeper reviewed this exact head with no findings and no “Before merge” items. Its proof note predates completion of the final terminal/history and foreground evidence above. A published-stable binary upgrade remains unclaimed for the driver/candidate reason above. This PR remains unmerged for maintainer review.

Reuse persisted Gateway ownership at the Git publication boundary so an
unmanaged live consumer is refused before checkout or runtime replacement.
Keep database capture and rollback in the existing transaction, preserve
owned-service stopping and disjoint installations, and document that the
installed updater must contain the repair.

Refs #193163.
@clawsweeper

clawsweeper Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@steipete
steipete marked this pull request as ready for review November 5, 2026 06:11
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation cli CLI command changes labels Nov 5, 2026
@steipete

steipete commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-05T07:56:52.240135Z cf0af5c New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 5, 2026
@clawsweeper

clawsweeper Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR warns when Git updates replace files used by an undiscovered Gateway and preserves that warning in update history.

Example: A foreground Gateway uses /opt/openclaw while another terminal runs a Git update.

  • Before: The update can replace runtime files without a specific warning to relaunch that Gateway.
  • After: The update warns about the previous runtime and missing chunks, identifies the PID when available, and explains how to restart.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The focused patch appears correct and has relevant regression coverage, but supplied product verification is incomplete and the broader linked issue remains only partly addressed.
Proof confidence 🦐 gold shrimp (3/6) Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Partial
User problem: An operator can finish a Git update without knowing that an undiscovered Gateway needs relaunching after its runtime files change.
Reason: The maintainer-authored direction provides actionable recovery guidance at low cost, while correctly using Related for the broader issue.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it adds a useful warning missing from main, preserves existing refusal paths, and has no identified code defects.

Priority: P2
Reviewed head: cf0af5c74fa646766a7f02b3a485712581a00c2c

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: Complete final-head terminal/history verification and a latest-stable upgrade with settings and data intact; supplied red/green regressions support these scenarios but do not replace them.
Agent review details

How this fits together

The update CLI checks installation consumers before publication, then sends step advisories to terminal output, JSON results, and the bounded SQLite update ledger.

flowchart TD
  A[Git update CLI] --> B[Publication checks]
  B --> C[Persisted Gateway owner]
  B --> D[Managed service guards]
  B --> E[Post stop advisory]
  E --> F[Terminal and JSON]
  E --> G[Bounded update history]
Loading

Technical review

Best possible solution:

Keep the warning in the existing publication advisory and ledger owners while preserving package, managed-service, and database safeguards.

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

Source establishes the missing-warning path on current main, and the PR reports a real built-Gateway CLI run; no target code was executed during this review.

Is this the best way to solve the issue?

The patch is a small, coherent fix for the warning omission, using existing owners without claiming to repair the broader shutdown failure.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 97b24c9d15d5.

Provenance checked

  • Persisted-owner package refusal keeps the original intent (304088c: Prevent package replacement over live or unverifiable owners when native service inspection fails.)
  • Publication checks and activation receipts keeps the original intent (6e06137: Simplify lifecycle bookkeeping while retaining activation checks and live execution authority.)
  • Bounded history warning retention keeps the original intent (5b5b32c: Prevent important recovery warnings from disappearing under the ledger byte budget.)
  • Snapshot retention regression keeps the original intent (c1579cf: Keep unrestorable snapshots available after successful activation; the retained filesystem assertions still verify that contract.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Mitchell Etzel: Raw commit 1db0343 adds src/cli/update-cli/update-command-execution.ts:525 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 1db0343a0c0d; files: src/cli/update-cli/update-command-execution.ts)

PR surface

Source +17, Tests 0, Docs +12. Total +29 across 9 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 4 44 27 +17
Tests 4 39 39 0
Docs 1 12 0 +12
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 9 95 66 +29

Preflight source

Source 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

Metric Value Why it matters
Production versus test delta Production +44/-27; tests and support +39/-39 The 17-line production increase reuses existing inspection, advisory, and compaction owners; regression coverage adds no net test lines.

Labels

Label changes:

  • add P2: This is a focused diagnostic improvement for advanced Git installations; the broader availability defect remains separately tracked.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit. Replaced prior rating: 🦪 silver shellfish.
  • remove P1: Current review triage priority is P2, so this older priority label is no longer current.
  • remove rating: 🦪 silver shellfish: Current PR rating is rating: 🦐 gold shrimp, so this older rating label is no longer current.
  • remove merge-risk: 🚨 compatibility: Current PR review selected no merge-risk labels.

Label justifications:

  • P2: This is a focused diagnostic improvement for advanced Git installations; the broader availability defect remains separately tracked.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit. Replaced prior rating: 🦪 silver shellfish.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (2 earlier review cycles)
  • reviewed 2026-11-05T06:15:15.385Z sha 8f6f3f7 :: needs maintainer review before merge. :: none
  • reviewed 2026-11-05T06:26:54.006Z sha a2a765b :: needs maintainer review before merge. :: none

Reviewed November 5, 2026, 2:59 AM ET / 07:59 UTC (Revision 3).

@steipete

steipete commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added P1 High-priority user-facing bug, regression, or broken workflow. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 5, 2026
steipete added a commit that referenced this pull request Nov 5, 2026
…, when PostgreSQL backup cannot run (#193190)

Related: #193163
Companion: #193242

## What Problem This Solves

`openclaw update` can replace a serving installation before discovering that PostgreSQL backup cannot acquire exclusive state ownership, for example when a custom service owns the Gateway.

## User Impact

The update now refuses with `database-engine-preflight` before activation when PostgreSQL capture cannot acquire ownership. The previous installation remains unchanged and the Gateway keeps serving. The message names the next step: stop the Gateway through its service owner, then rerun `openclaw update`.

Stopped-service updates still proceed, and updates with no PostgreSQL family keep their existing behavior. This preserves the update contract: refuse only for the named backup-ownership risk, preserve the previous Gateway on refusal, and provide an actionable retry path.

## Why This Change Was Made

The shared pre-activation callback probes the same ownership used by database capture. The actual backup still reacquires and checks ownership after activation; a Gateway starting between the two checks retains the existing backup-time refusal. This change deliberately does not introduce a new custody protocol.

This is the narrow PostgreSQL part of #193163. A separate companion handles the generic Git persisted-owner check; neither change claims to reproduce or fix the reported 0.372-second worker exit or missing-chunk shutdown chain. The installed updater must contain this repair; when upgrading with an older driver, stop the unmanaged Gateway first.

The original commits and contributor credit remain with @etzelm. The maintainer follow-up merges main without rewriting that history and consolidates existing capture fixtures.

## Evidence

- On main `69d6eae050e`, the six preflight scenarios produce exactly two intended failures: Git and package updates replace the install while PostgreSQL ownership is held. Both stopped-service controls and both SQLite held-ownership controls pass. Vitest 22.99 s; complete command 128.95 s including compilation.
- With the fix, 68 focused tests pass across update execution and capture/retention. Complete command 148.48 s; the execution suite checks refusal before mutation, the next-step message, service stopping, and unchanged non-PostgreSQL behavior. The retention suite still exercises both real transaction owners, snapshot cleanup, late-write retention, first-writer diagnostics, and package rollback.
- Scoped lint, update-CLI typechecking, formatting, and all baseline/line-cap ratchets pass. The shared test ceiling is unchanged; the allocation is removed. Production +51/-13 = +38 lines for the shared probe and call site; tests +139/-140 = -1 line.
- Independent Codex autoreview: scoped-clean through P2 for `69d6eae050e` → `b4fc5cda32dc1228a5a11400b41a4da8b6d8c011`; no accepted/actionable findings. The review inspected supplied source and did not run tests.

Limitations: macOS local boundary proof with synthetic I/O, not an end-to-end PostgreSQL deployment or native custom LaunchDaemon. The earlier real serving-process Git proof belongs to the companion scope. No inference model is involved in this maintenance-path proof.

ClawSweeper reviewed `b4fc5cda32dc1228a5a11400b41a4da8b6d8c011`: no code findings; its remaining hold requests real CLI/PostgreSQL/latest-stable and stored-data compatibility proof. Those environment/upgrade cells remain unrun; this PR changes no schema or data format.

Exact-head [CI](https://github.com/openclaw/openclaw/actions/runs/41975816063) and `openclaw/ci-gate` passed, including all three PostgreSQL conformance shards. This adds Linux conformance coverage, not the unrun custom-service/upgrade scenario.

Co-authored-by: Mitchell Etzel <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>
Continue for live or unverifiable persisted owners that native service discovery misses. Record PID, root, and restart guidance through the existing update advisory, JSON result, and history. Preserve package and managed-service refusal behavior.

Related: #193163
# Conflicts:
#	src/cli/update-cli/update-command-database-retention.test.ts
#	src/cli/update-cli/update-command-execution.test.ts
@steipete steipete changed the title fix(update): Git updates replace files under an undiscovered live Gateway fix(update): warn when Git updates leave a foreground Gateway running Nov 5, 2026
@steipete

steipete commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 5, 2026
@steipete steipete changed the title fix(update): warn when Git updates leave a foreground Gateway running fix(update): warn when Git updates replace a live Gateway runtime Nov 5, 2026
@steipete
steipete merged commit af7ea2b into main Nov 5, 2026
153 of 156 checks passed
@steipete
steipete deleted the fix/fix-193163 branch November 5, 2026 08:31
@steipete

steipete commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 6, 2026
…, when PostgreSQL backup cannot run (openclaw#193190)

Related: openclaw#193163
Companion: openclaw#193242

## What Problem This Solves

`openclaw update` can replace a serving installation before discovering that PostgreSQL backup cannot acquire exclusive state ownership, for example when a custom service owns the Gateway.

## User Impact

The update now refuses with `database-engine-preflight` before activation when PostgreSQL capture cannot acquire ownership. The previous installation remains unchanged and the Gateway keeps serving. The message names the next step: stop the Gateway through its service owner, then rerun `openclaw update`.

Stopped-service updates still proceed, and updates with no PostgreSQL family keep their existing behavior. This preserves the update contract: refuse only for the named backup-ownership risk, preserve the previous Gateway on refusal, and provide an actionable retry path.

## Why This Change Was Made

The shared pre-activation callback probes the same ownership used by database capture. The actual backup still reacquires and checks ownership after activation; a Gateway starting between the two checks retains the existing backup-time refusal. This change deliberately does not introduce a new custody protocol.

This is the narrow PostgreSQL part of openclaw#193163. A separate companion handles the generic Git persisted-owner check; neither change claims to reproduce or fix the reported 0.372-second worker exit or missing-chunk shutdown chain. The installed updater must contain this repair; when upgrading with an older driver, stop the unmanaged Gateway first.

The original commits and contributor credit remain with @etzelm. The maintainer follow-up merges main without rewriting that history and consolidates existing capture fixtures.

## Evidence

- On main `6df4b062a20`, the six preflight scenarios produce exactly two intended failures: Git and package updates replace the install while PostgreSQL ownership is held. Both stopped-service controls and both SQLite held-ownership controls pass. Vitest 22.99 s; complete command 128.95 s including compilation.
- With the fix, 68 focused tests pass across update execution and capture/retention. Complete command 148.48 s; the execution suite checks refusal before mutation, the next-step message, service stopping, and unchanged non-PostgreSQL behavior. The retention suite still exercises both real transaction owners, snapshot cleanup, late-write retention, first-writer diagnostics, and package rollback.
- Scoped lint, update-CLI typechecking, formatting, and all baseline/line-cap ratchets pass. The shared test ceiling is unchanged; the allocation is removed. Production +51/-13 = +38 lines for the shared probe and call site; tests +139/-140 = -1 line.
- Independent Codex autoreview: scoped-clean through P2 for `6df4b062a20` → `b4fc5cda32dc1228a5a11400b41a4da8b6d8c011`; no accepted/actionable findings. The review inspected supplied source and did not run tests.

Limitations: macOS local boundary proof with synthetic I/O, not an end-to-end PostgreSQL deployment or native custom LaunchDaemon. The earlier real serving-process Git proof belongs to the companion scope. No inference model is involved in this maintenance-path proof.

ClawSweeper reviewed `b4fc5cda32dc1228a5a11400b41a4da8b6d8c011`: no code findings; its remaining hold requests real CLI/PostgreSQL/latest-stable and stored-data compatibility proof. Those environment/upgrade cells remain unrun; this PR changes no schema or data format.

Exact-head [CI](https://github.com/openclaw/openclaw/actions/runs/41975816063) and `openclaw/ci-gate` passed, including all three PostgreSQL conformance shards. This adds Linux conformance coverage, not the unrun custom-service/upgrade scenario.

Co-authored-by: Mitchell Etzel <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 6, 2026
…enclaw#193242)

* fix(update): preserve live Git runtimes missed by service discovery

Reuse persisted Gateway ownership at the Git publication boundary so an
unmanaged live consumer is refused before checkout or runtime replacement.
Keep database capture and rollback in the existing transaction, preserve
owned-service stopping and disjoint installations, and document that the
installed updater must contain the repair.

Refs openclaw#193163.

* fix(update): preserve the original command in publication refusal guidance

* fix(update): warn when Git updates leave a Gateway running

Continue for live or unverifiable persisted owners that native service discovery misses. Record PID, root, and restart guidance through the existing update advisory, JSON result, and history. Preserve package and managed-service refusal behavior.

Related: openclaw#193163

* docs(update): note foreground runtime replacement retirement

* fix(update): retain publication warnings in update history
RomneyDa added a commit that referenced this pull request Nov 17, 2026
…, when PostgreSQL backup cannot run (#193190)

Related: #193163
Companion: #193242

## What Problem This Solves

`openclaw update` can replace a serving installation before discovering that PostgreSQL backup cannot acquire exclusive state ownership, for example when a custom service owns the Gateway.

## User Impact

The update now refuses with `database-engine-preflight` before activation when PostgreSQL capture cannot acquire ownership. The previous installation remains unchanged and the Gateway keeps serving. The message names the next step: stop the Gateway through its service owner, then rerun `openclaw update`.

Stopped-service updates still proceed, and updates with no PostgreSQL family keep their existing behavior. This preserves the update contract: refuse only for the named backup-ownership risk, preserve the previous Gateway on refusal, and provide an actionable retry path.

## Why This Change Was Made

The shared pre-activation callback probes the same ownership used by database capture. The actual backup still reacquires and checks ownership after activation; a Gateway starting between the two checks retains the existing backup-time refusal. This change deliberately does not introduce a new custody protocol.

This is the narrow PostgreSQL part of #193163. A separate companion handles the generic Git persisted-owner check; neither change claims to reproduce or fix the reported 0.372-second worker exit or missing-chunk shutdown chain. The installed updater must contain this repair; when upgrading with an older driver, stop the unmanaged Gateway first.

The original commits and contributor credit remain with @etzelm. The maintainer follow-up merges main without rewriting that history and consolidates existing capture fixtures.

## Evidence

- On main `69d6eae050e`, the six preflight scenarios produce exactly two intended failures: Git and package updates replace the install while PostgreSQL ownership is held. Both stopped-service controls and both SQLite held-ownership controls pass. Vitest 22.99 s; complete command 128.95 s including compilation.
- With the fix, 68 focused tests pass across update execution and capture/retention. Complete command 148.48 s; the execution suite checks refusal before mutation, the next-step message, service stopping, and unchanged non-PostgreSQL behavior. The retention suite still exercises both real transaction owners, snapshot cleanup, late-write retention, first-writer diagnostics, and package rollback.
- Scoped lint, update-CLI typechecking, formatting, and all baseline/line-cap ratchets pass. The shared test ceiling is unchanged; the allocation is removed. Production +51/-13 = +38 lines for the shared probe and call site; tests +139/-140 = -1 line.
- Independent Codex autoreview: scoped-clean through P2 for `69d6eae050e` → `b4fc5cda32dc1228a5a11400b41a4da8b6d8c011`; no accepted/actionable findings. The review inspected supplied source and did not run tests.

Limitations: macOS local boundary proof with synthetic I/O, not an end-to-end PostgreSQL deployment or native custom LaunchDaemon. The earlier real serving-process Git proof belongs to the companion scope. No inference model is involved in this maintenance-path proof.

ClawSweeper reviewed `b4fc5cda32dc1228a5a11400b41a4da8b6d8c011`: no code findings; its remaining hold requests real CLI/PostgreSQL/latest-stable and stored-data compatibility proof. Those environment/upgrade cells remain unrun; this PR changes no schema or data format.

Exact-head [CI](https://github.com/openclaw/openclaw/actions/runs/41975816063) and `openclaw/ci-gate` passed, including all three PostgreSQL conformance shards. This adds Linux conformance coverage, not the unrun custom-service/upgrade scenario.

Co-authored-by: Mitchell Etzel <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>

(cherry picked from commit 1db0343)

Stable adaptation: preserve v2026.11.5 capture/boot-write settlement and existing retention fixtures; share only capture ownership acquisition with the pre-activation check. Allocate 69 net regression lines without importing later cohort/rollback features.

Co-authored-by: RomneyDa <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. cli CLI command changes docs Improvements or additions to documentation merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P1 High-priority user-facing bug, regression, or broken workflow. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: S 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