Skip to content

fix(docker): avoid pre-boot Doctor delays on container recreation - #207200

Merged
obviyus merged 3 commits into
mainfrom
fix/docker-direct-boot-3b
Nov 28, 2026
Merged

obviyus merged 3 commits into
mainfrom
fix/docker-direct-boot-3b

Conversation

@obviyus

@obviyus obviyus commented Nov 28, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Recreating a container on a monitored deployment caused 104 seconds of lost readiness against a 60-second limit. The entrypoint ran a full repairing Doctor before starting the Gateway; its original-state capture alone was still running after 51 seconds.

User Impact

Container activation starts the Gateway directly. Gateway boot retains its existing in-place state migration owners, and installed plugin packages converge through the shared post-ready job introduced in #206926. Keep the same state/config mounts, stop the old replica first, and back up state before upgrading.

Activation no longer takes Doctor's full pre-repair recovery capture. Explicit Doctor repair retains its normal recovery capture behavior.

Docker recreates no longer run entrypoint Doctor to write its agent .pre-startup-migration-*.bak checkpoint group. They now behave like npm -g/manual installs: in-place boot migration, with boot preimages only in a launcher trial. The boot credential owner still retains its shared-store backup.

Named upgrade edge: already-bound automations carrying an old copied-state authorization ID are not automatically rebound during boot. This matches direct npm/Git replacement behavior. Execution refuses with an explicit recovery action (src/cron/inference-binding.runtime.ts:315-318):

To keep using it: openclaw automations edit <jobId> --model <provider/model>@<profileId>.

Follow that command to adopt the intended account explicitly; Doctor's existing stopped-writer repair can also recover verified historical paths from retained upgrade receipts.

Why This Change Was Made

The entrypoint's Doctor child predates migration-on-boot and shared post-ready plugin convergence. Delete that child, its signal forwarding and argv classification, and its container-local capture marker/Doctor reader. Delete the obsolete Doctor-child tests and old-shape refusal control; retain direct command execution, PATH handling, preserved-state upgrade checks, and unsafe-store refusal. Boot also invokes the existing unattended cron account-adoption owner when the canonical inventory contains an unbound job; explicit Doctor repair remains available.

No new hook, option, durable state, retry, timer, or notice. Production source: +267 / -405, net -138 lines; whole change: net -235 lines. No changes to either updater implementation.

Evidence

  • Reported deployment readiness loss: 103.988 seconds; capture still running at 51 seconds. Gateway boot itself was approximately 9.05 seconds. Remaining pre-boot Doctor/orchestration time cannot be split exactly because Doctor logs lacked timestamps.
  • Syntax checks pass for the entrypoint, both Docker fixture modules, and the Docker lane shell script; focused formatting checks pass. Targeted lint reports zero warnings/errors.
  • The new real-database boot regression fails on unchanged main boot code because the legacy job has no inference binding, then passes with the existing adoption owner called from boot. It preserves authored job fields and run history and makes no network request. The migration first shipped in 2026.11.5; direct older-image upgrades and manual npm/Git replacement need the same repair.
  • Warm second-boot inventory precheck: 4.8 ms out of 4566.7 ms total boot (~0.11%) in the isolated source fixture. The already-bound job is preserved and adoption is not invoked again. Existing maintenance live-read admission avoids the snapshot fallback (previously 6108.5 ms). Temporary timing instrumentation is not shipped.
  • The full focused batch recorded 33 passing tests and six state-fixture failures. On unchanged main 53fc384687db, both retained-deletion cases and the non-trial in-place migration case also hit the unchanged 120-second timeout. An isolated branch rerun reproduced only that timeout, not the earlier borrowed-owner error. The corrected large-DB custody fixture passes in 109.596 seconds; the earlier borrowed-owner signature remains unproven after the timed-out batch.
  • Local ClawSweeper reviewed production-equivalent b8bd1ad3fd70 against 539f37f1d483. Its remaining finding is the historical already-bound-account edge explicitly accepted and documented above. The subsequent source delta only fixes the large-DB test's existing maintenance scope.
  • Full build and packed acceptance proof use exact-head hosted CI because the local host was overloaded (load approximately 70); the local full build was not completed.
  • Existing container-image-upgrade uses the shipped 2026.9.2 state corpus, not a latest-stable image. The separate published-upgrade-survivor lane uses openclaw@latest; these are distinct proof contracts, not an image-to-image stable upgrade claim.
  • Initial hosted proof: Package Acceptance run 46104235808. The root-image default cell reached readiness and its public history checks, then failed because it expected Doctor's removed agent checkpoint. That checkpoint came from Doctor's schema-backup owner (doctor-schema-migrations.ts:76-78, doctor-migration-backup.ts:483), not its original-state capture or boot's build-named trial preimage.
  • The fixture now drops only the agent Doctor-checkpoint, paired-checkpoint-ID, and backup-transcript assertions. All canonical session/transcript, schema, integrity, workspace, and shared credential-backup assertions remain.
  • The supplied lane log has no container-start/readiness timestamps or process trace; it cannot supply an exact time-to-ready or independently establish child-process absence. The entrypoint source and process-boundary tests verify that activation directly executes the Gateway without an automatic Doctor child.
  • Package Acceptance run 46107913725 passed both default and Compose activation. Its unsafe cell correctly refused without a listener; only the assertion's old Doctor diagnostic text differed. The assertion now checks boot's actual cause text, Agent schema markers disagree for, retaining every other unsafe assertion.
  • Neither main's entrypoint Doctor nor boot repairs this deliberately unsafe fixture state. In the exact-head Linux container, doctor --fix exited 1 and left version 19 / metadata version 18 and both session heads unchanged. Boot's refusal and exit 78 are unchanged in effect; no production error string or repair mechanism was changed.
  • Corrected the fixture lock collections to the owner's actual nullable type, GatewayLockHandle | null; no casts or runtime behavior changes.
  • Redispatched both existing lanes at a5b235b55a83e18897efd7ad72cf0d107263186d: Package Acceptance run 46113558328. Results pending.

- Remove the pre-boot Doctor child, its signal plumbing and the activation capture marker, leaving state migration and plugin convergence with their existing owners.
- Preserve unattended legacy cron account adoption through the existing boot migration owner; already-bound stores take only a canonical inventory read.
- Retain explicit Doctor repair and update the owning tests and container guidance.
@clawsweeper

clawsweeper Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

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

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime scripts Repository scripts commands Command implementations docker Docker and sandbox tooling size: XL labels Nov 28, 2026
@clawsweeper clawsweeper Bot added P1 High-priority user-facing bug, regression, or broken workflow. impact:auth-provider Auth, provider routing, model choice, or SecretRef resolution may break. impact:session-state Session, memory, transcript, context, or agent state can drift or corrupt. clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. labels Nov 28, 2026
@obviyus
obviyus marked this pull request as ready for review November 28, 2026 03:57
@clawsweeper clawsweeper Bot added 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: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. labels Nov 28, 2026
@clawsweeper

clawsweeper Bot commented Nov 28, 2026

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge.

What this changes

This PR removes pre-boot Doctor from container activation and invokes existing legacy automation account adoption during Gateway boot.

Example: Recreate a container against its existing state volume after an activation that lost readiness for approximately 104 seconds.

  • Before: The entrypoint runs repairing Doctor and its recovery capture before starting the Gateway.
  • After: The entrypoint starts the Gateway directly, with supported state migration handled during boot.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The production approach is focused and worthwhile, but a definite test type error and unfinished compatibility evidence prevent approval.
Proof confidence 🦪 silver shellfish (2/6) Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🦪 silver shellfish (2/6) 1 actionable review finding remain.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Container recreation can exceed deployment readiness limits while Doctor captures and repairs state before Gateway startup.
Reason: The maintainer-authored direction removes demonstrated critical-path work and explicitly records its recovery tradeoffs.

Merge readiness

⛔ Blocked before merge - 3 items remain

Keep this PR open: the maintainer-approved startup simplification addresses a concrete delay, but the changed state tests introduce a nullable-lock type error.

Reviewed head: 1329de72bb432d106bea039cb8d07548c9da0b2c

Before merge

  • Match cleanup storage to the lock's nullable return type (P2) - acquireGatewayLock returns Promise<GatewayLockHandle | null>, but this new array accepts GatewayLockHandle | undefined. The new locks.push(lock) calls therefore fail strict TypeScript checking because null is not assignable. The same mismatch appears in src/state/state-upgrade.large-agent-db.test.ts:33. Use the actual nullable return type in both cleanup arrays, or narrow the result before storing it; the production lock API does not need to change.
  • Improve patch quality - Complete and inspect the already-dispatched container and latest-stable upgrade evidence.
  • Add data-model compatibility proof - The review found that existing stored data may not work after upgrade. Show that existing data still loads and works with this change.

Findings

  • [P2] Match cleanup storage to the lock's nullable return type — src/state/state-upgrade.test.ts:46
Agent review details

How this fits together

The container entrypoint executes the configured command; Gateway startup acquires exclusive maintenance custody, migrates mounted state, and reaches readiness before background plugin convergence.

flowchart TD
  A[Container activation] --> B[Direct command execution]
  B --> C[Gateway startup]
  C --> D[Exclusive state maintenance]
  D --> E[Schema and legacy migration owners]
  E --> F[Gateway readiness]
  F --> G[Background plugin convergence]
Loading

Technical review

Best possible solution:

Retain the direct container startup and shared migration owners, correct the test cleanup types, and establish preserved-state upgrade compatibility before merging.

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

Current main runs repairing Doctor synchronously before Gateway execution, matching the reported readiness delay; this read-only review ran no target code.

Is this the best way to solve the issue?

Removing the redundant pre-boot process addresses the delay at its owner, while reusing existing state and cron migration operations avoids a competing repair implementation.

Full review comments:

  • [P2] Match cleanup storage to the lock's nullable return type — src/state/state-upgrade.test.ts:46
    acquireGatewayLock returns Promise<GatewayLockHandle | null>, but this new array accepts GatewayLockHandle | undefined. The new locks.push(lock) calls therefore fail strict TypeScript checking because null is not assignable. The same mismatch appears in src/state/state-upgrade.large-agent-db.test.ts:33. Use the actual nullable return type in both cleanup arrays, or narrow the result before storing it; the production lock API does not need to change.
    Confidence: 1

Overall correctness: patch is incorrect
Overall confidence: 0.97

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 4e84b43690b2.

Provenance checked

  • Pre-boot repairing Doctor changes intended behavior with a stated reason (2a1402c: Image activation automatically invoked Doctor when ordinary startup deliberately left general legacy repair to that owner.)
  • Container-local capture marker changes intended behavior with a stated reason (0492dc8: Reuse a sealed recovery capture across starts of the same container while retaining repairing Doctor; removing that activation process makes the marker obsolete.)
  • Canonical in-place startup migration keeps the original intent (e43debf: Existing database and legacy-state owners migrate canonical state under exclusive custody without copy-and-swap machinery.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

Acceptance criteria:

  • node scripts/run-tsgo.mjs -p test/tsconfig/tsconfig.core.test.state-logging.json --incremental
  • git diff --check

What I checked:

  • Pinned introduction reviewed: Reviewed the introduced merge-base-to-head diff; fetched main retains the pre-boot Doctor implementation, and the checkout remained clean. (docker-entrypoint.mjs:23, 1329de72bb43)
  • Existing migration owner reused: The added boot phase inspects canonical cron definitions and invokes the existing offline account-adoption owner when an unbound definition exists; that owner preserves definitions and runtime state through its verified-backup repair transaction. (src/state/state-upgrade.ts:403, 1329de72bb43)
  • Definite nullable-lock type mismatch: Both changed state test files declare cleanup arrays accepting GatewayLockHandle or undefined, then push acquireGatewayLock results whose declared type includes null; strict TypeScript rejects these calls. (src/state/state-upgrade.test.ts:46, 1329de72bb43)
  • Exact-head typecheck failure: check-test-types-core-3 failed on the reviewed head; its annotation reports exit code 2, but detailed logs redirect to blocked storage, so the complete failure set could not be inspected. (1329de72bb43)
  • Upgrade evidence still pending: The container-image-upgrade and published-upgrade-survivor jobs in https://github.com/openclaw/openclaw/actions/runs/46104235808 remained in progress; the former uses the 2026.9.2 corpus and cannot independently establish latest-stable upgrade compatibility. (scripts/e2e/container-image-upgrade-docker.sh:75, 1329de72bb43)
  • Accepted activation tradeoffs: The collaborator-authored body explicitly accepts removing activation's full recovery capture and leaving historical already-bound authorization IDs to the documented explicit account-adoption command or stopped-writer Doctor repair. (docker-entrypoint.mjs:31, 1329de72bb43)

PR surface

Source -22, Tests -53, Docs -20, Other -136. Total -231 across 22 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 3 265 287 -22
Tests 7 176 229 -53
Docs 7 19 39 -20
Config 0 0 0 0
Generated 0 0 0 0
Other 5 15 151 -136
Total 22 475 706 -231

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.

Labels

Label changes:

  • add merge-risk: 🚨 compatibility: The accepted activation change removes the automatic full Doctor capture and can leave historical bound automations requiring explicit account adoption.
  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🦪 silver shellfish.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Label justifications:

  • merge-risk: 🚨 compatibility: The accepted activation change removes the automatic full Doctor capture and can leave historical bound automations requiring explicit account adoption.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🦪 silver shellfish.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

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.

Reviewed November 27, 2026, 11:14 PM ET / November 28, 2026, 04:14 UTC.

- Keep the boot-owned shared credential backup and every canonical data, schema and integrity assertion.
- Remove only the agent checkpoint, paired Doctor backup ID, and backup transcript checks belonging to the deleted entrypoint Doctor step.
@obviyus

obviyus commented Nov 28, 2026

Copy link
Copy Markdown
Collaborator Author

Rejected review findings:

  • P2 — Already-bound cron jobs carrying historical .upgrade-* authorization paths: accepted named edge, matching direct npm/global and manual Git replacement behavior. The existing refusal gives the next action: openclaw automations edit <jobId> --model <provider/model>@<profileId> (src/cron/inference-binding.runtime.ts:315-318). Doctor's explicit stopped-writer repair remains available for verified historical receipts. This edge is documented under User Impact; no new eligibility check or state is being added.

- Match the observed boot cause for the deliberately unsafe state while retaining every other refusal and data assertion.
- Use GatewayLockHandle | null for fixture cleanup collections, matching the owner return type.
@obviyus

obviyus commented Nov 28, 2026

Copy link
Copy Markdown
Collaborator Author

Rejected review findings: (local review of a5b235b; final round)

  • [P2] Recovery for already-bound scheduled accounts (src/state/state-upgrade.ts:405-408): rejected as a named edge case, already recorded in the PR body. It needs a cron job that is already bound to an authorization id under a retired .upgrade-* path. Boot skips the full adoption when every job is bound, because that adoption costs about 6.5 s before readiness on every boot; the inventory check costs 4.8 ms. The affected job refuses with an exact next step ("To keep using it: openclaw automations edit --model <provider/model>@"), so the fault is visible and recoverable in one command. npm -g and manual Git installs have the same exposure today.

@obviyus
obviyus merged commit dfd17d0 into main Nov 28, 2026
151 checks passed
@obviyus
obviyus deleted the fix/docker-direct-boot-3b branch November 28, 2026 06:41
@obviyus

obviyus commented Nov 28, 2026

Copy link
Copy Markdown
Collaborator Author

Landed as dfd17d0. Docker containers now start the Gateway directly: the entrypoint no longer runs doctor --fix and its original-state capture before boot (about 95 s on a recreated fleet container). Boot already owns state migration and, since #206926, plugin convergence; this PR moves the one remaining Doctor-only migration, adoption of unbound cron inference bindings, into boot's existing state-upgrade owner. That also fixes it for npm -g and manual Git installs. A boot with nothing to adopt costs one 4.8 ms inventory read. Docker recreates no longer write Doctor's pre-migration checkpoint; they now behave like the other non-trial installs. Proof: the container-image-upgrade (default, compose, unsafe refusal) and published-upgrade-survivor lanes passed on the exact head (run 46113558328); CI green; remaining review finding rejected above. Production net -138 lines.

obviyus added a commit that referenced this pull request Nov 28, 2026
…#207586)

## What Problem This Solves

The scheduled `check-dependencies` job (`pnpm deadcode:report`, hard-zero unused exports) has failed on main in each of the last 10 hourly runs with `Unused exports are not allowed`. The job does not run on pull requests, so changes that left an export without a reader merged green and turned main red.

Reproduced on main 239a05e: `pnpm deadcode:report` exits 1 with five findings.

## Fix

Each finding is removed or narrowed at its module:

| Export | Readers on main | Change |
|---|---|---|
| `cli-root-options.mjs` `getCommandOptionsWithRootOptions` | none; #207200 removed its only caller, the entrypoint Doctor child | remove the function, its `.d.mts` declaration and the options-return mode of the shared parser that only it used |
| `extensions/codex/src/app-server/dynamic-tool-profile.ts` `shouldDisableCodexToolSearchForModel` | own module only | un-export |
| `src/agents/harness/types.ts` `AgentHarnessSideQuestionRequest` | own module only (reached through `AgentHarnessSideQuestionParamsV2`) | un-export |
| `src/agents/tool-search-catalog-visibility.ts` `CORE_TOOL_CATALOG_FAMILIES` | one test only | un-export; the test lists the family from its own real tool factories |
| `src/config/sessions/session-pending-input-history.types.ts` `PendingInputHistoryRunState` | one field | inline the type |

No behavior change: the remaining parser modes return the same values. No knip config change.

## User Impact

None at runtime. Main's `check-dependencies` job goes green again.

## Evidence

- Before (main 239a05e): `pnpm deadcode:report` exit 1, 5 unused exports.
- After (this head): `pnpm deadcode:report` exit 0, wall 102.4 s locally (script, production and full-tree scans all pass).
- `pnpm check:changed`: typecheck all, dead export scan, format and the other guards pass. Lint's single error is `ui/config/control-ui-chunking.ts:178` no-duplicate-case, which is already on main from #207505 and not in this diff.
- Tests: `src/agents/tool-search.repeatable.test.ts`, `src/infra/cli-root-options.test.ts`, `extensions/codex/src/app-server/dynamic-tool-profile.test.ts`, `test/scripts/compose-installed-runtime.test.ts` pass.
- Diff: +8 / -31.

Co-authored-by: Ayaan Zaidi <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 29, 2026
…enclaw#207200)

## What Problem This Solves

Recreating a container on a monitored deployment caused 104 seconds of lost readiness against a 60-second limit. The entrypoint ran a full repairing Doctor before starting the Gateway; its original-state capture alone was still running after 51 seconds.

## User Impact

Container activation starts the Gateway directly. Gateway boot retains its existing in-place state migration owners, and installed plugin packages converge through the shared post-ready job introduced in openclaw#206926. Keep the same state/config mounts, stop the old replica first, and back up state before upgrading.

Activation no longer takes Doctor's full pre-repair recovery capture. Explicit Doctor repair retains its normal recovery capture behavior.

Docker recreates no longer run entrypoint Doctor to write its agent `.pre-startup-migration-*.bak` checkpoint group. They now behave like `npm -g`/manual installs: in-place boot migration, with boot preimages only in a launcher trial. The boot credential owner still retains its shared-store backup.

**Named upgrade edge:** already-bound automations carrying an old copied-state authorization ID are not automatically rebound during boot. This matches direct npm/Git replacement behavior. Execution refuses with an explicit recovery action (`src/cron/inference-binding.runtime.ts:315-318`):

> To keep using it: `openclaw automations edit <jobId> --model <provider/model>@<profileId>`.

Follow that command to adopt the intended account explicitly; Doctor's existing stopped-writer repair can also recover verified historical paths from retained upgrade receipts.

## Why This Change Was Made

The entrypoint's Doctor child predates migration-on-boot and shared post-ready plugin convergence. Delete that child, its signal forwarding and argv classification, and its container-local capture marker/Doctor reader. Delete the obsolete Doctor-child tests and old-shape refusal control; retain direct command execution, PATH handling, preserved-state upgrade checks, and unsafe-store refusal. Boot also invokes the existing unattended cron account-adoption owner when the canonical inventory contains an unbound job; explicit Doctor repair remains available.

No new hook, option, durable state, retry, timer, or notice. Production source: +267 / -405, **net -138 lines**; whole change: **net -235 lines**. No changes to either updater implementation.

## Evidence

- Reported deployment readiness loss: 103.988 seconds; capture still running at 51 seconds. Gateway boot itself was approximately 9.05 seconds. Remaining pre-boot Doctor/orchestration time cannot be split exactly because Doctor logs lacked timestamps.
- Syntax checks pass for the entrypoint, both Docker fixture modules, and the Docker lane shell script; focused formatting checks pass. Targeted lint reports zero warnings/errors.
- The new real-database boot regression fails on unchanged main boot code because the legacy job has no inference binding, then passes with the existing adoption owner called from boot. It preserves authored job fields and run history and makes no network request. The migration first shipped in 2026.11.5; direct older-image upgrades and manual npm/Git replacement need the same repair.
- Warm second-boot inventory precheck: **4.8 ms** out of **4566.7 ms** total boot (~0.11%) in the isolated source fixture. The already-bound job is preserved and adoption is not invoked again. Existing maintenance live-read admission avoids the snapshot fallback (previously 6108.5 ms). Temporary timing instrumentation is not shipped.
- The full focused batch recorded 33 passing tests and six state-fixture failures. On unchanged main `92c21cb85f66`, both retained-deletion cases and the non-trial in-place migration case also hit the unchanged 120-second timeout. An isolated branch rerun reproduced only that timeout, not the earlier borrowed-owner error. The corrected large-DB custody fixture passes in 109.596 seconds; the earlier borrowed-owner signature remains unproven after the timed-out batch.
- Local ClawSweeper reviewed production-equivalent `b8bd1ad3fd70` against `212e0328aa93`. Its remaining finding is the historical already-bound-account edge explicitly accepted and documented above. The subsequent source delta only fixes the large-DB test's existing maintenance scope.
- Full build and packed acceptance proof use exact-head hosted CI because the local host was overloaded (load approximately 70); the local full build was not completed.
- Existing `container-image-upgrade` uses the shipped 2026.9.2 state corpus, not a latest-stable image. The separate `published-upgrade-survivor` lane uses `openclaw@latest`; these are distinct proof contracts, not an image-to-image stable upgrade claim.
- Initial hosted proof: [Package Acceptance run 46104235808](https://github.com/openclaw/openclaw/actions/runs/46104235808). The root-image default cell reached readiness and its public history checks, then failed because it expected Doctor's removed agent checkpoint. That checkpoint came from Doctor's schema-backup owner (`doctor-schema-migrations.ts:76-78`, `doctor-migration-backup.ts:483`), not its original-state capture or boot's build-named trial preimage.
- The fixture now drops only the agent Doctor-checkpoint, paired-checkpoint-ID, and backup-transcript assertions. All canonical session/transcript, schema, integrity, workspace, and shared credential-backup assertions remain.
- The supplied lane log has no container-start/readiness timestamps or process trace; it cannot supply an exact time-to-ready or independently establish child-process absence. The entrypoint source and process-boundary tests verify that activation directly executes the Gateway without an automatic Doctor child.
- [Package Acceptance run 46107913725](https://github.com/openclaw/openclaw/actions/runs/46107913725) passed both default and Compose activation. Its unsafe cell correctly refused without a listener; only the assertion's old Doctor diagnostic text differed. The assertion now checks boot's actual cause text, `Agent schema markers disagree for`, retaining every other unsafe assertion.
- Neither main's entrypoint Doctor nor boot repairs this deliberately unsafe fixture state. In the exact-head Linux container, `doctor --fix` exited 1 and left version 19 / metadata version 18 and both session heads unchanged. Boot's refusal and exit 78 are unchanged in effect; no production error string or repair mechanism was changed.
- Corrected the fixture lock collections to the owner's actual nullable type, `GatewayLockHandle | null`; no casts or runtime behavior changes.
- Redispatched both existing lanes at `a5b235b55a83e18897efd7ad72cf0d107263186d`: [Package Acceptance run 46113558328](https://github.com/openclaw/openclaw/actions/runs/46113558328). Results pending.

Co-authored-by: Ayaan Zaidi <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 29, 2026
…openclaw#207586)

## What Problem This Solves

The scheduled `check-dependencies` job (`pnpm deadcode:report`, hard-zero unused exports) has failed on main in each of the last 10 hourly runs with `Unused exports are not allowed`. The job does not run on pull requests, so changes that left an export without a reader merged green and turned main red.

Reproduced on main 75a0808: `pnpm deadcode:report` exits 1 with five findings.

## Fix

Each finding is removed or narrowed at its module:

| Export | Readers on main | Change |
|---|---|---|
| `cli-root-options.mjs` `getCommandOptionsWithRootOptions` | none; openclaw#207200 removed its only caller, the entrypoint Doctor child | remove the function, its `.d.mts` declaration and the options-return mode of the shared parser that only it used |
| `extensions/codex/src/app-server/dynamic-tool-profile.ts` `shouldDisableCodexToolSearchForModel` | own module only | un-export |
| `src/agents/harness/types.ts` `AgentHarnessSideQuestionRequest` | own module only (reached through `AgentHarnessSideQuestionParamsV2`) | un-export |
| `src/agents/tool-search-catalog-visibility.ts` `CORE_TOOL_CATALOG_FAMILIES` | one test only | un-export; the test lists the family from its own real tool factories |
| `src/config/sessions/session-pending-input-history.types.ts` `PendingInputHistoryRunState` | one field | inline the type |

No behavior change: the remaining parser modes return the same values. No knip config change.

## User Impact

None at runtime. Main's `check-dependencies` job goes green again.

## Evidence

- Before (main 75a0808): `pnpm deadcode:report` exit 1, 5 unused exports.
- After (this head): `pnpm deadcode:report` exit 0, wall 102.4 s locally (script, production and full-tree scans all pass).
- `pnpm check:changed`: typecheck all, dead export scan, format and the other guards pass. Lint's single error is `ui/config/control-ui-chunking.ts:178` no-duplicate-case, which is already on main from openclaw#207505 and not in this diff.
- Tests: `src/agents/tool-search.repeatable.test.ts`, `src/infra/cli-root-options.test.ts`, `extensions/codex/src/app-server/dynamic-tool-profile.test.ts`, `test/scripts/compose-installed-runtime.test.ts` pass.
- Diff: +8 / -31.

Co-authored-by: Ayaan Zaidi <[email protected]>
tideclaw-bot pushed a commit that referenced this pull request Nov 29, 2026
…205987)

## Class: completion is published before required maintenance finishes

Fleet run `4de610c8-e63d-4336-8e85-a76379cfd934` committed and served the new core, but its completion notice preceded the failed plugin result. The bug is ordering, not the core's status.

The modern Gateway-ready owner now settles once **after** required plugin work and sends one final notice afterward. A failed plugin remains a failed step, not a failed core update or a rollback trigger. Existing CLI following and capability-consent behavior remain; the failed-status/early-exit/backoff experiment is removed.

CLI completion, status, Doctor history and the Control UI reuse the existing `renderUpdateRunSummary` over recorded facts. Running results keep their phase; succeeded results name the installed after-version; skipped results keep their existing reason headline, never a guessed serving state. Failed work names its step and exact recovery command. Startup refusal diagnostics, structured failure facts, rollback compensation reasons, recorded signal output and profile-specific recovery commands remain visible. Existing discriminators distinguish repair and reconciled-history records from core updates. Background completion never rewrites the shared trial, preserving a newer pending trial and restart resumption.

## What this deletes

- `renderUpdateRunReport`, its private recovery hints and cause module.
- Routine Markdown completion publication/refresh, automatic `reportPath` output, and artifact-only admission/options plumbing.
- Obsolete completion-export tests and renderer-only assertions. Ledger, recovery, authority, privacy and step-detail assertions remain on their retained data owners.
- The abandoned failed-status classifier, campaign/retry exceptions, early-return CLI path and associated UI/test allocation.

**Kept deliberately:** explicit consent-gated **Report update failure** GitHub preview/submission, its reservation/receipt authority and sanitized issue artifacts. The remaining `update-failure-report*` code serves that user feature and triage, not routine completion. Identity/recovery and legacy result/sentinel projections remain because those manual-report and sentinel consumers still use them.

No new status, state store, flag, stored-record shape or launcher format.

## Size

`tokei` on this PR's **20 production files**, excluding tests/support/harnesses, against integrated main `6ac896f4cbb8bc29940c625cb1e2b19990e87284`:

| | Before | After | Net |
| --- | ---: | ---: | ---: |
| Production code lines | 7,758 | 7,148 | **−610** |
| Test/support lines | | | **−1,257** |

## Verification

- The earlier base Gateway-owner regression exposed the premature terminal write before plugin settlement. Final owner tests pin delayed settlement, unchanged successful core status, exact plugin recovery, one acknowledged final notice, newer-trial preservation and restart resumption.
- **Earlier focused AWS replay GREEN:** nine observed prepare/status/progress regression cases passed in99s; core and CLI-update types, scoped lint (zero warnings/errors) and format passed. https://crabbox.openclaw.ai/portal/runs/run_e5a8682ccf98bb7765b9d075be801705 . Exact qualified source was `5c6686ad20f50377f6affdec0d948f362dc37851`, tree `5ed1cb6e544fbd93604eea566b550f0c722842c8`, normal carrier `d2821086c00e55c8de35d00d7a4418168ca25a2d`; lease released with `--wait`. This is not claimed as an exact-head run after the later shared-summary/UI refinements.
- **Final pushed head:** `79182af301a6166914840dab9a705f4fa5c72fbd`. Restores the existing installed-runtime admission receipt before stop-and-repair advice, keeps historical summaries informational, and types the captured handoff notice without weakening assertions. Three requested files passed once: guidance32/32, handoff19/19, UI view15/15 (**66/66**). https://crabbox.openclaw.ai/portal/runs/run_ea4006e0b21e09bfbd763abe6e25929a . Qualified source was `985dd796d1` plus those two frozen restores, tree `45fe9f49c964b39806b431cde018432ed6e472fc`, normal carrier `81d874a77bb7de2f72307cca91f827db71ec7850`. Exact AWS lease released with `--wait`, exit0. Final-head CI remains the landing gate.
- **Repair candidate:** `1f223e15a20a04a27a4f745af81fb11b106d9d40`. Plain integrated main `6ac896f4cbb8bc29940c625cb1e2b19990e87284` passed all39 CLI tests on hydrated AWS4CPU/7730MiB, including the #205898 restart-wire case in31ms: https://crabbox.openclaw.ai/portal/runs/run_97637e77b460fbb7176bd261693cabd1 . B's timeout came from its local ledger fixture using a remote run ID; the fixture is corrected without changing main's captured connection contract.
- **Node regression batch:** nineteen files on repair predecessor `eede`, 481passed/4failed/1skipped; core types, scoped lint and format passed. https://crabbox.openclaw.ai/portal/runs/run_fbcf26ce68d5a5a539f63f6ee793237a . The four residuals were an early-return saved-notice recognition bug, two assertions pinning retired reconciled wording, and a native-refusal assertion reading a clipped excerpt instead of its retained structured cause. All are corrected without changing generic ledger storage.
- **Final-head residual proof:** summary18/18, abandoned-repair rows2/2 and native-start refusal1/1 passed; core and CLI-update types plus scoped format passed. https://crabbox.openclaw.ai/portal/runs/run_f4e633ac557bce484d1939c03cf88b3f . Source tree `9112e46c2b3081aab02b3dc9a0dfc1e0c06da55f`, normal carrier `82470c4669b7cc502049fa978dc5ed37defb6c6a`, AWS4CPU/7730MiB. Scoped lint did **not** run: its normal SDK declaration preparation failed first with TypeScript/vscode-jsonrpc `ERR_STREAM_DESTROYED`. No retry or bypass; current-head CI remains the lint gate.
- Historical failed-status screenshots, broad partial qualification and prior reviews describe the superseded design, **not** this head.
- No new upgrade source, death proof, harness test or Linux product campaign is added. Superseded remote proof jobs were cancelled and all their leases released with `--wait`.
- The ready-time settlement owner tests passed on integrated `9aba`: `gateway-trial.test.ts`18/18. Later output refinements do not change that settlement policy. Frozen `01b` UI reproduction observed unit14pass/1fail and E2E8pass/2fail. On repair predecessor `eede`, unit15/15, UI/pages/E2E types and scoped lint/format passed. Final `f087` passed both changed E2E cases (standalone repair history; warning advice and keyboard-accessible output), UI/pages/E2E types, scoped lint and format: https://crabbox.openclaw.ai/portal/runs/run_13701071e15057d5ac5c4ac5e927c65d . Source tree `3c734ef709a186303996517ecad54c5e5d4a0e9c`; exact lease released with `--wait`. The other8 E2E cases passed on `eede` and were intentionally not repeated.
- **Accepted budget cost:** exact `1f223` CI measures chat boot gzip **1,336,500→1,337,028 (+528 B)**, requests21→21; startup+1 B. Base already exceeds its cap, so normal tolerance is64 B (464 B excess). https://github.com/openclaw/openclaw/actions/runs/45885636780/job/140136424955 . Cause: `update-run-projection.ts` synchronously imports the shared summary for the existing card/view projection; the existing async result boundary already imports it dynamically. Ayaan accepted this cost for this PR through Main; no new async plumbing or budget config. Main applies the performance-only override at merge; every other gate remains required.
- **Final-head budget receipt (`79182`):** chat boot gzip **1,336,744→1,337,247 (+503 B)**, requests21→21; startup+1 B, normal tolerance64 B. https://github.com/openclaw/openclaw/actions/runs/45895112042/job/140167696819 . This is below the accepted predecessor's +528 B cost; same synchronous-summary cause, no new plumbing/config. Remaining CI gates are still pending.
- **Latest pushed head: `be86da0464892c10cbe7207ff98228eb1e81758a` (test-only delta).** The shared notice mock uses its production signature; no cast or weakened notice assertion remains. Healthy final recovery without an installed-runtime admission receipt explicitly expects update-again/no-stop advice. Two affected files passed once (**81/81**: handoff19, post-update62), focused Gateway/CLI-update types and lint passed: https://crabbox.openclaw.ai/portal/runs/run_c8784e2fe001772ae88bae53af8d9747 . Qualified source was `79182` plus the frozen test edits; only generic-type wrapping changed mechanically afterward, normal commit hooks passed. No production/budget change.
- The prior ratchet failure is infrastructure: its GitHub annotation says the hosted runner lost communication, leaving the baseline-ratchet step without a verdict. Its log fetch returned BlobNotFound/404. No old-head rerun was accepted or needed; this head's normal CI runs the ratchet again.
- **Latest pushed head: `bf3ab61efbb9dba856bfc4d651c7fc77f44549f2` (one exact-copy test assertion).** Requested same-guest owner-file comparison: plain main `993d0b77`13/13 passed ([run](https://crabbox.openclaw.ai/portal/runs/run_4983803c6c82c64295d7d513ac8b52cd)); `be86`12/13 passed ([run](https://crabbox.openclaw.ai/portal/runs/run_51b38ba2049d66bdf6437b89731bf787)), failing only the expected generic details tail. The actual last notice correctly preserves `commands.restart=false` and its app/operator remedy. This commit changes only the exact expected string, retaining acknowledgement, no-update and last-call/context assertions; no mock runtime or production change. No extra local rerun: new-head CI verifies the migrated expectation.

Co-authored-by: Ayaan Zaidi <[email protected]>

(cherry picked from commit ed8b883)

Release adaptation: Port Gateway run/notice timing and the existing maintenance result contract only; retain beta.2 CLI, Doctor and UI summary surfaces and explicit failure reports. Fold in #208074 abort/grace follow-up where applicable.

Later same-path commits from the pinned scan (separate behavior unless named as folded/selected below): 974d792 fix: keep update status quiet and app-managed updates honest (#208359); 186e941 fix: restore the dependency check on main (#207741); dae01a9 fix: keep other agents running when one store is refused (#208364); c9f7a98 fix: keep container Gateway commands from rolling back host updates (#208271); edb6820 fix: let the Gateway restart while boot plugin maintenance is running (#208074); bb37856 fix: keep Windows WebChat connected during config reloads (#208109); 516166c fix: exit once when gateway run rejects an argument after an update (#208068); 07e96dc fix: restart the Gateway after real plugin repairs (#208207); bd48ff6 fix: avoid restarting the Gateway for plugin timestamp changes (#208119); 259f71c fix: stop Linux service starts from copying the whole agent database (#207969); 7cb8975 fix: keep forked Claude chats separate after a Gateway crash (#208048); 6d300d3 fix: restart launcher-managed Gateways after exit 78 (#207972); 90ff668 fix: stop treating limited access as an Inbox alert (#207737); ec39a90 fix(whatsapp): retain sender for explicit current-message reactions (#190121); 86ca412 fix: show the saved quota reset when chat skips its only model (#207210); c4a675f fix: avoid reloading unchanged plugins after Gateway boot (#207949); 13c67a1 fix: let updates back up deeply nested databases (#207756); e2fcd4d fix: acknowledge updates when the Gateway first becomes ready (#207819); 8933edd fix: name safe recovery when agent schema markers disagree (#207705); 19e9dd6 fix(gateway): keep Linux legacy lock recovery explicit (#207340); 54b5989 test(update): move startup diagnostics to the live CLI (#207589); fbf1aae fix: give safe update ownership guidance and restore legacy result delivery (#207640); 0cbe433 test(gateway): move update admission tests to the current handler (#207545); a922203 refactor(update): remove native post-activation Doctor subprocess (#207585); c72bd9a fix(anthropic): show Claude CLI quota usage from the native login (#207543); 7ac87ad fix: avoid taking service-account ownership during updates (#207563); b3902a2 fix(update): allow in-place updates without a full state copy (#207448); 9fa8d14 refactor: trim redundant gateway test journeys (#207311); 2cf1cb6 test(cli): remove unused private fixture state (#207431); ece7a74 improve(workboard): apply the Control UI glossary and style to Workboard copy; 1c89587 fix: update system service packages without root state changes (#207304); dfd17d0 fix(docker): avoid pre-boot Doctor delays on container recreation (#207200); b616036 refactor(subagents): simplify ACP spawn relay ownership (#207023); 93ca762 improve: reduce allocations when preparing session rows (#207109); adb3716 fix(update): surface boot plugin repair advisories (#207163); f79ef8c fix: finish updates of 2026-11-17 main checkouts automatically on Linux and macOS (#207062); 3c4362b fix(update): preserve exception causes in failure history (#207085); 20c92a4 fix: converge plugins after every Gateway boot (#206926); 3078862 fix(update): clean up rejected Git update worktrees (#207040); 9993328 refactor(subagents): simplify kill claim and ownership handling (#207025); 97815bd refactor(subagents): consolidate registry cleanup and publication guards (#207064); e94f799 refactor(subagents): centralize requester turn matching (#206584); 819935f refactor(test): trim unused plugin fixture setup (#206982); 8ae0874 improve(gateway): avoid redundant cleanup for empty legacy auth stores (#206867); 4849bb7 fix(browser): report crashed tabs as tab-scoped failures (#194682); ea77ca3 refactor: report update failures from recorded runs (#206700); b19387e fix(test): cover SIGBREAK during pending update recovery (#206860); 18e53d8 fix: finish Linux upgrades after a legacy Gateway crashes (#206530); 8bd1863 chore(test): remove unused plugin contract fixture setup (#206812); f1841bc fix: stop repeating unchanged session state in every chat turn (#206766); f9a8f18 fix: clear the update warning after a retired model is repaired (#204778); 4d7e00b fix: let started participant runs and requests finish after an access change (#206747); 35cd392 improve: use less memory when waiting for an agent reply (#206733); 9845bf5 fix(test): keep readiness abort fixtures alive until stopped (#206660); 461f650 fix(ci): keep startup helpers internal (#206649); f89ae43 refactor(subagents): use cleanup and terminal owners in sweeps (#206533); a882e0f fix(agents): preserve task answers when sessions are reused (#126263); ccb6d81 fix: finish core updates when the Gateway is ready (#206560); 74f02b4 fix: refuse root updates of a system service that runs as another account (#206343); 01032b1 fix(update): keep acknowledged run IDs when status is unavailable (#206562); 3ce0582 refactor(subagents): centralize collector replay decisions (#206471); c2cfab0 chore: consolidate repeated test fixtures and guards (#198739); 219b6b0 perf(agents): render the system prompt from one manifest and halve it (#206537); 360e306 refactor(test): remove mocked outbound staging fixtures (#184863); cbdd907 fix: finish release updates after a slow launcher response (#206503); 81fc833 refactor(subagents): own dormant child Stop decisions (#206479); 91d4912 fix(update): stop using foreign recovery records as admission (#206295); 6feeb50 fix: stop 2026-11-17 main Git checkouts from half-switching on a schema update (#206341); be3c73e fix(subagents): finish claimed stops after session rotation (#206405); 5e5bb6e fix(update): round status inspection timeouts (#206250); 41afc0f fix(update): keep successful plugin reload warnings advisory (#206372); 6d86389 fix: finish healthy Git updates after an older verifier exits; da6ec1a fix(update): bound release CLI Gateway waits (#206252); d9a36b3 improve: skip unrelated harness discovery for isolated model calls (#206323); bcdb2ef improve(cli): skip channel and web discovery for model credentials (#206240).
Later PR-number mentions: none Later commit-SHA mentions: none
Pinned PR grep: ed8b883 fix(update): settle after plugins and share one completion summary (#205987)

Co-authored-by: RomneyDa <[email protected]>
tideclaw-bot pushed a commit that referenced this pull request Nov 29, 2026
## Class: foreign updater records must not grant admission

Instances: #203486, #205736, #203917, and the modern release route refusing an old unfinished recovery.

The release preparation owner now takes its existing lock, checks the installation and physical restore guard, then records other unfinished runs as `failed: interrupted` and continues. It preserves its current run and the serving trial's handed-over run. The bounded drain reads current rows, not an enclosing Doctor snapshot.

In modern release preparation, the two recovery refusals remain: a positively live in-place lease holder, and `.openclaw-restore-*` that may contain the original state. Current modern locks/trials and normal preflight still apply.

## What disappears

- The 808-line interrupted plugin-cohort settlement owner, its run/finalize/repair discovery and replay paths, and obsolete killed-driver/death-proof suites.
- Foreign saved-row permission for plugin peer links, snapshot collection, interruption/reconciliation and terminal capture. Foreign cohort rows remain unchanged; another update does not replay their rollback.
- The critical-path retained-runtime census and its timeout branches. Existing owned-release path collection runs after ready; Doctor retains its separate old-runtime cleanup.
- Current mutation and Gateway completion read only their named pair. Main's existing all-row admission reader is retained only by the shipped package-finalization bridge, as the accepted fallback below.

Current source/executor/lifecycle/transaction/finalizer checks remain. Explicit repeated repair uses its existing abandonment and exclusive-ownership checks, not a foreign stored-recovery veto; it does not replay the saved cohort. Snapshot collection defers only inside this operation's existing live publication capture, preserving its rollback bytes without consulting foreign records. The shipped `finishInterruptedUpdate` export keeps its real staged finalization, pinned as a source build entry because the compatibility inventory names it.

No new state, flag, timer, death proof, schema/stored shape, or launcher/Gateway protocol change. Doctor-compatible reads remain for legitimate current cross-build bookkeeping, not foreign admission.

**Accepted legacy edge:** package-only finalization retains main's `recoveryAdmission` worker, coherent facts and assertion on its selected service/history roots. The schema-refusal/copy-cost cleanup is not redesigned here. Ordinary readiness guards keep their original no-recovery early return; modern release admission remains physical-only.

## Size

`tokei` on this PR's 39 runtime source files, excluding tests/support/harnesses and fixtures, against merged main `1e6d3f9bd9ecdbb061908ed30090bcf2fd6d7c2f` (original before-code base: `5c815265d5281c7929ab7483bd4e471e54e5c0ff`):

| | Before | After | Net |
| --- | ---: | ---: | ---: |
| Production code lines | 11,335 | 10,362 | **−973** |
| Test/support lines | | | **−2,447** |

Tooling routing/inventory and the update implementation contract are updated with the cut; their deletions are not counted as runtime savings.

## Verification

- Current head `b4e588ff5f9e35a27faa20232819c7f73e100d4a`, tree `12b76c0debe4b9b4ee2274c3459acce54acc1c3d`, fixes the landing review's lease-permission regression: slot inspection opens through the existing lease-store preparation owner, not direct identity capture. The existing slot table now covers an idle owned `0644` store being repaired to `0600` without refusing admission or changing history. Normal hooks passed; **current-head CI is pending**. Predecessor `63010e7d0af9` completed 87 successful checks with no failures/pending checks, including schema, copy-cost, healthy-caller, type, lint, ratchet and extension-boundary gates ([run](https://github.com/openclaw/openclaw/actions/runs/45952703299)).
- Corrected AWS Linux base proof: seven selected contracts, **six meaningful failures and one terminal-history control pass**. A pre-repair repeated-repair comparison selected two positive cases; both failed meaningfully. This supersedes the initial host-only baseline, which is not counted as Linux proof.
- AWS `747bd654fa01`: **145 passed, two skipped** across nine files; core/core-test/scripts/tooling types, changed lint/format and dead-export scans passed. AWS `9901b03a6ae4`: **132 passed** across six affected files, including real snapshot rollback and CLI deadline integration; core/core-test types, scoped lint/format and dead-export scans passed. [Final run](https://crabbox.openclaw.ai/portal/runs/run_95deb2b3c2b56df85ff53e839750f5c5). These are qualified source snapshots, not exact `2dfc213fbdc6` proof.
- The final local identity ratchet could not resolve the original base object after normal synthetic-source sync; that is a setup gap, not a policy verdict. Current CI owns the ratchet and the later two-root schema repair. Both owned AWS leases were released with exact `stop --wait` receipts; no paid resource remains.
- Predecessor `63010e7d0af9` passed the Linux published-to-head [`docker-seed-e2e` / `release-update-survivor` lane](https://github.com/openclaw/openclaw/actions/runs/45952703299/job/140352861920) in 2,615 seconds; healthy/crash/downgrade receipts are artifact 15179778195. Latest-head CI remains the landing gate. The standalone fixture-kit producer remains unsupported unchanged on AWS Linux because it requires Studio/macOS-only ocx cloning; no kit patch, host build, shim or separate paid campaign was used.
- Two local review rounds completed. The first review's request to restore foreign cohort settlement is [explicitly rejected](#206295 (comment)) under Ayaan's rule; its concrete repeated-repair case, build reachability and real path-state testing concerns are addressed. The second review's current-operation snapshot-retention finding is fixed through the existing live capture, not a foreign-row permission check. The maintainer reviews only this final delta.
- The active-list query now excludes the two protected named rows before its limit; `run.ts` has no ID comparisons and the identity allowlist does not grow. Four CI failures that asserted the deliberately retired foreign-record refusal were removed or migrated while retaining current-operation, service-profile and saved-evidence assertions.
- `47d896edda06` passed the two split-root schema cases but added a second snapshot on the common readiness path (`update-command-recovery-cost.test.ts:77`). Per maintainer direction, the move is reverted and main's admission is retained only for package finalization. Both schema assertions and the copy-cost assertion remain unchanged. Current reporting refusal remains; only the retired global-malformed-row policy tail is deleted. Current CI owns the fallback's qualification; earlier AWS snapshots do not prove it. Runner-shutdown ratchets and WebKit apt 403 were infrastructure failures, not product verdicts.
- Maintainer landing review and latest-head CI remain required; no worker merge performed.

Co-authored-by: Ayaan Zaidi <[email protected]>

(cherry picked from commit 91d4912)

Release adaptation: Port the modern release preparation admission boundary only: retain the published package updater’s existing recovery contract, check live in-place custody and restore directories, interrupt only unowned run history, and preserve beta.2 release/runtime cleanup outside that boundary. No schema or row-shape changes.

Later same-path commits from the pinned scan (separate behavior unless named as folded/selected below): f84b705 fix: preserve lower-token guidance for unaffordable requests (#201392); dae01a9 fix: keep other agents running when one store is refused (#208364); a20fd1c fix: avoid competing Gateway test boots and cold agent mutation imports (#208203); c9f7a98 fix: keep container Gateway commands from rolling back host updates (#208271); edb6820 fix: let the Gateway restart while boot plugin maintenance is running (#208074); 516166c fix: exit once when gateway run rejects an argument after an update (#208068); 07e96dc fix: restart the Gateway after real plugin repairs (#208207); 13059ef fix: keep the PostgreSQL Doctor preflight test from timing out on module loading (#208225); 50d7708 fix: keep Claude fork compaction out of the parent chat (#208192); bd48ff6 fix: avoid restarting the Gateway for plugin timestamp changes (#208119); 259f71c fix: stop Linux service starts from copying the whole agent database (#207969); 7cb8975 fix: keep forked Claude chats separate after a Gateway crash (#208048); 407b523 fix(slack): thread queued DM replies under the triggering message (#208133); 43b5b52 chore(release): close out 2026.11.11 on main (#208114); 5d5284c fix(ci): add tagged reply control to the PR wrapper inventory (#208120); 1782ab0 fix: keep confirmed sends in the receiving chat's model history (#208049); 6d300d3 fix: restart launcher-managed Gateways after exit 78 (#207972); c4a675f fix: avoid reloading unchanged plugins after Gateway boot (#207949); 13c67a1 fix: let updates back up deeply nested databases (#207756); e2fcd4d fix: acknowledge updates when the Gateway first becomes ready (#207819); 8933edd fix: name safe recovery when agent schema markers disagree (#207705); 19e9dd6 fix(gateway): keep Linux legacy lock recovery explicit (#207340); 3256a47 test(update): move package ownership coverage to preparation (#207581); fbf1aae fix: give safe update ownership guidance and restore legacy result delivery (#207640); a922203 refactor(update): remove native post-activation Doctor subprocess (#207585); 7ac87ad fix: avoid taking service-account ownership during updates (#207563); b3902a2 fix(update): allow in-place updates without a full state copy (#207448); ece7a74 improve(workboard): apply the Control UI glossary and style to Workboard copy; 1c89587 fix: update system service packages without root state changes (#207304); dfd17d0 fix(docker): avoid pre-boot Doctor delays on container recreation (#207200); b616036 refactor(subagents): simplify ACP spawn relay ownership (#207023); 93ca762 improve: reduce allocations when preparing session rows (#207109); adb3716 fix(update): surface boot plugin repair advisories (#207163); f79ef8c fix: finish updates of 2026-11-17 main checkouts automatically on Linux and macOS (#207062); 3c4362b fix(update): preserve exception causes in failure history (#207085); 539f37f perf(gateway): keep legacy lease inspection out of heartbeats (#207084); 7a20389 fix: preserve source ranges in compaction requests (#207045); 20c92a4 fix: converge plugins after every Gateway boot (#206926); 3078862 fix(update): clean up rejected Git update worktrees (#207040); 73cb180 improve: reduce peak memory during Gateway startup update checks (#207073); 9993328 refactor(subagents): simplify kill claim and ownership handling (#207025); 97815bd refactor(subagents): consolidate registry cleanup and publication guards (#207064); 49c5e3e fix: let the end-of-turn recovery request reuse the turn's cached prompt (#207052); e94f799 refactor(subagents): centralize requester turn matching (#206584); e2e0974 fix(doctor): skip the state schema repair when its read-only plan finds nothing (#206694); 15e840e fix(ci): clear stale restart-sentinel exports from the dependency report (#206911); a72dcc9 fix(agents): resolve utility models against the session owner's role (#206962); 8ae0874 improve(gateway): avoid redundant cleanup for empty legacy auth stores (#206867); af1f26c improve: avoid unused proxy runtime in local text replies (#206931); 179e0c4 fix: label conversation data in system updates; ea77ca3 refactor: report update failures from recorded runs (#206700); 18e53d8 fix: finish Linux upgrades after a legacy Gateway crashes (#206530); f0e7d96 fix: preserve large snapshots in trajectory exports (#206810); c7ea9f4 improve: reduce memory used to renew state leases (#206798); 4d7e00b fix: let started participant runs and requests finish after an access change (#206747); dff00f3 fix(mcp): bound unavailable server notices in each turn (#206318); 9845bf5 fix(test): keep readiness abort fixtures alive until stopped (#206660); 844bfbf improve(build): trim unused imports from standalone relays (#170187); d4d45a7 improve: reduce memory when reading saved credentials (#206686); 461f650 fix(ci): keep startup helpers internal (#206649); f89ae43 refactor(subagents): use cleanup and terminal owners in sweeps (#206533); a882e0f fix(agents): preserve task answers when sessions are reused (#126263); 5c5f629 perf(config): keep update inspection out of ordinary config reads (#206607); ccb6d81 fix: finish core updates when the Gateway is ready (#206560); 74f02b4 fix: refuse root updates of a system service that runs as another account (#206343); 01032b1 fix(update): keep acknowledged run IDs when status is unavailable (#206562); cbdd907 fix: finish release updates after a slow launcher response (#206503); ad676f4 improve: reduce memory used by Gateway ownership checks (#206516); 81fc833 refactor(subagents): own dormant child Stop decisions (#206479).
Later PR-number mentions: `ccb6d8168658` fix: finish core updates when the Gateway is ready (#206560), `ea77ca3d602c` refactor: report update failures from recorded runs (#206700) Later commit-SHA mentions: `238c6daf2ba6` perf: import llm-core types from their leaf entry (#206518), `ccb6d8168658` fix: finish core updates when the Gateway is ready (#206560)
Pinned PR grep: ea77ca3 refactor: report update failures from recorded runs (#206700); ccb6d81 fix: finish core updates when the Gateway is ready (#206560); 91d4912 fix(update): stop using foreign recovery records as admission (#206295); 41afc0f fix(update): keep successful plugin reload warnings advisory (#206372)

Co-authored-by: RomneyDa <[email protected]>
tideclaw-bot pushed a commit that referenced this pull request Nov 29, 2026
…ux and macOS (#207062)

* fix(update): finish stranded 2026-11-17 main checkout updates automatically on systemd and launchd

* fix(update): put the Gateway back after a failed switch, and satisfy lint and dead-export checks

* fix(update): restore only the definition files a failed install changed

* fix(update): keep the Gateway service selectors in the recovery job's environment

* fix(update): keep a migrated release serving when a resumed recovery stops; readable recovery plist

* fix(update): accept a switch only once the manager runs the new definition

* fix(update): stop at a foreign state directory, and stop a serving release before putting the previous build back

* fix(update): record only what the release could have migrated, and finish only once the checkout runs

* chore(test): record the test-line allocation for the restored recovery tests

* refactor(update): keep the recovery's command types in the service leaf module

(cherry picked from commit f79ef8c)

Release adaptation: Replace the beta.2 Linux-only early helper with its upstream Linux/macOS successor. Adapt the existing --early-release-recovery worker dispatch while keeping beta.2’s unrelated finalization paths. No migration or schema changes.

Later same-path commits from the pinned scan (separate behavior unless named as folded/selected below): dae01a9 fix: keep other agents running when one store is refused (#208364); c9f7a98 fix: keep container Gateway commands from rolling back host updates (#208271); 516166c fix: exit once when gateway run rejects an argument after an update (#208068); bd48ff6 fix: avoid restarting the Gateway for plugin timestamp changes (#208119); 6d300d3 fix: restart launcher-managed Gateways after exit 78 (#207972); c4a675f fix: avoid reloading unchanged plugins after Gateway boot (#207949); 13c67a1 fix: let updates back up deeply nested databases (#207756); e2fcd4d fix: acknowledge updates when the Gateway first becomes ready (#207819); 19e9dd6 fix(gateway): keep Linux legacy lock recovery explicit (#207340); fbf1aae fix: give safe update ownership guidance and restore legacy result delivery (#207640); 7ac87ad fix: avoid taking service-account ownership during updates (#207563); b3902a2 fix(update): allow in-place updates without a full state copy (#207448); 1c89587 fix: update system service packages without root state changes (#207304); dfd17d0 fix(docker): avoid pre-boot Doctor delays on container recreation (#207200).
Later PR-number mentions: none Later commit-SHA mentions: none
Pinned PR grep: f79ef8c fix: finish updates of 2026-11-17 main checkouts automatically on Linux and macOS (#207062)

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

commands Command implementations docker Docker and sandbox tooling docs Improvements or additions to documentation gateway Gateway runtime impact:auth-provider Auth, provider routing, model choice, or SecretRef resolution may break. impact:session-state Session, memory, transcript, context, or agent state can drift or corrupt. 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. scripts Repository scripts size: XL status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant