Repository navigation
fix(update): keep valid cold archives from blocking updates - #200659
Conversation
Co-authored-by: steipete <[email protected]>
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: blocked before merge. What this changesThis PR embeds verified cold transcript payloads in private update snapshots so rehearsal reads no longer depend on live archive files. Example: A 2026.11.4 updater rehearses a candidate with a valid file-backed cold transcript archive.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 1 item remains Keep open: this PR addresses a verified update-snapshot defect with a focused repair; source review found no actionable code defect. Priority: P1 Before merge
FindingsNone. Tests
Agent review detailsHow this fits togetherReleased updaters invoke the candidate snapshot worker to copy installation state for isolated Doctor rehearsal; it consumes live database images and publishes private, verified databases. flowchart LR
A[Released updater] --> B[Candidate snapshot worker]
C[Live agent database] --> B
B --> D[Private database image]
E[Live cold archive files] --> F[Verified archive embedding]
D --> F
F --> G[Published rehearsal snapshot]
G --> H[Rehearsal Doctor]
Technical reviewBest possible solution: Keep rehearsal snapshots self-contained through the existing verified archive owner while preserving live data and strict archive verification. Do we have a high-confidence way to reproduce the issue? Current-main source establishes the incomplete-copy path and rehearsal-relative archive lookup, corroborated by the release report; this read-only review executed no tests or updates. Is this the best way to solve the issue? This is the smallest complete repair: reuse verified embedding at the snapshot producer, retain the existing publication lifecycle, and leave live archive ownership unchanged. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against f8038cd6fcf2. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource 0, Tests +84, Docs +9. Total +93 across 3 files. Added test files: 1. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. LabelsLabel changes:
Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/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. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 17, 2026, 10:37 AM ET / 15:37 UTC. |
Co-authored-by: steipete <[email protected]>
Classify cold archive SQL under its existing candidate-state subprocess owner. Preserve incomplete WAL source families so header inspection retains private cleanup custody. Co-authored-by: steipete <[email protected]>
|
Merged via squash.
|
…200733) One archived (cold) transcript file that was already missing from live state no longer blocks every update: the rehearsal snapshot keeps it missing, reports a warning, and only a Doctor repair that reads that archive fails, as it would on live state. Dangling or unreachable links count as missing. On Windows the rehearsal always copies archives instead of hard-linking them, because removing a hard link on a filesystem without POSIX delete (for example an SMB share) clears the live file's read-only attribute. Follow-up to #200659. Refs #200594. Proof: 11.4 -> main with one missing archive refused at snapshot inventory (ENOENT); 11.4 -> fix succeeded over CLI and managed update.run with the warning. Native Windows Server 2025 probe confirmed the SMB read-only attribute loss through a hard link and none with a copy. Co-authored-by: Peter Steinberger <[email protected]>
…#200659) * fix(update): include cold archives in candidate snapshots Co-authored-by: steipete <[email protected]> * fix(update): preserve file archives in rehearsal snapshots Co-authored-by: steipete <[email protected]> * fix(update): preserve source WAL state during archive inventory Classify cold archive SQL under its existing candidate-state subprocess owner. Preserve incomplete WAL source families so header inspection retains private cleanup custody. Co-authored-by: steipete <[email protected]> --------- Co-authored-by: steipete <[email protected]>
…penclaw#200733) One archived (cold) transcript file that was already missing from live state no longer blocks every update: the rehearsal snapshot keeps it missing, reports a warning, and only a Doctor repair that reads that archive fails, as it would on live state. Dangling or unreachable links count as missing. On Windows the rehearsal always copies archives instead of hard-linking them, because removing a hard link on a filesystem without POSIX delete (for example an SMB share) clears the live file's read-only attribute. Follow-up to openclaw#200659. Refs openclaw#200594. Proof: 11.4 -> main with one missing archive refused at snapshot inventory (ENOENT); 11.4 -> fix succeeded over CLI and managed update.run with the warning. Native Windows Server 2025 probe confirmed the SMB read-only attribute loss through a hard link and none with a copy. Co-authored-by: Peter Steinberger <[email protected]>
* fix(update): include cold archives in candidate snapshots Co-authored-by: steipete <[email protected]> * fix(update): preserve file archives in rehearsal snapshots Co-authored-by: steipete <[email protected]> * fix(update): preserve source WAL state during archive inventory Classify cold archive SQL under its existing candidate-state subprocess owner. Preserve incomplete WAL source families so header inspection retains private cleanup custody. Co-authored-by: steipete <[email protected]> --------- Co-authored-by: steipete <[email protected]> Release adaptation: the baseline does not contain the #195487 header-cleanup suite. Keep that unrelated suite absent; carry the new incomplete-WAL inventory assertions into the existing inventory suite instead. Add a per-change 214-line allocation for the source regression, chunk fallback, and WAL preservation tests. No schema, updater protocol, authority, or archive-integrity changes. Companion audit at 9e917f0: - #200733 is selected as the next dependency-closure repair: missing archives must warn instead of blocking updates, and Windows copies must not share live read-only inode attributes. Do not qualify this intermediate checkpoint alone. - #200076 and #200930 are independent cold-history performance changes, not prerequisites for this snapshot repair. - #201009, #200994, #200866, #200577, #200805, #200802, and #200732 overlap only adjacent update documentation and independent repair flows; not prerequisites. Proof on base 309067b: - New production-subprocess regression: 4/4 fail before, 4/4 pass after. - Cold archives, chunks, and inventory: 31/31 pass after. - Additional budget/cleanup/import siblings: 46/47 pass. Configured-cache containment fails identically on the unchanged base at budget.test.ts:737; retained as an independent failure, not weakened or repaired here. - Targeted lint and format, documentation links, SQLite worker ratchet, and test-line ratchet pass. SQLite T1 counts remain 170; compatibility 15. - Worker typecheck was blocked at dependency custody, without guard bypass. Parent canonical core typecheck, typed lint (five files), and formatting passed with its owned dependencies. Full installed-upgrade/FRV proof remains pending the assembled candidate, including selected companion #200733. (cherry picked from commit 802e3f7) Co-authored-by: RomneyDa <[email protected]> Co-authored-by: vincentkoc <[email protected]>
…200733) One archived (cold) transcript file that was already missing from live state no longer blocks every update: the rehearsal snapshot keeps it missing, reports a warning, and only a Doctor repair that reads that archive fails, as it would on live state. Dangling or unreachable links count as missing. On Windows the rehearsal always copies archives instead of hard-linking them, because removing a hard link on a filesystem without POSIX delete (for example an SMB share) clears the live file's read-only attribute. Follow-up to #200659. Refs #200594. Proof: 11.4 -> main with one missing archive refused at snapshot inventory (ENOENT); 11.4 -> fix succeeded over CLI and managed update.run with the warning. Native Windows Server 2025 probe confirmed the SMB read-only attribute loss through a hard link and none with a copy. Co-authored-by: Peter Steinberger <[email protected]> Release backport onto 721efb2d5b3d53a768ef26f46ff19a22a8b8f404: - Preserve the exact upstream four-file patch (stable patch-id e52fafccfc30ffb527aabb16e9eac15d452de695); add only a separate 75-line allocation for its missing/dangling archive and Windows-copy regressions. - Bounded companion audit: existing missing-path classification, warning transport/redaction, capacity field, and private SQLite inspection owners support this change without further dependencies. No schema, updater protocol, authority, or archive-integrity changes. No unrelated performance companions. - Base regression: 4 intended failures / 3 passes. Missing and dangling payloads fail the production inventory subprocess; parent snapshot preparation refuses missing history; Windows selection shares the source inode instead of copying. - Independent OpenClaw review of the exact source patch and tests found no P0-P2 issues. Local review CLI unavailable; this is static independent review, not a helper-validated ClawSweeper result. - Formatting, documentation links, and test-line allocation pass. - Lint and inherited targeted typecheck cannot prepare declaration dependencies from this checkout's shared install; the wrapper refuses external symlinks. No dependencies were changed and the guard was not bypassed. Parent-owned qualified checks are still required. - The upstream installed-upgrade and native Windows SMB proof above is source provenance, not a rerun here. Native Windows and full release qualification remain parent-owned; Linux Windows-selection proof covers private-copy choice. Backport runtime proof: cold-archive, inventory, and chunk suites all pass (34/34, 138.29 seconds wall including compilation). The cold-archive file's seven cases traverse production inventory/snapshot subprocesses; Windows-copy selection is tested with a platform override, not a native SMB share. Source WAL preservation, corrupt payload failure, full copy fallback, warning output, and historical pluginBytes capacity remain covered. The original missing-file and Windows-selection regressions are green without weakening assertions. (cherry picked from commit 427c857) Co-authored-by: vincentkoc <[email protected]> Co-authored-by: RomneyDa <[email protected]>
…Claw process is writing (#200742) * fix(state): keep lease release waiting through ordinary SQLite writer contention A state lease's release gave up after 2 s of SQLite lock contention and, for worker-cleanup leases, threw the raw lock error. Doctor maintenance steps that had already committed their work (media persistence, plugin session repair, transcript directives) then failed with a bare "database is locked", leaving updates post-update-failed and sometimes the Gateway stopped. The unreleased lease also blocked the next acquirer until its stored expiry. Lock contention during release now waits the same 5 s busy bound every shared-state writer uses, and a release that still loses to a writer is retried in the background like offline-maintenance contention. Refs #197083 * test(state): restore the renewal test close after rebase Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit b1ec281) Release adaptation: keep the maintenance-line native/worker lease owner and existing-schema admission behavior; import only its existing busy-timeout constant. Resolve the append-only contention-test conflict without unrelated renewal tests. Retain the branch native best-effort fallback; exact-worker failed cleanup remains with the existing resource owner. No schema, SDK, config, or dependency changes. Companion audit: no later same-path commits or PR-number follow-ups for #200742 through main 74e5127. #200328 is already implemented at cef3501, with predecessor-stop custody retained; do not duplicate it or the separately owned #200659/#200805. The 97-line allocation covers two distinct real-SQLite regressions: completed work survives ordinary contention and failed release cannot strand its lease. Proof: both new regressions fail on 0678cec; all 19 selected lease tests pass after repair. The four #200328 owner suites pass 94 tests (3 skipped). Formatting and git diff --check pass. Targeted lint/type wrappers refuse shared symlinked dependencies; final isolated checks and full release validation remain with the release owner. No live Gateway or installed state was modified. Co-authored-by: RomneyDa <[email protected]> Co-authored-by: vincentkoc <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit 350c9f1) Release adaptation: none. Companion disposition: #200659 projects cold archive payloads and #200733 preserves missing payload warnings; #200662 retains the stable 11.5 upgrade bridge; #200786 keeps controlled npm install environment. Co-authored-by: RomneyDa <[email protected]> (cherry picked from commit 67c71dddf43d6e4ebd6e45d438706ece0742bba6)
* fix(update): include cold archives in candidate snapshots Co-authored-by: steipete <[email protected]> * fix(update): preserve file archives in rehearsal snapshots Co-authored-by: steipete <[email protected]> * fix(update): preserve source WAL state during archive inventory Classify cold archive SQL under its existing candidate-state subprocess owner. Preserve incomplete WAL source families so header inspection retains private cleanup custody. Co-authored-by: steipete <[email protected]> --------- Co-authored-by: steipete <[email protected]> (cherry picked from commit 802e3f7) Release adaptation: none. Companion disposition: #200659 projects cold archive payloads and #200733 preserves missing payload warnings; #200662 retains the stable 11.5 upgrade bridge; #200786 keeps controlled npm install environment. Co-authored-by: RomneyDa <[email protected]> (cherry picked from commit 7384191252d0eb5c3add0e64ff9402d4afa55886)
…200733) One archived (cold) transcript file that was already missing from live state no longer blocks every update: the rehearsal snapshot keeps it missing, reports a warning, and only a Doctor repair that reads that archive fails, as it would on live state. Dangling or unreachable links count as missing. On Windows the rehearsal always copies archives instead of hard-linking them, because removing a hard link on a filesystem without POSIX delete (for example an SMB share) clears the live file's read-only attribute. Follow-up to #200659. Refs #200594. Proof: 11.4 -> main with one missing archive refused at snapshot inventory (ENOENT); 11.4 -> fix succeeded over CLI and managed update.run with the warning. Native Windows Server 2025 probe confirmed the SMB read-only attribute loss through a hard link and none with a copy. Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit 427c857) Release adaptation: none. Companion disposition: #200659 projects cold archive payloads and #200733 preserves missing payload warnings; #200662 retains the stable 11.5 upgrade bridge; #200786 keeps controlled npm install environment. Co-authored-by: RomneyDa <[email protected]> (cherry picked from commit badc5c39bc62a5573ab1f8d73a5233cd0b85a3a4)
…#200786) Co-authored-by: steipete <[email protected]> (cherry picked from commit 9107009) Release adaptation: none. Companion disposition: #200659 projects cold archive payloads and #200733 preserves missing payload warnings; #200662 retains the stable 11.5 upgrade bridge; #200786 keeps controlled npm install environment. Co-authored-by: RomneyDa <[email protected]> (cherry picked from commit fc54a13ecebe318ca0126947193bb66700018d2f)
Baseline adaptation: Copy the .33 single-payload archive rows independently in the snapshot subprocess, and budget the bytes through the existing parent protocol. Integrate only with the follow-up missing-payload handling. (cherry picked from commit 802e3f7) Co-authored-by: RomneyDa <[email protected]> (cherry picked from commit f7e845d20834c2d5cebea16dc5cc687195e08b17)
…aw#194058) Failed-update triage now captures the operator's environment before managed candidate admission, so a coding agent installed only on the operator's PATH is still offered when the Gateway service's PATH differs. Restores the operator-environment contract from openclaw#134490 and keeps the launch confirmation from openclaw#143139. Proof: shipped CLI on isolated Linux (Crabbox) with a running systemd Gateway: accept launches the operator-only agent, decline starts nothing, base 18bee8e reports no agent found; published 2026.11.1 upgrades to the fix with settings intact. Co-authored-by: TorstenW <[email protected]> Co-authored-by: Peter Steinberger <[email protected]> Co-authored-by: steipete <[email protected]> (cherry picked from commit 7c702c3) Release adaptation: Capture invoking operator env before candidate admission, forward to interactive triage only; preserve latest target selectors, confirmation and lease cleanup ordering. Exact three authorized production paths plus real lifecycle regression. Follow-up dispositions: ad4863d fix: preserve the running installation when an agent updates its Gateway (openclaw#201570); dc73ec0 fix: let updates finish when another tool briefly reads OpenClaw's databases (openclaw#202541); d07b530 fix: clarify PostgreSQL schema upgrades for Git installs (openclaw#202098); e60ea9f test(update): add a Git release upgrade-survivor scenario (openclaw#201956); 2ef6f7b fix(update): build and serve Git releases outside node_modules (openclaw#201917); dbc1aa0 fix: keep the openclaw command and Gateway working after updating a pnpm install (openclaw#201735); f5e7641 fix: Git checkout updates across a schema change no longer end as post-update-failed after the new release starts (openclaw#201600); 2183caf fix: Git checkout updates no longer fail before the new release starts on a schema change or a busy database (openclaw#201463); 47e8649 fix: explain why Doctor cannot restore a scheduled job’s account (openclaw#201550); 8f2cfd4 fix: remove updater-only restrictions from agent maintenance guidance; cb5cfb2 fix: keep a doubtful killed-update recovery on the repair path (openclaw#201361); 24cb734 fix: keep carried-over scheduled jobs running after updates (openclaw#200653); d1276e1 feat(doctor): check OpenClaw ID member roles and honor an optional roles default (openclaw#197785); 0a39956 fix: finish updates when another tool reads OpenClaw's databases during the update (openclaw#201330); ea1c9d5 fix(update): settle remounted package publications before admission (openclaw#201336); 66b5212 fix(update): isolate malformed retained-install markers (openclaw#201199); 7e79c83 fix: let the next update finish a killed source checkout update (openclaw#201009); d905d8a fix: let the next update finish a killed update after the machine restarted (openclaw#200994); fdf0c95 fix: let the next update finish a killed update that had already installed the new version (openclaw#200866); 0c19bcd chore(release): close out 2026.11.5 on main (openclaw#200577); a1940e0 fix(matrix): keep explicit recovery available during deferred migration (openclaw#200805); 18b4776 improve: explain package baseline drift during updates (openclaw#200802); 1ad4cad fix(doctor): reclaim macOS updater runtimes blocked by non-updater processes (openclaw#200732); 427c857 fix: keep one missing archived transcript from blocking every update (openclaw#200733); 802e3f7 fix(update): keep valid cold archives from blocking updates (openclaw#200659); 23fca1a fix: let the next update continue after a killed update when nothing is left to repair (openclaw#200680); 3afe212 fix: let Doctor publish unchanged plugin migrations in any order (openclaw#200658); f65e4db fix(doctor): reclaim runtimes blocked by unrelated Linux processes (openclaw#200657); dab086c fix(update): let candidate Doctor read plugin dependencies from the staged package (openclaw#200595); 3447bee fix(update): keep updates going when the predecessor writes during its stop (openclaw#200569); 0ce9c77 fix: let the next update settle a package publication that a killed update left behind (openclaw#200550); ae31ea3 fix(update): repair handoffs in the journal-pinned lease store (openclaw#200532); 74020ea fix: continue updates when initial SQLite capture is stale (openclaw#200328); 6747b1e feat(update): run Git checkout installs from releases behind the release link (openclaw#199706); e3f8a67 fix(state): keep completed retained agent stores out of startup upgrade (openclaw#200284); 3c512c5 fix(gateway): move managed update lease operations off the main thread (openclaw#200169); ea69fcb chore(release): close out 2026.11.4 on main (openclaw#199956); 618bf31 fix(state): bound startup upgrade copies and pruning to owned state (openclaw#199929); e4a3093 perf(update): replace the candidate canary with a runtime contract check (openclaw#198268); 5dbf569 fix(update): plugin failures never fail an update or Gateway health; 764761e fix(update): refuse missing host prerequisites in one line and record a cause per attempt; 4c4fef4 fix(ui): update dialog claims installation before progress is confirmed (openclaw#199254); 136e1f6 fix(update): retrying an update from a dev checkout is refused after a killed update (openclaw#198673); 3bd03da fix(update): avoid duplicate database copies while the Gateway is stopped (openclaw#198148); 68a839b fix: isolate held agent databases until explicit restoration (openclaw#198180); e333f7e chore(ci): drop retired test-lines allocation records (3/3) (openclaw#197657); fd6fa47 fix: converge Gateway updates with environment-only service overrides (openclaw#196371); 7cf5e75 fix: clarify split-install updates and blocked Doctor repairs (openclaw#196342); 6ff8c86 fix(update): retain lazy sqlite catalog generation (openclaw#197095); 930e1f7 fix: keep stable updates and recovery free of premature migrations (openclaw#196474); a15f737 fix: preserve external plugin data during update rehearsal (openclaw#196301); 92798ae fix: updates survive interrupted heartbeat runs (openclaw#195656); c1e55e2 fix(update): restore LaunchAgent registration after repair contention (openclaw#195406); 715c610 fix(doctor): repair retained ISO session end timestamps (openclaw#194685); 689cfc8 fix(update): reclaim dead closing triage repair leases (openclaw#194503); 86bc89e fix(doctor): keep standing Codex parameter advice out of retirement blockers (openclaw#193650); 691bc8d fix(backup): read the backup engine without copying the live database (openclaw#194234); 000542f fix(backup): backups and updates fail on slow storage when a header probe batch misses its deadline (openclaw#194239); 31a65d5 fix(update): skip --no-lazy-fetch on Git versions without it (openclaw#194198); e45e99d fix(update): preserve dev update sources in tag-only Git clones (openclaw#193109) Validation: Baseline2 intended operator-agent failures/32 controls passed; candidate34/34passed (194058-green.log). Accept launches synthetic operator-only CLI with expected env, decline starts nothing. Isolated updater flow, not live systemd/upgrade qualification. Co-authored-by: RomneyDa <[email protected]> (cherry picked from commit 6689fd575ada8fe40a9593784deac18ec73041cd) (cherry picked from commit 92e7a9fa223b0dc35801f25f70be90b472d9a6b7)
Fixes #200594
What Problem This Solves
An update from 2026.11.4 to the 2026.11.5 candidate can roll back because rehearsal Doctor reports an intact cold transcript archive as missing. The copied agent database keeps its file-backed archive rows, but the snapshot omits their payloads.
User Impact
Rehearsal now preserves the live representation:
storage='file', a null blob, and payload files at the copied store's resolved cold path. Missing referenced files stop capture; corrupt payloads retain the normal read-verification failure. No schema, config, or updater protocol change is required.Why This Change Was Made
The snapshot producer projects the files referenced by the copied rows, including chunk files. Regular immutable files use hard links; unsupported or cross-filesystem links fall back to a reflink or exclusive byte copy. Symlinks receive independent copies. The source database and archive bytes remain unchanged.
Link safety follows the existing cold writer:
session-accessor.sqlite-archive-artifact.ts:203–225verifies and reuses an existing file, or publishes a new inode exclusively. It never overwrites an existing cold payload. Reset only unlinks its selected name (session-accessor.sqlite-reset.ts:193). The projector does not chmod shared inodes.Inventory measures referenced payload sizes through a metadata-only read snapshot. Those bytes enter the historical
pluginByteswire allowance (update-candidate-state.ts:235), which released parents already include in their free-space and I/O-time estimates. This reserves the full copy fallback even when linking is cheap, excludes orphans, and avoids decoding payloads or embedding them into SQLite.Root cause and Doctor read set
The defect was verified on main
235e38488bf2cac52d29ffde71c7e066b69f1649:update-candidate-state.ts:630–717copied database rows but transformed only shared state. No agent cold-file copy ran. All external payloads were omitted; there was no selective size, age, mode, or count filter. The reader resolves them under the copied store's siblingsessions/cold/directory.The reported candidate revision
e13cf15ece9bbd969b7362927c315362c90c97ffhas no cold-navigation migration. That newer-main path does not identify this historical failure.doctor-session-transcripts.ts:237–250).legacy-main-session-migration.ts:584–597).doctor-session-canonical-candidates.ts:241–251), then restores only the selected keys' referenced generations (session-accessor.sqlite-canonical-repair.ts:117–143). Its awaited restore loop propagates the first failure, so one reported filename does not establish that only one payload was absent or would be read. These reads protect history before copying or archiving it.Evidence
Real SQLite, real compressed files, and the candidate snapshot subprocess preserve file-backed rows and null blobs. Restoration after the whole source state directory becomes unavailable reproduces the original ENOENT failure on task base
57b9b9bc786796c07ab5b2489244521ca14d739fand passes with this fix. Live missing/corrupt diagnostics remain asserted; a corrupt rehearsal file also fails normal verification.Against rejected review head
0d3fa05646d8a37c22d1c68c2dfaa67fa6768bc1, the four-case regression file had 3 failures / 1 pass, exposing changed row shape, eager corruption handling, and omitted capacity bytes. With the revision, all four pass.51 tests passed at accepted design head
f40dedc91a81ea1afd28ff43de15813dfae90f2bin the four named suites:update-candidate-state.cold-archives.test.ts(4),update-candidate-state.inventory.test.ts(19),session-cold-storage.test.ts(21), andsession-cold-storage.chunks.test.ts(7). The chunk projection test forces EXDEV for one link, proves a distinct fallback inode, removes source files, and decodes exact copied events. The single-file regression proves actual hard-link identity. The real parent capacity assertion includes the exact payload bytes.Command:
pnpm test src/infra/update-candidate-state.cold-archives.test.ts src/infra/update-candidate-state.inventory.test.ts src/config/sessions/session-cold-storage.chunks.test.ts src/config/sessions/session-cold-storage.test.ts --maxWorkers=1. Wall time 117.87s, including cold compilation. The four regression cases execute in 17.66s; the new chunk/fallback case takes 42ms. These are prior-head results; current repair results follow below.Exact CI core-leaf type-aware/type-checking oxlint passes for all four touched TypeScript files. Touched-file oxfmt and
git diff --checkpass.Pr-simplify complete: removed snapshot embedding; one file-selection owner serves sizing and projection. Against task base: +115 production lines, +196 test lines, +15 documentation lines. The CI repair adds no helper or fallback; it removes the closed-WAL opt-in, names the existing worker boundary, and strengthens the existing regression. Growth implements file projection and compatible capacity accounting, with no new durable state or manager.
Independent delta autoreview (Codex, P0–P2) of the complete five-file local change against
0d3fa05646d8a37c22d1c68c2dfaa67fa6768bc1: scoped-clean, no findings. That review covered the accepted design revision; the CI-repair delta has its own review below.CI repair: the SQL helper already runs exclusively through the candidate-state subprocess's inventory and snapshot operations (
update-candidate-state.worker.ts:146, line 169). Renaming it toupdate-candidate-cold-archives.worker.tsgives the database-worker inventory the documented worker classification. No baseline or allowance changed.The header-cleanup CI failure came from inventory's
allowClosedWal: trueread creating WAL/SHM files on a closed WAL source. The later header inspection consequently took a direct read and never created the private header copy whose failed cleanup it should retain. Removing that opt-in (update-candidate-cold-archives.worker.ts:68) uses the existing private-copy fallback and preserves the source family. The original assertion is unchanged. It reproduced 1 failure / 3 passes onf40dedc91a81ea1afd28ff43de15813dfae90f2b; stronger post-inventory sidecar checks reproduced 4 failures / 0 passes before the production fix.Current repair: 34 tests pass, in
update-candidate-state.header-cleanup.test.ts(4),update-candidate-state.cold-archives.test.ts(4),update-candidate-state.inventory.test.ts(19), andsession-cold-storage.chunks.test.ts(7), in one named-file run with--maxWorkers=1(79.99s, including compilation). These cover retained cleanup custody, source preservation, file-backed row fidelity, missing/corrupt archives, fallback projection, and capacity accounting.CI-core typed oxlint, oxfmt, and
git diff --checkpass on the repair's four touched TypeScript files. The single named database-worker ratchet script passes against task base57b9b9bc786796c07ab5b2489244521ca14d739f: T1 166 → 166; T1-compat 15 → 15, with no baseline or allowance edits (node --import ./scripts/tsx.mjs scripts/check-database-worker-ratchet.mts --base 57b9b9bc786796c07ab5b2489244521ca14d739f --no-merge-base).Independent delta autoreview (Codex, P0–P2), base
f40dedc91a81ea1afd28ff43de15813dfae90f2bthrough the staged four-file repair now committed as3423beb43d050b09136c4f786efe34234fd0c73c: scoped-clean, no findings. No reviewed source changed afterward.Limits: the saved report and live issue comments do not identify the affected session key or failing Doctor phase, so the exact predicate selecting the reporter's row remains unconfirmed. No full macOS published 11.4 → candidate update or package build was run; the configured Crabbox provider refused the named-suite request because its API key is missing. SQLite is qualified here; PostgreSQL export paths were not exercised. Files created after inventory retain the existing live-growth limit of the estimate. Broad proof is left to PR CI.
Reported by @SimonAIbot (with detailed archive evidence)
Work sessions
Linked for team reference; these sessions aren’t public.