Repository navigation
Conversation
|
🦞👀 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. |
|
Thanks for the context here. I swept through the related work, and this is now duplicate or superseded. Close this PR as superseded: the merged replacement explicitly adopted and credited its batching and recovery work, which current main retains. Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Canonical path: Retain the released replacement and close this superseded branch with its contributor credit preserved. So I’m closing this here because the remaining work is already tracked in the canonical issue. Review detailsBest possible solution: Retain the released replacement and close this superseded branch with its contributor credit preserved. Do we have a high-confidence way to reproduce the issue? Source inspection confirms current main uses bounded batch transactions instead of the reported per-archive structure; no target code or tests were executed. Is this the best way to solve the issue? The existing shared migration owner was the appropriate fix boundary, and the merged replacement already carries that solution and its recovery refinements. Security review: Security review cleared: The reviewed change preserves maintenance checks and archive-path containment without adding dependencies or broader authority. AGENTS.md: found and applied where relevant. What I checked:
Codex review notes: model internal, reasoning medium; reviewed against 27a0be4a75d9; fix evidence: release v2026.10.5-beta.1, commit 292c78d743d0. |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Contributor-side recovery findings are addressed on The remaining release proof needs a maintainer-owned lane: |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
ClawSweeper recorded closeout evidence for this proposed close.
|
What Problem This Solves
Doctor's canonical transcript archive migration opened two immediate SQLite transactions per archive, including archives whose blobs did not need a rewrite. On installations with hundreds of historical archives, each transaction repeats maintenance and update-admission checks while Doctor has the Gateway stopped. Closes #161734.
Change
Archives are planned in bounded batches of 32. A first SQLite transaction validates and commits changed canonical blobs as unpublished, recording original publication timestamps in a small recovery journal. File repair then runs outside the SQLite write transaction. A second transaction restores publication timestamps only for verified files, advances the cursor, and removes only settled journal receipts; missing-file receipts persist until the file returns. If file repair or cursor commit fails, the rewritten rows remain unpublished. On a later run, journal recovery is independent of the caller's batch cursor and tolerates deleted, inserted, or independently rewritten archive rows without restoring stale timestamps. Directive and media migrations share the recovery key, so either owner first settles a pending published row before applying its own transform. A completed directive cursor still admits pending journal recovery, and a later transform of a pending blob carries its original timestamp forward only when the receipt matches the prior blob hash. Maintenance authority is checked at each write boundary and before atomic file publication. The two per-owner journal key names existed only on earlier unmerged heads of this PR; neither current main nor a release tag contains them, so the shared key has no deployed-key migration to perform.
Evidence
Exact head
81ee4634e87c94bac23586: with an unresolved missing-copy receipt before anarchivescursor and another archive still after it, Doctor returnedwarnings: []. The integration case failed before the fix and now verifies warning-bearing retries, then file repair, publication timestamp restoration, receipt clearance, and no warning.git diff --checkpassed. No full local suite was run.70d446db3a2and remains earlier-head evidence. Hosted CI and exact-head ClawSweeper review are pending. Published-updater → candidate Doctor validation and acceptance of the durable journal remain maintainer-owned under the existing handoff.Earlier-head evidence on
c94bac2358670d446db3a2: a pending receipt survived, but Doctor returnedwarnings: []while the archive file was absent. Recovery now returns a bounded missing-copy summary and path example through Doctor on every retry. After the copy returns, Doctor repairs it, restores the original publication timestamp, clears the receipt, and returns no warning.migrateHistoricalTranscriptDirectiveswith a completed cursor and a missing copy. It verifies two warning-bearing retries followed by file repair and warning clearance. The pre-fix case failed as expected. 46/46 focused tests across four affected files passed on this head; Core and infra-test typechecks, changed-file lint/format, andgit diff --checkpassed. No full local suite was run.70d446db3a2and remains earlier-head evidence. Hosted CI and exact-head ClawSweeper review are pending. Published-updater → candidate Doctor validation and acceptance of the durable journal remain maintainer-owned; the existing handoff requests both.Earlier-head evidence on
70d446db3a23b3dae004763: a complete directive cursor skipped pending recovery, and a second transform of a missing-file pending blob lost its original timestamp. Both pass on this head.git diff --checkpassed. No full local suite was run.{"head":"70d446db3a2","copiedExistingZstdArchives":8,"twoTransformsWhileFileMissing":true,"reopenedDatabaseBeforeRecovery":true,"originalPublicationRestored":true,"blobAndFileDigestVerified":true,"journalCleared":true}build-artifactsfailed because generatedextensions/workboard/openclaw.plugin.jsondiffered from committed bytes. Both real-Gateway UI jobs stopped in prebuilt setup on a dirty checkout before running tests; a large Node shard failed a Gateway subscription assertion, while its infra-storage shard passed. These jobs do not exercise the archive migration diff. Hosted CI for this new head remains pending and is not claimed green.schema_metajournal remain open. The maintainer handoff requests both. This helper trace does not substitute for the upgrade lane.Earlier-head evidence on
3b3dae004763pnpm tsgo:core, changed-file type-awareoxlint,oxfmt, andgit diff --checkpassed. No full local suite was started for this follow-up.migrateTranscriptDirectiveArchivesimplementation on copies of eight existing published Zstd archive records. A legacy reaction directive was injected only into each copy. Trials injected a cursor failure, file-repair failure, or a missing file after failure. They verified that rewritten rows remained unpublished with a persisted recovery journal, closed and reopened SQLite, retried, and verified each final blob digest, file byte sequence, and original publication timestamp. The missing-file trial verified that its receipt persisted through an incomplete retry, then recovered after the file returned. No live database or serving Gateway was modified:{"head":"3b3dae004763","copiedExistingArchives":8,"injectedLegacyDirectiveArchives":8,"productionHistoricalDirectiveTransform":true,"injectedCursorFailure":true,"injectedFileFailure":false,"missingFileReceiptRetainedAndRecovered":false,"failedBatchLeftAllPublicationPending":true,"persistedRecoveryJournal":true,"reopenedDatabaseBeforeRetry":true,"retryRewrittenArchives":0,"finalBlobDigestFileAndPublicationVerified":8,"durationMs":1646} {"head":"3b3dae004763","copiedExistingArchives":8,"injectedLegacyDirectiveArchives":8,"productionHistoricalDirectiveTransform":true,"injectedCursorFailure":false,"injectedFileFailure":true,"missingFileReceiptRetainedAndRecovered":false,"failedBatchLeftAllPublicationPending":true,"persistedRecoveryJournal":true,"reopenedDatabaseBeforeRetry":true,"retryRewrittenArchives":0,"finalBlobDigestFileAndPublicationVerified":8,"durationMs":1734} {"head":"3b3dae004763","copiedExistingArchives":8,"injectedLegacyDirectiveArchives":8,"productionHistoricalDirectiveTransform":true,"injectedCursorFailure":false,"injectedFileFailure":false,"missingFileReceiptRetainedAndRecovered":true,"failedBatchLeftAllPublicationPending":true,"persistedRecoveryJournal":true,"reopenedDatabaseBeforeRetry":true,"retryRewrittenArchives":0,"finalBlobDigestFileAndPublicationVerified":8,"durationMs":1864}This proves the changed migration owner and crash/retry boundaries on copied existing archive data. It is not a complete published-updater or candidate Doctor run. The upstream
update-migration.ymllane is restricted toopenclaw/openclaw, and this host has no Docker; that release-lane proof and acceptance of the durableschema_metarecovery contract remain explicit maintainer decisions. The earlier head passedpnpm build; on that head,pnpm checkpassed preflight and typechecks but repository-wide lint hit two untouched max-lines violations. The earlier fullpnpm testwas stopped after 4h15m and has no aggregate result. The eight-archive performance comparison from the initial head was not rerun on this one. This PR does not address the separate Codex-plugin maintenance-lease refusal.