Repository navigation
test(update): cover lease database loss shapes reported after temp cleanup - #167564
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. |
|
Codex review: needs maintainer review before merge. What this changesExtends package-recovery tests to cover completed publication after a missing lease database, a recreated parent directory, or a replacement database inode. Review scores
ProductKind: Test only · Worth it: Yes Merge readiness✅ Ready for maintainer review This PR provides useful, distinct recovery coverage that current main lacks. No actionable patch defect was found. Priority: P3 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherPackage updates record publication and recovery obligations in SQLite. Public repair verifies the installed package, settles obsolete recovery obligations, preserves evidence, and allows another update to prepare. flowchart TD
A[Published package fixture] --> B[Remove or replace lease database]
B --> C[Public update repair]
C --> D[Verify package and current ownership]
D --> E[Settle and archive recovery evidence]
E --> F[Prepare next package]
F --> G[Assert preparation succeeds]
Technical reviewBest possible solution: Retain the focused recovery coverage and track supported older-driver recovery and storage durability in the existing issue discussions. Do we have a high-confidence way to reproduce the issue? Not applicable to a new runtime defect: the tests exercise recovery states current main already handles, and the PR reports three successful harness runs. Is this the best way to solve the issue? Yes. Extending the existing public-repair table protects distinct completed-publication states without duplicating a recovery implementation or adding production seams. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 77cecb544965. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceTests +17. Total +17 across 1 file. Added test files: 0. View PR surface stats
LabelsLabel changes:
Label justifications:
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 8, 2026, 10:03 PM ET / October 9, 2026, 02:03 UTC. |
|
Merging at the pinned head despite one red check. |
…eanup (openclaw#167564) Adds recovery regressions for the three ways OS temp cleanup removes the managed-update handoff lease database (missing file, recreated parent directory, replacement inode), as reported in openclaw#167506 and openclaw#167557: recovery settles and admits the next package preparation. Main already settles these via openclaw#165238 and openclaw#164849; 2026.9.9 does not include them. Refs openclaw#167506 openclaw#167557.
What Problem This Solves
The reported publication-complete recovery states lacked explicit coverage for temporary lease database loss. This adds the reported shapes to the existing published-candidate recovery test: a missing file, a recreated parent directory, and a replacement inode.
Refs #167506 #167557
User Impact
Regression coverage only: main already settles these states and admits the next package preparation. OpenClaw 2026.9.9 does not include the missing-database fix in #165238 or the replaced-database fix in #164849. These tests do not establish a recovery entry point for an already-blocked older installed driver.
Thanks @mkdelta221 and @masterdevill for the detailed reports.
Why This Change Was Made
Reuse the existing recovery fixture and assertions instead of duplicating the prepared-operation cases from the earlier fixes. Retain the existing publishing/replaced case and add only the three publication-complete cases. Each exercises public repair, checks durable settlement, and prepares the next package successfully.
Moving the lease database remains a separate design decision. Simply changing its default path splits authority: live drivers and retained config/service custody can remain in the old registry while new callers use an empty one. This PR changes neither production behavior nor storage location.
Evidence
node scripts/run-vitest.mjs src/cli/update-cli/update-repair-package-activation.test.ts --maxWorkers=1: 75 tests passed on each of three runs; wrapper wall times 68.39s, 52.49s, and 47.86s.git diff --check: passed.node scripts/check-changed.mjs: all preceding checks, including core test typechecking, passed; the dead-export scan failed on four untouched production exports (the unchanged baseline reproduces the exact same findings). The remaining scoped core lint command passed separately.78a91dba21d485211ba97e51d5801a7f0afa301ereproduced the same dead-export findings after temporarily removing this test diff, then the exact three-pass-tested bytes were restored. Production scan findings:bindCliQuestionAnswerAuthority,prepareSessionEventTargetForHost,readSessionEntryCreationTransition, andRESTART_CONTINUATION_CONTEXT_PREFIX. The full-tree scan reports the latter two; the script scan passes. No baseline or ignore changes were made.