Skip to content

Preserve all work during owner-authorized retirement - #488

Merged
BunsDev merged 3 commits into
mainfrom
retire-safety-repair
Nov 4, 2026
Merged

BunsDev merged 3 commits into
mainfrom
retire-safety-repair

Conversation

@BunsDev

@BunsDev BunsDev commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

PR #486 can retire work without matching ownership, lose staged-only content, erase writes that race archival, and delete ignored files even when their archive is missing. This replacement candidate incorporates that feature and repairs all four reproduced defects without modifying its original branch or worktree.

Retirement now requires a valid matching owner record, separately archives the original index and working tree, verifies raw working and ignored archives through empty-directory restores, and persists recovery metadata before moving anything. Nested ignored paths retain their parent-directory modes without archiving sibling data. Ownership and archive integrity are rechecked before expected-SHA branch deletion.

The original checkout and Git registration move to private recovery storage and remain there indefinitely. No reset, clean, or deletion erases their files, so later writes through existing file descriptors remain recoverable. Retirement removes the managed path and local branch name; it does not reclaim the checkout's disk space. The existing merged-worktree pruning path retains its separate merge-proof requirements.

Validation passed: pinned install, build, typecheck, full unit suite (2,325 passed, 26 skipped), 27 retirement cases and 102 standalone maintenance cases. Independent review found a nested-parent archive mismatch; its regression failed first, then passed after the correction, and follow-up review found no actionable issues. No real worktree retirement, release, physical power-loss acceptance, or repair-specific Electron E2E is claimed.

The original PR remains open until this candidate is delivered and its replacement is verified. Recovery and remaining limits are documented in the recovery and validation receipt.

BunsDev and others added 3 commits November 1, 2026 14:23
prune keeps unmerged work forever because it has no merge proof. retire replaces
that proof with a verified snapshot: dirty tracked and untracked files become a
commit on the tip (built in a temporary index), unknown ignored data becomes a
0600 ignored.tar, and both go through the existing bundle/restore/fsck archive.
Open PRs, active processes, Git operations, locks, hidden index entries and a
moved tip still preserve the work. Removal stays non-forced and the branch is
deleted by expected SHA.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Nov 3, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
modex Ready Ready Preview Nov 3, 2026 12:36am UTC

Request Review

@github-code-quality

Copy link
Copy Markdown

Code coverage overview

Languages: TypeScript

TypeScript / code-coverage-agent

main 7cfb29c retire-safety-repair 18f9ba9 +/-
66% 66% 0%

ℹ️ Calculations represent line coverage. Results may change as calculations are updated.

@BunsDev
BunsDev added this pull request to the merge queue Nov 4, 2026
Merged via the queue into main with commit 68fe543 Nov 4, 2026
11 checks passed
@BunsDev
BunsDev deleted the retire-safety-repair branch November 4, 2026 00:41

This branch was successfully deployed

1 active deployment
Preview — 18f9ba97 Deployed Nov 3, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant