feat(doctor): add check for stale .beads/mq/ files (bd-dx2dc)

Add bd doctor check that detects legacy gastown merge queue JSON files
in .beads/mq/. These files are local-only remnants from the old mrqueue
implementation and can safely be deleted since gt done already creates
merge-request wisps in beads.

- CheckStaleMQFiles() detects .beads/mq/*.json files
- FixStaleMQFiles() removes the entire mq directory
- Comprehensive tests for check and fix

This is the first step toward removing the mrqueue side-channel from
gastown. The follow-up convoy will update Refinery/Witness to use
beads exclusively.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
beads/crew/emma
2026-01-12 19:42:41 -08:00
committed by Steve Yegge
parent e8a4474788
commit 66c5c4d805
4 changed files with 181 additions and 0 deletions
+2
View File
@@ -310,6 +310,8 @@ func applyFixList(path string, fixes []doctorCheck) {
// No auto-fix: pruning deletes data, must be user-controlled
fmt.Printf(" ⚠ Run 'bd cleanup --older-than 90' to prune old closed issues\n")
continue
case "Legacy MQ Files":
err = doctor.FixStaleMQFiles(path)
default:
fmt.Printf(" ⚠ No automatic fix available for %s\n", check.Name)
fmt.Printf(" Manual fix: %s\n", check.Fix)