Repository navigation
feat: purge selected trash transactions - #80
Conversation
Validate the entire named selection before removing trash, preserving the existing purge hooks, mount checks, lock and audit trail. Closes #78
|
P1: repository-wide worktree pruning can break undo for an unselected trash transaction. Verified at exact head
A private real-Git regression with two separate trash transactions and an expired administrative registration reproduced the failure both on this PR and combined with PR #82. Existing focused tests passed and did not cover this case. Scope registration cleanup to the selected transaction, or preserve registrations while other recoverable transactions depend on them. Add a regression that purges one transaction, undoes the other, and verifies the restored worktree works with Git. No actual user cleanup, purge or undo was performed. This is a reproduced data-recovery defect, not an inference from CI metadata. |
Deploying keeper with
|
| Latest commit: |
2ac1e9c
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://62ded1bf.keeper-9oy.pages.dev |
| Branch Preview URL: | https://cb-purge-transaction.keeper-9oy.pages.dev |
|
Fixed review P1 in 1389df1. Purge now defers repository-wide worktree prune while another recoverable transaction references the same Git directory, preventing one targeted purge from deleting another transaction’s undo registration. Added a real two-transaction same-repository regression proving targeted purge preserves the second registration and undo restores it. Focused tests, Biome, TypeScript, and diff check pass. The original review comment is on the superseded e6bb654 context, so GitHub does not accept a thread reply; this comment records the fix on current head 1389df1. |
|
Follow-up on the P1 regression at current head 2ac1e9c: the test now ages the trashed worktree's administrative gitdir file after both transactions are applied, matching the expired-registration failure state. It verifies both registration preservation and that undo restores a functioning checkout with git rev-parse. Running the same test with only the defer guard removed fails because the selected purge deletes the second registration; restoring the guard passes. Focused tests pass 2/2, Biome and TypeScript pass. No real user cleanup or purge was performed. |
keeper purge TX... permanently removes only named trash transactions, allowing a reviewed cache cleanup without deleting other recent recoverable work. The full selection is validated before deletion; hooks, mount checks, locking, audit logging and the default age-based purge remain in the existing path. Mixing IDs with --older-days is rejected.
Closes #78
Validation: the P1 same-repository two-transaction regression failed against the prior implementation and passes at current head 1389df1. The targeted purge preserves the other worktree registration and undo restores it. Focused tests, Biome, TypeScript, and diff checks pass. No real recent trash was purged.