Skip to content

fix(update): allow direct upgrades from extended-stable - #184547

Merged
steipete merged 6 commits into
mainfrom
steipete/update-extended-stable-direct
Oct 26, 2026
Merged

steipete merged 6 commits into
mainfrom
steipete/update-extended-stable-direct

Conversation

@steipete

@steipete steipete commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes direct updates from extended-stable 2026.9.33 and 2026.9.34 failing during candidate Doctor with SQLite migration source changed after update capture, even though the disposable rehearsal succeeded.

User Impact

Operators can update directly from those releases to a candidate containing this fix; the installed updater does not need the repair. Changed data, intervening commits, replaced files, and tampered backups still refuse automatic restoration.

It also repairs a current-main regression: since #184384, updates driven by the published 2026.10.5 updater fail candidate Doctor lint and roll back (reason: doctor-failed). The source cron-selector repair here restores them; see the product proof below.

Why This Change Was Made

The published extended-stable updater records physical SQLite-family fingerprints, while current migration attribution expects committed-content generations. Design B keeps the compatibility boundary inside candidate Doctor: verify the entire incoming physical inventory and derive committed generations from the same stable observation, attribute migrations and final settlement with committed generations, then return physical postimages to the older parent. Explicit candidate inspections remain committed; only the verified legacy parent's unmarked restore inspection receives the old format.

Doctor completes agent version and additive schema preparation before ordinary readers enter, without adding exclusive custody to ordinary admission. Settlement preserves the existing narrowly bounded zero-write WAL-index transition without discarding commit evidence. No new schema, durable store, configuration option, timeout, or baseline is introduced.

Private rehearsal preserves the original cron partition selector before relocating copied state. Released parents omit source selectors and launch in the rehearsal namespace, so the snapshot uses explicit source selectors when supplied and otherwise the source state directory. Metadata discovery still uses the selected installation. This also preserves the selected-profile repair from #184384; generation-only requests do not require an environment payload.

Supersedes #182129.

Evidence

The legacy-inventory regression independently uses the published 2026.9.34 fingerprint algorithm. It fails on base 622215d053bbe4c1ec3c6cdc4a386ccd27d5a844 with the original migration error and passes with the fix. Existing refusal coverage includes changed data, same-content commits, replaced files, retained readers, native close, and tampered backups.

Before main integration: 77 focused Doctor/migration tests, 126 infrastructure tests, and 17 snapshot tests passed. After integration: all six affected source-selector/profile cases passed with artifact verification; production and affected test typechecks, targeted lint, formatting, and diff checks passed. A broader run passed all 28 assertions but was invalidated by a source edit during execution; it is not counted as a passing command.

CI run 40312346871 exposed an interaction with the new selected-profile prelude: it accessed env on generation-only requests and overwrote explicit snapshot configuration. This head integrates main and fixes both at the owning boundaries.

pr-simplify is complete. Net delta against integrated main: +201 production TypeScript lines, +281 test lines, +13 documentation lines. Remaining growth implements the legacy wire adapter, paired observation, and attributed schema preparation. Independent Codex P0–P2 review of the final diff is scoped-clean; project code was not executed by the reviewer.

Product proof (Blacksmith Testbox, real published updaters)

Lane Installed updater Candidate Lease Result
upgrade-survivor / legacy-operator-state 2026.9.34 ee78cf81686 tbx_01m5w2hcpbjv5cpqqmx9g3d1g3 PASS (lane rc=0, 828 s); same lane on main fails with the attribution refusal
upgrade-survivor / legacy-operator-state 2026.10.7 ee78cf81686 tbx_01m5w2hcnx11vavc1myb8f9xqn PASS
upgrade-survivor / legacy-operator-state 2026.10.6 ee78cf81686 tbx_01m5w37sv047nffm5vzf4am873 PASS
published-driver 2026.10.7 271851e69dd (merged main) tbx_01m5w57d04mf764kq99m0dn6wx PASS, update step 215 s (main baseline 229 s)
published-driver 2026.10.5 271851e69dd (merged main) tbx_01m5w892zepw7zkr3f96kwbfnj PASS, update step 286 s, status: ok
published-driver (control) 2026.10.5 main 06bf581731f tbx_01m5w766hvcsv2sg1q8qhhbcvk, tbx_01m5w892zfyvr6mq16mcn9k32x FAIL: candidate-doctor-lint exit 1, reason: doctor-failed, rolled back to 10.5

The 10.5 control also passed on main 59a81af6e01 (before #184384) with a 208 s update step, which places the regression at #184384. An earlier 10.5 run on ee78cf81686 timed out at the 386 s cell budget on a box roughly 1.7x slower than baseline (build 8m21s vs 3m56s); its retry on c7533575241 passed in 362 s, and the merged head passed in 286 s. Blacksmith cleanup-reconciliation warnings after completed lanes are provider bookkeeping, not lane results.

CI

The earlier update-run-watcher.interruption.test.ts failure is a latent main defect from #184275: on Linux the periodic WAL split-brain inspection now runs asynchronously, and these tests advance the fake clock past that tick and then close state synchronously. Reproduced on macOS by lifting the Linux-only tripwire gate: the old teardown fails 4 cases with the exact CI error; the new teardown (await closeOpenClawStateDatabaseAsync() first, matching other gateway tests) passes 26/26. Fixed in c7533575241.

271851e69dd merges current main (which includes #184399's path-qualified refusal message) and updates the one new expectation accordingly. CI on 271851e69dd is green.

Normalize verified 2026.9.33/34 physical database inventories inside candidate
Doctor, attribute migrations with committed generations, and return physical
receipts to the older updater. Keep explicit candidate inspections current and
preserve strict checks for changed data, intervening commits, and replacements.

Complete agent schema preparation before ordinary readers enter, and preserve
the source cron selector when a released updater snapshots a rehearsal copy.
No new schema, durable state, configuration, or ordinary-reader exclusion.

Supersedes the approach in #182129.
@clawsweeper

clawsweeper Bot commented Oct 26, 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 commands Command implementations labels Oct 26, 2026
@steipete
steipete marked this pull request as ready for review October 26, 2026 11:04
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-26T16:30:40.746245Z 3c4795c New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

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

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P1 High-priority user-facing bug, regression, or broken workflow. 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-repro Preliminary submission classification; full source review pending. labels Oct 26, 2026
@clawsweeper

clawsweeper Bot commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge.

What this changes

This PR adapts legacy database fingerprints inside candidate Doctor and prepares schemas and cron identity for direct extended-stable upgrades.

Example: Update an installation running OpenClaw 2026.9.34 directly to a candidate containing this repair.

  • Before: Candidate Doctor can reject unchanged databases with “SQLite migration source changed after update capture.”
  • After: Doctor verifies the legacy inventory, attributes migrations using committed generations, and returns fingerprints the installed updater understands.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The compatibility repair has clear value and meaningful boundary coverage, but an introduced test fails and persisted-state upgrade acceptance remains incomplete.
Proof confidence 🦪 silver shellfish (2/6) The ordinary contributor media gate does not apply to this maintainer-authored PR; the body supplies focused regression results but explicitly claims no final-candidate product PASS.
Patch quality 🦪 silver shellfish (2/6) 1 actionable review finding remain.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: An extended-stable installation can pass rehearsal but fail actual upgrade because Doctor rejects unchanged captured databases.
Reason: Compatibility with a shipped updater is a concrete product requirement, and the maintainer-authored direction is already approved.

Merge readiness

⛔ Blocked before merge - 2 items remain

Keep open: this maintainer-authored PR addresses a documented shipped-updater incompatibility, but its newly added explicit-config cron regression fails on the reviewed head.

Priority: P1
Reviewed head: e5f6d0f2eec82cc109d55a5dc9689b7cd10a649f

Before merge

  • Fix the added explicit-config cron snapshot case (P2) - The newly added explicit config case fails on this exact head in checks-node-changed-compact-small-11: it supplies a config-directory selector and expects config/cron/jobs.json, but the reopened copy selects source/cron/jobs.json. This leaves the PR's claimed explicit-selector preservation unverified and introduces a failing CI test. Correct the fixture/input or projection according to the existing selector contract, preserving the assertion that the intended partition survives.
  • 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] Fix the added explicit-config cron snapshot case — src/infra/update-candidate-state.inventory.test.ts:347-348

Tests

  • Missing end-to-end proof: Final-candidate direct extended-stable upgrade, latest-stable upgrade, and forced rollback acceptance with retained settings and data are not demonstrated.
Agent review details

How this fits together

The installed updater supplies captured database generations to candidate Doctor, which migrates preserved state and returns write receipts for rollback verification.

flowchart TD
 A[Installed updater] --> B[Captured legacy inventory]
 B --> C[Candidate Doctor]
 C --> D[Paired generation observation]
 D --> E[Existing schema migration owners]
 E --> F[Settled legacy receipt]
 F --> G[Rollback verification]
Loading

Technical review

Best possible solution:

Retain candidate-side normalization in the existing owners and correct the explicit-config cron regression without weakening partition-selection checks.

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

Released 2026.9.34 and current main use incompatible fingerprint formats, corroborated by native failures recorded in #179349; this review executed no target code.

Is this the best way to solve the issue?

Whole-inventory verification followed by candidate-local normalization addresses the compatibility boundary while retaining current generation and migration owners.

Full review comments:

  • [P2] Fix the added explicit-config cron snapshot case — src/infra/update-candidate-state.inventory.test.ts:347-348
    The newly added explicit config case fails on this exact head in checks-node-changed-compact-small-11: it supplies a config-directory selector and expects config/cron/jobs.json, but the reopened copy selects source/cron/jobs.json. This leaves the PR's claimed explicit-selector preservation unverified and introduces a failing CI test. Correct the fixture/input or projection according to the existing selector contract, preserving the assertion that the intended partition survives.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.88

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 7b95dbd3fdfe.

Provenance checked

  • Committed versus physical database generations keeps the original intent (0ac1c24: Committed-content fingerprints replaced physical fingerprints so checkpoint-only changes would not prevent safe rollback.)
  • Migration and native-close attribution keeps the original intent (8f62210: Credential cutover retained source-bound migration receipts and native custody for exact recovery.)
  • Version preparation before broader maintenance keeps the original intent (3cd9950: Declared version phases finish before broader repairs so scoped backups retain their defined recovery boundary.)
  • Empty-reader WAL-index equivalence keeps the original intent (237fdc6: A zero-write WAL index may appear or disappear after a read-only probe without changing committed contents.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

Acceptance criteria:

  • pnpm test src/infra/update-candidate-state.inventory.test.ts --maxWorkers=1
  • pnpm test src/infra/update-doctor-migration-attribution.test.ts --maxWorkers=1
  • git diff --check

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 0ac1c24 adds src/infra/update-database-generations.ts:26 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 0ac1c241fba8; files: src/infra/update-database-generations.ts)
  • Vincent Koc: Raw commit 9c87c4e adds src/infra/update-database-generations.ts:35 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 9c87c4e82620; files: src/infra/update-database-generations.ts)

PR surface

Source +199, Tests +281, Docs +13. Total +493 across 13 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 7 322 123 +199
Tests 5 323 42 +281
Docs 1 13 0 +13
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 13 658 165 +493

Root-cause cluster

Relationship: canonical
Canonical: #184547
Summary: This PR explicitly replaces the earlier direct-upgrade implementation.

Members:

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

Labels

Label changes:

  • add P1: Direct upgrades from official extended-stable releases can fail during candidate Doctor and require operator recovery.
  • 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:

  • P1: Direct upgrades from official extended-stable releases can fail during candidate Doctor and require operator recovery.
  • 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 October 26, 2026, 7:23 AM ET / 11:23 UTC.

Integrate main to repair the demonstrated CI interaction with selected-profile inspection. Keep original source selectors for rehearsal cron identity while binding metadata discovery to the selected state directory, and exclude generation-only inspection from environment rebinding.

Validation: six source-selector/profile regression cases, production and affected test typechecks, targeted lint, formatting, diff checks, and independent Codex review passed. The requested Testbox product matrix remains pending.
Since #184275 the Linux WAL split-brain inspection runs asynchronously on the
periodic maintenance tick. Interruption tests advance the fake clock past that
tick, so a synchronous close in teardown could race a pending inspection and
throw. Close through the orderly async lifecycle first.
@openclaw-barnacle openclaw-barnacle Bot added the gateway Gateway runtime label Oct 26, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 271851e69d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +517 to +520
const sourceEnv =
sourceInput.env?.OPENCLAW_STATE_DIR?.trim() || sourceInput.env?.OPENCLAW_CONFIG_PATH?.trim()
? sourceInput.env
: { ...sourceInput.env, OPENCLAW_STATE_DIR: sourceRoot };

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve source selectors in the production snapshot request

When an installation uses only OPENCLAW_CONFIG_PATH to select a config directory outside its state root, this fallback derives the wrong legacy cron identity. The production launcher in prepareUpdateCandidateStateSnapshot (src/infra/update-candidate-snapshot.ts) omits both source selectors from the serialized env, so this branch always substitutes sourceRoot, even with a current updater. If historical cron partitions exist under both directories, the newly added transform binds the rehearsal to the state-root partition rather than the source's active config-directory partition, causing candidate Doctor to inspect the wrong jobs. The new explicit-config test misses this because its test helper serializes the supplied environment directly. Pass the original selectors through the production request, and preserve an unresolved selection when an older parent's payload cannot establish the source identity.

Useful? React with 👍 / 👎.

@vincentkoc vincentkoc self-assigned this Oct 26, 2026
…ded-stable-direct

# Conflicts:
#	src/gateway/update-run-watcher.interruption.test.ts
#	src/infra/update-physical-database-generations.ts
@openclaw-barnacle openclaw-barnacle Bot removed the gateway Gateway runtime label Oct 26, 2026
@steipete
steipete merged commit ad1b598 into main Oct 26, 2026
130 of 133 checks passed
@steipete
steipete deleted the steipete/update-extended-stable-direct branch October 26, 2026 18:44
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via explicitly authorized admin squash with attributed pre-existing CI failures.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 27, 2026
)

* fix(update): support direct extended-stable upgrades

Normalize verified 2026.9.33/34 physical database inventories inside candidate
Doctor, attribute migrations with committed generations, and return physical
receipts to the older updater. Keep explicit candidate inspections current and
preserve strict checks for changed data, intervening commits, and replacements.

Complete agent schema preparation before ordinary readers enter, and preserve
the source cron selector when a released updater snapshots a rehearsal copy.
No new schema, durable state, configuration, or ordinary-reader exclusion.

Supersedes the approach in openclaw#182129.

* test(gateway): stop WAL maintenance before closing watcher test state

Since openclaw#184275 the Linux WAL split-brain inspection runs asynchronously on the
periodic maintenance tick. Interruption tests advance the fake clock past that
tick, so a synchronous close in teardown could race a pending inspection and
throw. Close through the orderly async lifecycle first.

* test(update): match the path-qualified migration refusal message
steipete added a commit that referenced this pull request Oct 27, 2026
)

## What Problem This Solves

Read-only Doctor checks can recreate SQLite WAL/SHM files after drainage, changing the physical inventory used by extended-stable update receipts even when the database contents are unchanged.

## User Impact

Doctor preserves the source database artifacts while inspecting shared auth and checking whether SQLite reclamation is needed. The update troubleshooting guide now documents direct updates from 2026.9.33/2026.9.34 starting with a release containing the compatibility and artifact-preservation fixes.

## Why This Change Was Made

Both inspections use the existing artifact-preserving read owner. Mutation still uses the existing identity, integrity, and maintenance checks. The published-driver survivor seed now creates nonempty legacy shared-auth rows with the baseline CLI and removes a title from its baseline-created session; native assertions verify both repairs before subsequent candidate CLI reads.

Production LOC: **+6**, across two production files; seven changed files total. No schema or receipt-format change.

Related: #179349, #184547.

## Evidence

- Unmodified published **2026.9.33 → packed candidate**: complete `legacy-operator-state` survivor **PASS** on Testbox `tbx_01m5xy65dny80saenbmrvetj6b` ([allocation](https://github.com/openclaw/openclaw/actions/runs/40456990168)); delegated command exit 0, lease stopped after proof. The command took **600.43 s**, including packaging and the scenario; this is execution time, not a performance comparison.
- Verified shared-auth source-row removal and unchanged relocated values, repaired session title, candidate Gateway and agent turn, cron ownership, no-op second update, clean Doctor, and backup/restore. The auth/title assertions run before candidate CLI probes.
- `pnpm test src/commands/doctor-sqlite-reclamation.test.ts --maxWorkers=1`: **9/9 passed**, **140.48 s** wall time. The new no-op physical-inventory assertion fails with the old inspection code because it recreates WAL/SHM files. Changed-file lint, formatting, and `git diff --check` passed. Independent review found no actionable P0/P1 issues.

The focused suite exercises real SQLite file families, compaction, retained readers, and cancellation. In-memory mocks cannot detect the physical WAL/SHM changes; worker preparation is included in the reported wall time.

## CI baseline attribution

The failed compact test job is [checks-node-changed-compact-small-6](https://github.com/openclaw/openclaw/actions/runs/40460500525/job/122044204234): 17 failures in `src/agents/command/attempt-execution.cli.test.ts`. A clean, frozen-install checkout of current main [`e990b80`](e990b80) reproduces all 17 failures (70 pass), including the same `terminalReplyExpectation: optional` versus `required`/`result-required` mismatches. This PR does not change that test or its reply-policy owners. The baseline reproduction used the pinned Bun runtime and completed in 183.25 s including worker preparation. The failures remain recorded; they are not attributed to the SQLite inspection change.

The other failed test job, [checks-node-changed](https://github.com/openclaw/openclaw/actions/runs/40460500525/job/122044204521), contains one OAuth failure: `makes a pending peer wait and inherit only the same-account shared rotation` in `test/oauth-refresh-authority-chain.e2e.test.ts`. Running that case with both production files restored to the exact PR-base blobs also fails with terminal `status: error` versus `ok`: the baseline reaches the peer assertion at line 537, while CI fails the preceding owner assertion at line 536. The same test fails without the patch; the actor differs, and the assertion output does not expose the underlying error. The candidate files were then restored byte for byte. The base run took 687.94 s including a cold E2E build; the test-runner phase took 95.57 s. The CI failure occurs before peer-result assertions; the baseline failure occurs at the peer result. Both are recorded for the auth test owner. The changed legacy-auth predicate is only different inside artifact-preserving inspection, which this scenario does not enter. All lint, type, and other static checks passed. Landing uses the authorized inherited-failure exception; failed checks remain failed.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 28, 2026
…claw#185561)

## What Problem This Solves

Read-only Doctor checks can recreate SQLite WAL/SHM files after drainage, changing the physical inventory used by extended-stable update receipts even when the database contents are unchanged.

## User Impact

Doctor preserves the source database artifacts while inspecting shared auth and checking whether SQLite reclamation is needed. The update troubleshooting guide now documents direct updates from 2026.9.33/2026.9.34 starting with a release containing the compatibility and artifact-preservation fixes.

## Why This Change Was Made

Both inspections use the existing artifact-preserving read owner. Mutation still uses the existing identity, integrity, and maintenance checks. The published-driver survivor seed now creates nonempty legacy shared-auth rows with the baseline CLI and removes a title from its baseline-created session; native assertions verify both repairs before subsequent candidate CLI reads.

Production LOC: **+6**, across two production files; seven changed files total. No schema or receipt-format change.

Related: openclaw#179349, openclaw#184547.

## Evidence

- Unmodified published **2026.9.33 → packed candidate**: complete `legacy-operator-state` survivor **PASS** on Testbox `tbx_01m5xy65dny80saenbmrvetj6b` ([allocation](https://github.com/openclaw/openclaw/actions/runs/40456990168)); delegated command exit 0, lease stopped after proof. The command took **600.43 s**, including packaging and the scenario; this is execution time, not a performance comparison.
- Verified shared-auth source-row removal and unchanged relocated values, repaired session title, candidate Gateway and agent turn, cron ownership, no-op second update, clean Doctor, and backup/restore. The auth/title assertions run before candidate CLI probes.
- `pnpm test src/commands/doctor-sqlite-reclamation.test.ts --maxWorkers=1`: **9/9 passed**, **140.48 s** wall time. The new no-op physical-inventory assertion fails with the old inspection code because it recreates WAL/SHM files. Changed-file lint, formatting, and `git diff --check` passed. Independent review found no actionable P0/P1 issues.

The focused suite exercises real SQLite file families, compaction, retained readers, and cancellation. In-memory mocks cannot detect the physical WAL/SHM changes; worker preparation is included in the reported wall time.

## CI baseline attribution

The failed compact test job is [checks-node-changed-compact-small-6](https://github.com/openclaw/openclaw/actions/runs/40460500525/job/122044204234): 17 failures in `src/agents/command/attempt-execution.cli.test.ts`. A clean, frozen-install checkout of current main [`9e66a2e`](openclaw@9e66a2e) reproduces all 17 failures (70 pass), including the same `terminalReplyExpectation: optional` versus `required`/`result-required` mismatches. This PR does not change that test or its reply-policy owners. The baseline reproduction used the pinned Bun runtime and completed in 183.25 s including worker preparation. The failures remain recorded; they are not attributed to the SQLite inspection change.

The other failed test job, [checks-node-changed](https://github.com/openclaw/openclaw/actions/runs/40460500525/job/122044204521), contains one OAuth failure: `makes a pending peer wait and inherit only the same-account shared rotation` in `test/oauth-refresh-authority-chain.e2e.test.ts`. Running that case with both production files restored to the exact PR-base blobs also fails with terminal `status: error` versus `ok`: the baseline reaches the peer assertion at line 537, while CI fails the preceding owner assertion at line 536. The same test fails without the patch; the actor differs, and the assertion output does not expose the underlying error. The candidate files were then restored byte for byte. The base run took 687.94 s including a cold E2E build; the test-runner phase took 95.57 s. The CI failure occurs before peer-result assertions; the baseline failure occurs at the peer result. Both are recorded for the auth test owner. The changed legacy-auth predicate is only different inside artifact-preserving inspection, which this scenario does not enter. All lint, type, and other static checks passed. Landing uses the authorized inherited-failure exception; failed checks remain failed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commands Command implementations docs Improvements or additions to documentation P1 High-priority user-facing bug, regression, or broken workflow. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: L 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.

2 participants