Repository navigation
Conversation
Preserve the published physical fingerprint contract across candidate admission, migration receipts, native close, and old-parent rollback inspection. Select legacy only on an exact captured inventory match; candidate recaptures remain committed-content based. Keep all source and native integrity checks. Update the documented intermediate-hop guidance for older candidates.
|
🦞👀 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 SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 91c4956b50
ℹ️ 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".
| after?.toString("hex") ?? null, | ||
| ]), | ||
| ), | ||
| }; |
There was a problem hiding this comment.
Preserve empty-reader equivalence for legacy fingerprints
When a 2026.9.33 capture is admitted and a read-only probe subsequently opens a cold WAL database, SQLite creates an empty WAL and zero-write SHM header without changing committed data. This legacy branch hashes that header and returns before supplying an emptyReaderAlternate, so readMatchingUpdateDatabaseGeneration(..., true) rejects the unchanged source and migration fails with SQLite migration source changed after update capture. The existing cold-reader migration tests cover this transition only with current-format captures; the new legacy tests use DELETE journal mode. Preserve the equivalent absent/zero-write-header fingerprint in legacy mode as well, while continuing to reject write evidence. This also follows the update contract required by root AGENTS.md.
AGENTS.md reference: AGENTS.md:L77-L77
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Retaining strict 2026.9.33 physical matching here. This adapter is scoped to exact verification of the entire captured inventory, without accepting mismatched fingerprints or weakening integrity checks. An empty-reader alternate would expand that acceptance contract. The committed-content path keeps its existing empty-reader equivalence; changes to fingerprinted physical metadata in a legacy capture continue to fail closed. I will call out that limitation in the PR evidence.
|
Codex review: blocked before merge. What this changesPreserve the 2026.9.33 database fingerprint format through candidate migration and rollback verification. Example: An installation running 2026.9.33 updates directly to a candidate containing this fix.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 1 item remains Keep open: this maintainer-authored PR repairs a documented incompatibility in the shipped updater and remains intentionally draft; no additional introduced code defect was established. Priority: P1 Before merge
FindingsNone. Tests
Agent review detailsHow this fits togetherThe updater captures database generations before activation; candidate Doctor consumes those generations, attributes migration writes, and returns receipts used to verify safe rollback. flowchart TD
A[Installed updater] --> B[Captured database inventory]
B --> C[Candidate Doctor admission]
C --> D[Existing generation owner]
D --> E[Migration and native close]
E --> F[Settled write receipt]
F --> G[Rollback verification]
Technical reviewBest possible solution: Retain the narrowly scoped legacy adapter in the existing digest and migration owners while preserving current-format behavior and exact changed-source rejection. Do we have a high-confidence way to reproduce the issue? Published 2026.9.33 source and current main use incompatible unversioned fingerprints, corroborated by native failures recorded in #179349; no target code was executed during this review. Is this the best way to solve the issue? The patch addresses the compatibility boundary at the existing digest owner, selects legacy only after an exact whole-inventory match, and propagates that selection without weakening current-format checks or adding durable state. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 18640533dd64. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +94, Tests +130, Docs +7. Total +231 across 11 files. Added test files: 0. View PR surface stats
Review metrics
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 October 23, 2026, 11:34 PM ET / October 24, 2026, 03:34 UTC. |
* 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 #182129. * test(gateway): stop WAL maintenance before closing watcher test state 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. * test(update): match the path-qualified migration refusal message
|
Superseded by #184547, merged as ad1b598. #184547 restores direct updates from the 2026.9.33/34 extended-stable line differently. The candidate Doctor admits the legacy physical-generation inventory only on an exact whole-inventory match, uses committed generations internally, and reports physical postimages back to the legacy parent. A Testbox upgrade-survivor run from 2026.9.34 (legacy-operator-state) passes on that change; main before it refused migration attribution. |
) * 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
What Problem This Solves
2026.9.33 and current releases use unversioned hex64 database generations, but 9.33 fingerprints the physical SQLite family while current releases fingerprint committed content. Direct updates can reject the older capture during Doctor or automatic rollback.
The digest owner selects legacy format only after exact whole-inventory verification and retains it through migration, native close and settlement. The unmarked restore inspector receives physical fingerprints only when its verified live parent is the recorded 9.33 producer. Candidate-created captures retain committed-content fingerprints. Mismatches still refuse restoration.
Related repairs keep captured native-close callbacks reachable through an already captured disposer, acquire capture custody before agent-schema/admission reads, and use existing artifact-preserving snapshots for reclamation and shared-auth inspection. No schema, dependency version, public configuration, or integrity-check changes. Packaging repair #182168 and entry-budget repair #182279 are included upstream. The #179349 troubleshooting guidance retains the hop for older candidates and describes direct updates from the release containing the completed fix.
Evidence
Blocked: 10.7 published-driver proof passes, but 10.5 fails migration attribution. Pushed head:
099ff82cf23a950338e551d43b6ba4918b2b4a89.The native 2026.10.5 → candidate update exits successfully and preserves the retained session, transcript and idle node, but its first installed Doctor reports
Automatic database restoration cannot attribute migration writes: SQLite migration publication could not be verified.A single diagnostic replay reproduces nativedatabase is lockedatrunUpdateSqliteMigrationwhile ordinary agent admission requestsPRAGMA locking_mode=EXCLUSIVE; BEGIN EXCLUSIVE; ROLLBACK;during legacy session-title repair. Both runtime scopes were stopped. This cell is a failure, not a pass.An uncommitted local repair restricted all four newly added compatibility guards to exact verified legacy captures. It removed the lock exception but the expanded committed-format regression still reports
unchanged: false, including after the retained reader closes before writer shutdown. The repair is rejected; no integrity assertion was weakened. The PR stays draft pending a design that preserves attribution without conflicting with ordinary readers. No 9.33 rollback or final fresh-install matrix result is claimed for this head.The previous
84344e62641CI published-driver cell failed 2026.10.7 → candidate at media-persistence withSQLite migration source changed after update capture. Its receipt could not attribute publication, so rollback correctly preserved the databases. The same driver passed mainee855ce57341eb3259741087681be0b0e1ec837c: main job, candidate failure. This is not attributed as inherited.The expanded owning regression exposed a media handle setting its page cache before capture custody. That pragma can change the legacy WAL fingerprint. Media now enters the same capture owner before this first SQLite operation. Tracing verified that current-format captures remain committed-content; the format-selection contract is unchanged. The regression runs actual asynchronous schema, media and shared-auth migrations using frozen schema24/physical and schema25/committed fixtures and verifies the final receipt format. All 17 tests pass (81.04 s wall) under the default pinned Bun; both migration cases also pass under Node 24 (35.11 s wall), the published updater runtime. Independent P0/P1 review and changed-file format/lint/diff checks pass. The exact-head canonical package now passes the unchanged 2026.10.7 → candidate Docker harness on a 16 GiB host, with the broader default Doctor seeding that exposed the earlier failure. The actual update completed in 458.7 s; durable update record, retained data, incognito non-retention, running version, Gateway readiness and final service stop all pass. Package SHA256:
90b95f3f05739b904ace07408892581251d85b79f639f2c99fe7873837a87d2b(121,414,217 bytes; embedded commit matches). Remaining native proof runs in order: 10.5, 9.33 including forced post-migration rollback, fresh install/Gateway start. No complete matrix pass is claimed yet.The previous
84344e62641canonical tarball passed fresh global npm installation, API/SDK import, package budgets, Gateway readiness/health and clean shutdown on an AWS c7a.2xlarge (15.25 GiB RAM, 8 vCPU, no swap). SHA256:8855523dc187801806734cc18466b0dccd21f446a841949514322ff03664ca10; 121,401,440 bytes. Embedded commit matches the pushed head.48143e0eBoth trees pass the unchanged 47,500-entry budget. This is one controlled qualification pair, not a statistical performance claim.
Before the media repair, normal shared-auth passed 36 tests, one platform skip, 74.63 s wall. The new owning regressions do not replace final native proof.
Previous-head CI passed production/test types, all core lint stripes, source contracts, guards, npm lock and security-fast. Ten other observed failures match saved main evidence: locale drift, UI test-plan, Knip (82 findings, zero unmatched against main), TypeBox clone identity, Windows long-path compiler, PDF instructions, completion-tool and configured-MCP authority text, Gateway abort settlement and subagent-stop reconciliation. The product update failure above was not treated as inherited. That CI run was cancelled after the failed gate; unrun coverage is not claimed passing. New exact-head CI is running alongside native proof.
Size and accepted edge case
Net +138 production lines across the PR, within Peter's approved +150 budget. Each part serves the same update contract: original +94 comprises +52 at digest/producer ownership, +22 for private worker transport, +12 for migration/native-close propagation and +8 for admission/settlement; +19 preserves late native-close observers; +16 adds agent-schema custody (+11) and artifact-preserving reclamation inspection (+5); +9 covers normal admission custody (+8) and shared-auth source inspection (+1). The final media first-operation guard adds six lines, offset by three redundant local declarations and three comment lines in the same owner. No new durable state or lifecycle is introduced.
Legacy equality remains exact. A separate native reader changing fingerprinted WAL-header metadata may conservatively refuse restoration. An alternate legacy digest exception was declined because it would broaden equality. The final published-driver matrix must pass before this PR is ready.
Current manual broad CI also exposed two failures still under investigation: history-worker idle join and Doctor progress persisted-detail assertions. Both isolated candidate replays pass unchanged (29.98 s / 25.68 s); current-main full files pass 14 and 20 tests (90.63 s / 133.52 s). These observations do not establish a fix or inherited attribution. The required PR gate remains pending while draft.