Skip to content

fix: close --quiet bypass in bd init --force safety guard#2802

Merged
steveyegge merged 1 commit intosteveyegge:mainfrom
quad341:fix/init-force-guard
Mar 27, 2026
Merged

fix: close --quiet bypass in bd init --force safety guard#2802
steveyegge merged 1 commit intosteveyegge:mainfrom
quad341:fix/init-force-guard

Conversation

@quad341
Copy link
Contributor

@quad341 quad341 commented Mar 24, 2026

Summary

  • bd init --force --quiet previously printed a warning but continued anyway, silently destroying the database
  • Now it refuses like the default non-interactive path and requires --destroy-token=DESTROY-<prefix> to proceed
  • 3-line fix: remove the --quiet special case that bypassed the safety guard

This is the root cause of two data loss incidents where bd init --force destroyed rig identity beads, agent state, and issue history.

Test plan

  • go build ./... compiles clean
  • bd init --force --quiet in a repo with issues → refuses (was: silent destruction)
  • bd init --force --destroy-token=DESTROY-<prefix> → proceeds as before
  • bd init --force in interactive terminal → prompts "Type 'destroy N issues'" as before

🤖 Generated with Claude Code

@quad341
Copy link
Contributor Author

quad341 commented Mar 24, 2026

i think this is the wrong fix; beads should not know about gas town. the confirm destroy i'm not against though

@quad341 quad341 force-pushed the fix/init-force-guard branch 2 times, most recently from 8e67aa5 to f34e9c6 Compare March 24, 2026 15:01
@quad341 quad341 changed the title fix: guard bd init --force in Gas Town workspaces fix: close --quiet bypass in bd init --force safety guard Mar 24, 2026
@quad341
Copy link
Contributor Author

quad341 commented Mar 24, 2026

Note: v0.62 is a breaking release over v0.61 that drops Gas Town knowledge from beads. This PR is part of that effort — the --quiet bypass allowed agents to silently destroy databases without the destroy-token guard, which caused two data loss incidents in Gas Town deployments.

@quad341
Copy link
Contributor Author

quad341 commented Mar 24, 2026

this has all of my other changes also merged into it. silly claude

--force --quiet previously printed a warning but continued anyway,
silently destroying the database. Now it refuses like the default
non-interactive path and requires --destroy-token to proceed.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@quad341 quad341 force-pushed the fix/init-force-guard branch from f34e9c6 to fd55508 Compare March 24, 2026 15:46
@steveyegge steveyegge merged commit 83b0f09 into steveyegge:main Mar 27, 2026
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.

2 participants