Skip to content

fix(update): preserve compatible state when switching to npm stable - #144155

Merged
steipete merged 10 commits into
mainfrom
codex/update-stress-compat
Sep 11, 2026
Merged

steipete merged 10 commits into
mainfrom
codex/update-stress-compat

Conversation

@steipete

@steipete steipete commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

Closes #144132

What Problem This Solves

Fixes an issue where users switching a fresh main installation to an npm stable could receive a refusal or finish with a Gateway that could not start. A preview could also leave subsequent updates blocked. Concurrent first-use updates could fail with unreadable executor state, and installations without optional fs-safe bindings could fail before installing a replacement.

Why This Change Was Made

Recording history first initialized fresh profiles with main's newer database schema. The selected target now initializes fresh state before the first durable history write; previews remain read-only, the selected package stages once, and existing database compatibility is checked before activation. Target selection follows the owned service profile, final Doctor uses the admitted runtime and Node executable, and inherited diagnostic IDs remain consistent across executor and history.

The existing control-store owner exclusively creates one private canonical file and lets SQLite commit its schema atomically. Ordinary lease inspection recognizes an empty first-use schema as having no lease; malformed or populated foreign schemas remain unreadable. Concurrent writers use the same inode. Windows applies a protected ACL at exclusive creation. This removes the native-only publication prerequisite while retaining the same path, schema, claim transactions, and existing empty-file recovery. Current main's repair for older interrupted files with excess read permissions is retained, including when such a writer wins creation; unsafe ownership, links, directories, and write permissions remain rejected.

The normal parent prepares and pins the control database before starting a sealed helper. That helper operates only on its admitted existing database and cannot recreate missing or empty state. Failure recovery now carries the active update run into the existing executor-aware service owner. Terminal results wait for cleanup and settlement, preserving the original failure and CLI exit code.

The scoped OpenGrep correction tracks actual skill input into host environment writes and clears only consumed sanitizer output. Trusted service environment restoration is not skill input. Scoped regeneration validates the candidate pack and preserves unrelated rules and bytes; no source-path exclusions or ignored test fixtures were added.

User Impact

Compatible fresh installations can switch to the tested npm stables and start a healthy Gateway while preserving configuration, workspace selection, and source checkouts. Existing data newer than the selected release remains protected by an explicit refusal before replacement. Current main's native-service capability checks also remain: unsupported managed-service targets refuse before service stop or activation. There is no reverse migration, schema-version bump, new configuration, dependency, or storage location. Selected-target initialization can remain after a later refusal; the updater does not delete that state.

The maintainer accepted target-owned fresh initialization, atomic first initialization of the existing control store, and the scanner correction. The final implementation preserves those ownership and recovery contracts and the supported native-optional installation path. Release-note context is maintained here; CHANGELOG.md is release-owned.

Evidence

Current candidate: b3b061117a9948ce5c08949f7b120b210ca16843. Exact-head CI passed: 126 successful jobs, 11 intentional skips, and zero failures. The security-sensitive guard also passed after one infrastructure retry for a GitHub HTTP 500. Subsequent changes are confined to five test/test-support files: all 480 shared CLI tests, 66 merge-workflow tests, 27 Doctor sibling/process cases and the final six process-settlement cases pass, with clean selected checks and independent P0–P2 reviews. The helper accepts cooperative cleanup only after a successful root exit; forced/uncertain/signaled outcomes remain rejected. The reclamation benchmark now excludes client/runtime setup and passed its full 200,000-row deletion with a 190ms maximum gap, retaining the 500ms threshold and all assertions. Original CI diagnostics do not establish the exact cause of its discarded child result or timing spike; those limits remain recorded. No runtime source changed after the live-tested revision below.

The final production matrix passed 26/26 on 934e8b778690c84b3429efa3a9279ed8850a726b: four parallel artifact modes, eleven fresh transitions (the ten plain stables through 2026.9.4 plus legacy 2026.6.11), and eleven existing-state cases. This produced sixteen successful updates and ten safe refusals, all with real Doctor/Gateway health, authored configuration and source preservation, one private single-link control store, and the inherited diagnostic-ID regression passing. The full tree and 69 changed-file hashes were verified; the downloaded archive has SHA-256 80bc196f408694b76ae4d340fb93481c1a33f4c20927e4dd63d48c14f9923dba. The lease was stopped and verified completed. All subsequent changes are test fixtures/support and are explicitly distinguished from this recorded-source proof.

Actual pinned-dependency npm ci --omit=optional fixtures reproduced the original helper-unavailable failure and passed with the corrected real database/lease owners. Node and installed Bun probes covered first creation and non-mutating empty reads. Native Windows proof passed 23 publication/privacy tests plus independent addon-free package checks for first use, eight competing writers, crash recovery, held-writer waiting, sealed missing/replaced-state rejection, and protected owner/SYSTEM/Administrators-only ACLs. Source and fixture hashes were verified, and the lease was stopped. The Windows private-file creator is unchanged by the subsequent POSIX-only legacy-permission integration.

Focused proof includes 91 publication/database/executor/sealed cases, the final CLI recovery-command regression, and 51 merged-main publication/permission/custody cases. The exclusive-create legacy-winner case fails on the prior owner and passes with same-inode recovery. The two recovery-caller tests fail without the active-run arguments. Relevant types, lint, unused-export checks, schema/legacy-store/import-cycle guards, and formatting passed across retained full and targeted receipts. Independent reviews resolved all accepted actionable findings; mechanical test portability corrections retain exact Windows refusal and preservation assertions.

Earlier 26-case campaign, second 26-case campaign, and three-case canary passed at their recorded source revisions. Their archives, full-tree identities, and changed-file hashes are retained; they are not mislabeled as final-head proof. Scanner evidence includes 32 fixtures, ten compiler tests, and a validated 145-rule pack with all 144 unrelated rules unchanged.

Earlier CI failures exposed the Windows descriptor issue, stale staged-runtime fixtures, a recovery-command expectation, and missing platform/API test adapters; those were repaired. Unrelated mock-UI geometry and cron timing failures remain recorded separately. No baseline, timeout, assertion, or CI gate was weakened. The reported published 9.3 macOS standalone update repair/parent-activation error was not reproduced and is not claimed fixed by this PR.

Final maintainer review resolves the remaining automated checklist: the custom-artifact refusal and retained target-created state are within the accepted, documented compatibility boundary; the ledger keeps existing table/schema contracts; and the eleven existing-state cases establish compatible update versus safe refusal. The live archives were downloaded and independently hash-verified before lease cleanup. The automated reviewer could not retrieve those traces, which is recorded as its access limitation. Its final review of b3b061117a9948ce5c08949f7b120b210ca16843 found no actionable code or security defect.

@steipete steipete self-assigned this Sep 10, 2026
@clawsweeper

clawsweeper Bot commented Sep 10, 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 cli CLI command changes size: XL maintainer Maintainer-authored PR labels Sep 10, 2026
@steipete
steipete marked this pull request as ready for review September 10, 2026 15:43
@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. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 10, 2026
@clawsweeper

clawsweeper Bot commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 11, 2026, 4:41 PM ET / 20:41 UTC (Revision 13).

ClawSweeper review

What this changes

The PR lets selected releases initialize compatible fresh-profile state before update history, repairs update-lock initialization and recovery, and corrects the skill-environment security scanner.

Warning

SQLite table change

This PR modifies persisted SQLite tables in src/infra/update-run-ledger.ts. Prefer a design that avoids changing persisted SQLite tables. If the change is necessary, verify migration and upgrade compatibility against an existing database before merge.

Merge readiness

⛔ Blocked before merge - 3 items remain

Keep open: this remains a useful fix for fresh-profile transitions to older stable releases. The prior blockers are resolved, and this review found no new actionable defect; the latest commit changes only tests.

Priority: P1
Reviewed head: b3b061117a9948ce5c08949f7b120b210ca16843

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The patch addresses the owning invariants with strong recorded runtime proof, resolved prior findings, and no newly identified blocking defect.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (linked_artifact): The captured report ties the changed updater and control-store owners to 26 real update cases with observed Gateway health or safe refusal, plus addon-free and Windows recovery/privacy checks. Runtime source is unchanged since that proof revision; blocked trace retrieval is a reviewer limitation.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (linked_artifact): The captured report ties the changed updater and control-store owners to 26 real update cases with observed Gateway health or safe refusal, plus addon-free and Windows recovery/privacy checks. Runtime source is unchanged since that proof revision; blocked trace retrieval is a reviewer limitation.
Evidence reviewed 10 items Pinned patch and review continuity: The comparison against the previous reviewed head contains only the new Doctor process-settlement test, its test helper, and the Gateway deletion benchmark adjustment. Comparing against the recorded live-tested revision identifies five test/test-support files and no runtime changes.
Current main still admits history first: Current main admits the update run before target selection and schema preflight. The ledger bootstraps missing databases using the invoking runtime, so an explicit older stable target can still encounter the reported mismatch.
Latest release does not contain the new admission flow: The v2026.9.4 source also admits history first. Its state schema is 17, so that release being compatible with current main does not resolve transitions to older schema-16 or schema-1 targets.
Findings None None.
Security None None.

How this fits together

The updater selects a package, checks its compatibility with profile data, and coordinates installation and Gateway restart. Its installation lock remains separate from the profile database so replacing the runtime cannot invalidate update ownership.

flowchart TD
  A[Update request and profile] --> B[Select and stage package]
  B --> C{Compatible state and runtime?}
  C -->|No| D[Refuse and preserve installation]
  C -->|Fresh profile| E[Selected release initializes state]
  E --> F[Record update history]
  C -->|Existing compatible profile| F
  F --> G[Activate and verify Gateway]
  H[Live installation lock] --> E
  H --> G
Loading

Before merge

  • Resolve merge risk (P1) - Fresh-profile custom artifacts without schema declarations now refuse and require a declared artifact or exact published release; target-created state can remain after a later refusal. These operator-visible effects are documented and accepted.
  • Resolve merge risk (P1) - The review environment could not retrieve the linked Testbox traces, so runtime observations rely on the captured source-specific proof report rather than independently downloaded logs.
  • Add data-model compatibility proof - Confirm migration or upgrade compatibility proof before merge.
Agent review details

Security

None.

PR surface

Source +1195, Tests +3256, Docs +82, Config 0, Other +450. Total +4983 across 73 files.

View PR surface stats
Area Files Added Removed Net
Source 26 1703 508 +1195
Tests 33 3554 298 +3256
Docs 6 89 7 +82
Config 1 1 1 0
Generated 0 0 0 0
Other 7 464 14 +450
Total 73 5811 828 +4983

Review metrics

Metric Value Why it matters
Runtime versus regression coverage Runtime production net +1,195 lines; tests and fixtures net +3,432 lines Production growth supports target-owned initialization and retained staging; the larger test delta covers cross-version, concurrency, refusal, and recovery contracts.

Stored data model

Persistent data-model change detected: database schema: src/infra/update-run-ledger.ts, migration/backfill/repair: src/cli/update-cli/update-command-fresh-doctor.ts, migration/backfill/repair: src/cli/update-cli/update-command-run.ts, serialized state: security/opengrep/compile-rules.mjs, unknown-data-model-change: security/opengrep/compile-rules.mjs, unknown-data-model-change: src/infra/update-run-ledger.ts. Confirm migration or upgrade compatibility proof before merge.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #144132
Summary: This PR is the implementation candidate for fresh-profile schema incompatibility; the merged control-store permission repair overlaps only part of its supporting recovery work.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge-risk options

Maintainer options:

  1. Retain the accepted compatibility boundary (recommended)
    Keep the documented artifact refusal and retained target-state behavior supported by the recorded fresh-profile and existing-state matrix.

Technical review

Best possible solution:

Keep the accepted target-owned bootstrap, schema-preserving history, and live installation ownership together, preserving the documented refusal and recovery boundaries.

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

Yes, from source: a fresh main profile targeting 2026.9.3 admits schema-17 history before checking the schema-16 target. The linked issue supplies a pinned reproduction; no target code was executed during this review.

Is this the best way to solve the issue?

Yes: letting the selected runtime initialize state fixes the incompatible-state producer while reusing the existing ledger, package transaction, and installation-lock owners.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 0f0ddbc12ca0.

Labels

Label justifications:

  • P1: The fix addresses updates that can create incompatible state and leave the selected Gateway unable to start.
  • merge-risk: 🚨 compatibility: Fresh custom artifacts without schema metadata now refuse, and target initialization may persist after a later refusal.
  • 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 (linked_artifact): The captured report ties the changed updater and control-store owners to 26 real update cases with observed Gateway health or safe refusal, plus addon-free and Windows recovery/privacy checks. Runtime source is unchanged since that proof revision; blocked trace retrieval is a reviewer limitation.
  • proof: sufficient: Contributor real behavior proof is sufficient. The captured report ties the changed updater and control-store owners to 26 real update cases with observed Gateway health or safe refusal, plus addon-free and Windows recovery/privacy checks. Runtime source is unchanged since that proof revision; blocked trace retrieval is a reviewer limitation.

Evidence

What I checked:

  • Pinned patch and review continuity: The comparison against the previous reviewed head contains only the new Doctor process-settlement test, its test helper, and the Gateway deletion benchmark adjustment. Comparing against the recorded live-tested revision identifies five test/test-support files and no runtime changes. (src/commands/doctor-update.child-process.test.ts:19, b3b061117a99)
  • Current main still admits history first: Current main admits the update run before target selection and schema preflight. The ledger bootstraps missing databases using the invoking runtime, so an explicit older stable target can still encounter the reported mismatch. (src/cli/update-cli/update-command.ts:128, 0f0ddbc12ca0)
  • Latest release does not contain the new admission flow: The v2026.9.4 source also admits history first. Its state schema is 17, so that release being compatible with current main does not resolve transitions to older schema-16 or schema-1 targets. (src/cli/update-cli/update-command.ts, 3a9d69db306c)
  • Target-owned initialization: Fresh profiles branch before ledger admission; older targets initialize through their Doctor before run registration. Previews avoid initialization, while staged artifacts require declared schema support and retain one staged package. (src/cli/update-cli/update-command.ts:97, b3b061117a99)
  • Prior publication blockers resolved: The database owner now exclusively creates a private read/write file and initializes SQLite on that inode without native-only publication. Windows applies the protected ACL during creation. Existing-identity helpers reject replacement or missing state and recheck identity at transaction commit. (src/infra/update-managed-service-handoff-database.ts:109, b3b061117a99)
  • Recorded real behavior proof: The captured PR body reports 26/26 production cases at 934e8b7: 16 successful updates and 10 safe refusals, including Doctor/Gateway health and configuration/source preservation. It separately records addon-free and native Windows first-use, concurrency, crash-recovery, ACL, and sealed-state rejection proof. The linked Testbox workflows ended cancelled after lease shutdown; their workflow status is not treated as a test result. Log retrieval redirected to a blocked artifact host, preventing independent inspection of retained traces in this review. (934e8b778690)

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)
  • fuller-stack-dev: 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 (12 earlier review cycles; latest 8 shown)
  • reviewed 2026-09-11T16:20:21.745Z sha 69dd595037540cf5f609a0a61464a2bfd5333c87 :: blocked before merge. :: [P1] [P1] Open the staging database with write access before fsync
  • reviewed 2026-09-11T17:11:22.800Z sha b5f8693f586b120d62c843f40f1e1a0e997a3bc4 :: blocked before merge. :: [P1] [P1] Open the staging database with write access before fsync
  • reviewed 2026-09-11T17:46:26.795Z sha 01c050cd34024b8da3740fa5758259c7fd255b93 :: blocked before merge. :: [P1] [P1] Preserve updates when optional native bindings are absent
  • reviewed 2026-09-11T18:24:14.753Z sha f9f961b :: blocked before merge. :: [P1] [P1] Preserve first-use updates without optional native bindings
  • reviewed 2026-09-11T18:33:23.358Z sha f9f961b :: blocked before merge. :: [P1] [P1] Preserve first-use updates without optional native bindings
  • reviewed 2026-09-11T19:04:32.214Z sha d96f455 :: blocked before merge. :: none
  • reviewed 2026-09-11T19:20:24.159Z sha 934e8b7 :: blocked before merge. :: none
  • reviewed 2026-09-11T19:58:15.865Z sha 13ccc03 :: blocked before merge. :: none

@olveww-dot

Copy link
Copy Markdown

补充一个 macOS + npm global 路径的复现数据点(不在本 PR 描述的 Linux worktree 路径里),方便验证矩阵:

环境:macOS (Apple silicon),npm i -g [email protected] --allow-scripts=openclaw,无 --no-restart。

复现(9.2 → 9.3 升级窗口):

  1. 9.3 报 Node 24.15.0 is too old for [email protected],要求 >=24.16.0。升级 Node 到 26.8.2 后 preflight 通过。
  2. 升级成功,但留下 stale activeRun 4522d0f4-49e0-4e5b-abf8-0e1f7872d64d(identityless,无 driver,79h 无活动)。
  3. openclaw update repair --yes 反复失败:Doctor could not enter maintenance. Error: The update parent owns Gateway activation.——无论 Gateway 在跑还是停都报这一行(停 Gateway → 独立 shell 跑 repair → 同样错)。
  4. 文档承诺的 supersede 路径(openclaw update 触发 stale row 清理)实际走 already-current early-return,不进入 supersede 分支。
  5. 当前状态:升级本身成功(9.3 跑着,4 个官方插件对齐,re2 按新 ABI 重编译),只剩这条 stale run 显示残留。

疑似同源(与本 PR 的修复方向):dist/doctor-maintenance-DHVCgpqd.mjs 里的

if (parentActivation !== undefined && inspection.serviceUpdateVerdict?.kind !== "absent" && inspection.offline !== true)
  throw new Error("The update parent owns Gateway activation...")

看起来正好在 update-lifecycle fence 域内——本 PR 改 fresh-state initialization 时若动了 serviceUpdateVerdict 的判断或 parentActivation 的解析路径,可能顺带解掉我们这条死锁。

如有需要可让我跑任何额外 repro 命令。

@steipete
steipete force-pushed the codex/update-stress-compat branch from 4f0d9a4 to 63e7080 Compare September 10, 2026 17:34
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 10, 2026
@vincentkoc vincentkoc self-assigned this Sep 11, 2026
@steipete
steipete force-pushed the codex/update-stress-compat branch from 01ddc18 to 69dd595 Compare September 11, 2026 16:10
@openclaw-barnacle openclaw-barnacle Bot added the security Security documentation label Sep 11, 2026
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 11, 2026
@openclaw-barnacle openclaw-barnacle Bot added the gateway Gateway runtime label Sep 11, 2026
@steipete
steipete force-pushed the codex/update-stress-compat branch from bfcc52a to b5f8693 Compare September 11, 2026 17:02
@openclaw-barnacle openclaw-barnacle Bot removed the gateway Gateway runtime label Sep 11, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

@olveww-dot I checked the current PR head against this report. A normal update admits its history run before target execution and the already-current decision; admission requests stale identityless-run supersession when it is a new operator invocation. The current abandonment/recovery suite passes all 60 cases, including stale requested/staging runs and preservation of protected live or inherited runs. See admission ordering and supersession selection.

That establishes the current source behavior; it does not reproduce the published 9.3 macOS standalone update repair failure. This PR's fresh-state initialization fix should not be presented as proof that the separate repair/parent-activation error is resolved. The macOS report remains a distinct reproduction gap, and no live operator state was modified for these checks.

@steipete
steipete force-pushed the codex/update-stress-compat branch from f9f961b to d96f455 Compare September 11, 2026 18:57
@clawsweeper clawsweeper Bot added status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 11, 2026
@clawsweeper clawsweeper Bot added 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. labels Sep 11, 2026
@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime commands Command implementations labels Sep 11, 2026
@steipete
steipete merged commit 212f041 into main Sep 11, 2026
204 of 205 checks passed
@steipete
steipete deleted the codex/update-stress-compat branch September 11, 2026 20:56
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 12, 2026
…penclaw#144155)

* fix(update): initialize fresh profiles with the selected runtime

Let the staged target initialize compatible state before admitting update history, while retaining executor ownership and existing-state downgrade protection. Preserve read-only previews, owned service selectors, legacy schema metadata, and interruption guards. Reject changed stored channels before adopting their config snapshots.

Refs openclaw#144132. Verified ten npm stable targets on isolated Testboxes, existing-state refusals, real systemd startup, and focused red-to-green regressions.

* fix(update): preserve admission and finalization contracts

Reject contradictory native service selectors before fresh state or package
metadata selection, and unwind already-published fresh refusals through the
canonical CLI exit boundary after ownership settles.

Use the synchronous Kysely boundary for interruption metadata inspection.
Align existing-profile and continuation fixtures with their real database,
package version, Gateway version, and control-store ownership. Preserve
legacy fallback, rollback, service lifecycle, and no-op assertions. Document
that fresh previews do not create history.

Related to openclaw#144132.

* fix(update): close fresh-admission and control-store races

Publish the existing shared update-control database only after its private
schema and permissions are complete, preserving original authority and
single-link recovery checks. Select fresh initialization from actual state
and keep inherited diagnostic IDs consistent across executor and history.

Preserve current-main update ownership and completion behavior. Repair the
skill-environment detector with source dataflow and scoped validated rule
regeneration, and align regression fixtures with the current runtime and
package integrity contract.

* fix(update): preserve sealed managed handoff startup

Prepare the control database through its existing owner before staging the
standalone helper, then bind the helper to the captured existing identity.
Revalidate before spawn and keep publication dependency resolution lazy so
sealed runtime loading never depends on installation packages or native code.

Register the static OpenGrep fixtures as external Knip inputs. Keep the
Gateway test's synthetic parent alive until its native stop boundary,
preserving notice ordering and production authority checks.

* fix(update): publish control databases with Windows durability

* fix(update): retain executor ownership during service recovery

* fix(update): initialize control storage without optional native bindings

* test(update): align platform and merge workflow fixtures

* test(update): verify settled children and isolate deletion timing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI command changes commands Command implementations docs Improvements or additions to documentation gateway Gateway runtime maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P1 High-priority user-facing bug, regression, or broken workflow. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. security Security documentation 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.

Fresh-profile updates to npm stable initialize an incompatible database

3 participants