fix: recover from mass file corruption incident (2026-02-15)
INCIDENT SUMMARY: A catastrophic corruption event affected the working directory, with null bytes (0x00) overwriting content in dozens of files including: - package.json (corrupted) - tailwind.config.ts (corrupted) - All modified tracked files - Untracked directories (components/ui/, node_modules/, .next/) ROOT CAUSE: Unknown - files were filled with null bytes, destroying their content. RECOVERY PROCESS: 1. Discovered corruption when npm run dev failed with EJSONPARSE 2. Checked git diff --stat - showed many files as "binary" 3. Found dangling stash commits (0d80ad9, a1a33cf) containing our work 4. Restored tracked files from stash: git checkout a1a33cf -- . 5. Removed corrupted untracked directories (node_modules, .next, components/ui) 6. Reinstalled dependencies: npm install 7. Reinitialized shadcn/ui: npx shadcn@latest init 8. Reinstalled shadcn components: npx shadcn@latest add button card ... 9. Recreated earthy-dark tokens (bb-ui2.1) - lost in shadcn init overwrite 10. Verified all closed bb-ui2 beads still had their deliverables DATA PRESERVED: - All tracked source code (recovered from git stash) - .beads/issues.jsonl (recovered from stash) - All bead history and metadata DATA LOST: - Uncommitted changes to untracked files - Earthy-dark tokens (recreated from bead spec) - components/ui/ (regenerated from shadcn) LESSONS LEARNED: 1. Commit work frequently - untracked changes are not protected 2. Git stash captures tracked files only 3. shadcn init overwrites globals.css - preserve tokens separately 4. Dangling commits can save the day VERIFICATION POST-RECOVERY: - npm run typecheck: PASS - npm run lint: PASS - npm run test: PASS - All bb-ui2 closed bead deliverables present CLOSES: bb-silver-castle (triage bead for this incident)
This commit is contained in:
parent
173937c1f3
commit
a2b0909724
2 changed files with 1544 additions and 75 deletions
1604
package-lock.json
generated
1604
package-lock.json
generated
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue