Repository navigation
chore(e2e): add bounded package-tree recovery witnesses - #185644
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
@clawsweeper re-review Please review exact head |
|
🦞👀 Re-review progress:
|
|
Codex review: needs maintainer review before merge. What this changesThis PR adds bounded package-tree snapshots and strict comparisons with an explicit permission-tightening mode. Example: before/after values are internal harness observations, with no user-visible behavior change
Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Partial Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored PR provides a focused recovery-test prerequisite, with no actionable defects found and passing exact-head CI. Priority: P3 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe upgrade-survivor test harness reads package directories into in-memory inventories and compares their contents, identities, ownership, links, and modes. flowchart LR
A[Package directory] --> B[Bounded tree capture]
B --> C[Entry inventory]
C --> D[Tree comparison]
E[Expected permission transition] --> D
D --> F[Pass or bounded diagnostic]
Technical reviewBest possible solution: Retain this bounded witness as the focused prerequisite and complete its installed-recovery integration in the linked PR. Do we have a high-confidence way to reproduce the issue? This PR adds a test prerequisite rather than fixing a reported runtime defect; no target code was executed during this read-only review. Is this the best way to solve the issue? The helper is a coherent minimal stage: it bounds discovery and hashing, closes handles, retains complete inventories, and makes the permitted mode transition explicit without changing historical survivor cells. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 5a3baf1a6e13. TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceTests +223, Other +139. Total +362 across 3 files. Added test files: 1. 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 27, 2026, 3:49 AM ET / 07:49 UTC. |
|
Merged via squash.
|
Related: #177381
What Problem This Solves
Installed-package recovery tests need a bounded filesystem witness that distinguishes tree changes from the updater's expected permission tightening.
User Impact
No user-visible change. This adds harness helpers and tests; product runtime changes: 0.
Why This Change Was Made
Capture the root and complete entry inventory, including hidden files, bytes, raw symlink targets, ownership, inode identity, and permissions. Comparisons stay exact unless the caller explicitly requires the canonical permission-tightening transition. Entry and byte limits fail without truncating the compared inventory; directory handles close before descent and on budget failure.
This self-contained prerequisite keeps the later installed-recovery integration separate. The four tests cover physical rename/hardlink behavior, strict and permitted transitions, bounded diagnostics, and wide-directory early stopping with real handle closure.
Evidence
c5f05618c0d1d9f0f620c34c93977d1133f764a9; 139 harness/declaration lines and 223 test lines, no product runtime change.2e365e785eabec0b6cff93a3cd95b65a5d9f8185(base9d1606006cb533c2952925e4fd149d3f4c606d4aplus the signed source), using Bun 1.4.4-canary.1 / Vitest 5.0.5 on Linux x64.