Repository navigation
fix(pr): recover dependency caches after device identity changes - #192855
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Codex review: needs maintainer review before merge. What this changesThis PR adds an explicit command to adopt inspected dependency-cache device numbers while preserving installations and lifetime holds. Example: A cache and its installations now report device 2049, while their ledger records device 2048.
Review scores
ProductKind: Feature · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this maintainer-authored PR open: it adds useful, narrowly scoped recovery, and no actionable introduced defect was found. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe PR wrapper authenticates tooling source and passes an operator-sealed plan to the existing SQLite cache-lifetime owner, which validates identities and commits the narrow repair. flowchart TD
A[Operator recovery plan] --> B[PR wrapper]
B --> C[Official main source verification]
C --> D[Cache metadata mutex]
D --> E[Lifetime ledger transaction]
E --> F[Device identity adoption]
F --> G[Ordinary PR admission]
Technical reviewBest possible solution: Retain the explicit recovery operation in the existing lifetime owner, with ordinary identity admission and historical holds preserved. Do we have a high-confidence way to reproduce the issue? Source establishes that changed device numbers trigger ordinary ledger-owner refusal, and the supplied fixtures exercise that condition; no reproduction was run during this read-only review. Is this the best way to solve the issue? The change uses the existing mutex and lifetime ledger, preserves collection authority, and provides exact replay without adding a competing state owner. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against e81ab2295501. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceTests +548, Docs +62, Other +244. Total +854 across 7 files. Added test files: 0. View PR surface stats
Review metrics
LabelsLabel changes: No label 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 HistoryReview history (1 earlier review cycle)
Reviewed November 4, 2026, 10:59 AM ET / 15:59 UTC (Revision 2). |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
…nclaw#192855) * fix(pr): recover dependency caches after device identity changes * test(pr): narrow verified cache recovery fixture identities
What Problem This Solves
Fixes maintainer PR operations remaining blocked when the dependency-cache ledger's recorded device numbers no longer match the independently inspected filesystem identities.
User Impact
Operators can explicitly adopt the audited device identities and resume ordinary PR tooling. Recovery requires authenticated official-main tooling, a sealed exact-state plan, and operator confirmation. Matching inodes or a reboot alone do not establish that adoption is safe.
Why This Change Was Made
The new recovery operation uses the existing lifetime owner to validate the complete physical inventory and logical preimage under its metadata mutex and one synchronous SQLite transaction. It updates only cache, database, and installation device cells. Historical holds, sequence, settlement, reuse order, and installed contents remain intact; an exact postimage reconciles a lost response.
The command authenticates the official repository and complete source closure before opening the ledger, without package installation. The existing current-workflow recovery path shares the unchanged official-origin policy. Materialized recovery wrappers are explicitly retained on success and failure. Exit cleanup must not open SQLite and roll back an unresolved journal after recovery refuses it. Production grows by 243 lines for explicit adoption, source admission, reconciliation, and this cleanup boundary; 548 test lines have a matching allocation.
Evidence
1835c9cad10a936fbd079a52e65bb2ede5ef1e38, local snapshot SHA-25683c6bea9751b9cc39c0a5901f1d27da119844700fb2b5219d7d8ed32339fbea2; signed commit5ae4c8eccca4cc76797ae4ced662731fe5ed6aaahas the identical patch. That local model result is historical proof for5ae4c8. Final headb5c82053c1c7c39ebb85c9639a171cff6ac98cd0adds only two independently reviewed fixture non-null annotations; Node type stripping confirms unchanged runtime code, and both affected fixture cases plus targeted lint pass.f2ef3284daf775944704fd50f931244157e574e2(baselinee81ab22955018b2f15adf50eac6bfcb86ea56ae3plus headb5c82053c1c7c39ebb85c9639a171cff6ac98cd0). Its tooling compiler leaf passed with exit code 0. This does not claim the whole type job passed.NEWclassification against a passing main comparator is preserved. Other baseline ratchets andsecurity-fastpassed; the CI gate propagates the identified failures. Independent review accepted this attribution; CI is not relabeled green.b5c82053c1c7c39ebb85c9639a171cff6ac98cd0and reports no findings or before-merge actions.