Beads' storage backend is Dolt, not git. Git integration (hooks, repo
discovery, identity) is optional — `BEADS_DIR` + `--stealth` provides
fully functional git-free operation with zero git calls.
Changes across 15 files:
- Replace all "git-backed" references with "Dolt-powered" or "Dolt-backed"
- Add "Git-Free Usage" section to README.md documenting BEADS_DIR + --stealth
- Fix stale "JSONL" storage reference in llms-full.txt
- Update SKILL.md to mark git as optional prerequisite
Complements GH#2522 (stale command cleanup) — that PR fixed removed
commands, this one fixes misleading storage backend framing.
When users run install.sh from Git Bash, MSYS2, or Cygwin on Windows,
the script now detects these environments and directs them to use
install.ps1 instead of silently installing a Linux binary.
When running under WSL, the script warns that the install will only be
usable inside WSL and suggests install.ps1 for native Windows use,
then continues after a 5-second pause.
Fixes#1980
Amp-Thread-ID: https://ampcode.com/threads/T-019cc486-ad63-76ea-9f02-2901e2430428
Co-authored-by: Amp <amp@ampcode.com>
Provides a standalone bash tool for users whose `bd migrate --to-dolt`
failed, leaving them with only JSONL exports. Reads JSONL files from
`bd export` and loads them into Dolt via MySQL protocol.
Supports all 6 table types (issues, labels, dependencies, events,
comments, config), dry-run mode, orphan-dep filtering, and auto-commits
the imported data to the Dolt branch.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove Beads Classic remnants that are no longer needed now that
the system is pure Dolt:
- Delete deprecated commands: sync, template (cmds only), thanks (cmd
only), detect-pollution (cmd only), admin aliases, comment alias
- Remove dead sqliteBackendWarning() and all 7 unreachable call sites
(GetBackend() always returns "dolt")
- Remove sqliteIntegrityRecovery() from fix package
- Delete legacy test scripts: test_wsl2_wal.sh, test_issue_gh1224.sh,
migrate-audit.sh
- Remove SQLite-specific test functions from doctor tests
Utility functions shared with active code are preserved (e.g.,
TemplateSubgraph, isTestIssue, printThanksPage).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Run gofmt on files that drifted from canonical formatting
- Remove hook template file checks from check-versions.sh and
update-versions.sh — hooks are now generated dynamically by
cmd/bd/hooks.go using the Version constant from version.go
- Fix check-versions.sh error message to reference update-versions.sh
instead of deprecated bump-version.sh
Authored by: Aaron Lippold<lippold@gmail.com>
Signed-off-by: Aaron Lippold <lippold@gmail.com>
Executed-By: beads/crew/emma
Rig: beads
Role: crew
* fix(configfile): respect backend field in metadata.json
GetBackend() was hardcoded to always return "dolt", ignoring the
backend field in metadata.json. This forced all SQLite users onto
Dolt with no migration path and no way to opt out.
- Add BackendSQLite constant and case-insensitive normalization
- GetBackend() reads backend field: sqlite → sqlite, empty/dolt → dolt
- DatabasePath() routes to SQLite or Dolt path based on backend
- BEADS_BACKEND env var override as escape hatch for corrupted configs
- CapabilitiesForBackend handles sqlite backend
- Warning on unrecognized BEADS_BACKEND values
- 55 tests covering all paths including env var, case normalization,
roundtrip persistence, and DatabasePath routing
Fixes#2016.
Authored by: Aaron Lippold<lippold@gmail.com>
* feat(migrate): add shared migration safety functions
Extract reusable safety functions for SQLite→Dolt migration:
- backupSQLite: file copy with O_EXCL + 0600 permissions
- verifyServerTarget: TCP + SQL check to prevent wrong-server writes
- verifyMigrationCounts: source vs target count verification
- finalizeMigration: atomic metadata update (last step only)
- rollbackMetadata: restore original config on failure
22 unit tests covering all functions including counter overflow,
non-MySQL server detection, deps-only mismatch, nil config rollback,
server config preservation, and no-metadata scenarios.
Authored by: Aaron Lippold<lippold@gmail.com>
* refactor(migrate): use safety functions in auto-migration
Refactor both CGO and non-CGO auto-migration paths to use shared
safety functions instead of inline logic:
Phase 1 (pre-flight):
- Always backup SQLite before any migration attempt
- Verify server target to prevent writing to wrong Dolt server
- Skip migration when backend explicitly set to sqlite (GH#2016)
- Use GetBackend() for SQLite guard, strings.EqualFold for Dolt
stale-leftover detection (preserves legacy empty-backend migration)
Phase 2 (import):
- Unchanged: extract from SQLite, create Dolt store, import data
Phase 3 (verify + finalize):
- Verify issue counts match before updating metadata
- Atomic finalization via finalizeMigration (metadata last)
- Rollback with warning on failure (not silent discard)
Clear, actionable error messages at every failure point showing
backup path. 13 unit tests including new SQLite backend guard test.
Authored by: Aaron Lippold<lippold@gmail.com>
* fix(main): clear error when SQLite backend detected
When GetBackend() returns "sqlite" (user opted to stay on SQLite or
migration was skipped), print a clear error with migration instructions
instead of falling through to dolt.New() which produces a confusing
Dolt connection failure.
Fixes#2016.
Authored by: Aaron Lippold<lippold@gmail.com>
* feat(doctor): detect and fix broken migration states
Add three new doctor checks for migration-related issues:
CheckBrokenMigrationState: detects metadata claiming Dolt backend
but no Dolt directory present (with server-mode awareness). Offers
bd doctor --fix to restore SQLite backend from beads.db or
beads.db.migrated files.
CheckSQLiteResidue: detects leftover beads.db after successful
migration. Fix renames to .migrated (with backend guard to prevent
accidentally renaming active SQLite database).
CheckEmbeddedModeConcurrency: detects embedded mode with lock
contention indicators (dolt-access.lock, noms LOCK files).
Recommends switching to server mode for multi-agent workflows.
Addresses #2086.
19 doctor tests covering all detection paths including server mode,
backup file detection, .migrated-only recovery, zero-byte files,
concurrent access with access locks and noms locks.
Fixes#2086.
Authored by: Aaron Lippold<lippold@gmail.com>
* test(migrate): add integration tests for migration safety
8 integration tests covering key business flows:
- Full migration lifecycle (SQLite → backup → Dolt → bd list works)
- Failed migration recovery (corrupt SQLite → backup exists → intact)
- Doctor detects broken state and fix restores SQLite backend
- Doctor fixes beads.db.migrated rename-back recovery
- Idempotent retry (second migration is no-op)
- SQLite guard prevents auto-migration (data intact, no backup)
- Backup content matches source byte-for-byte
- Metadata JSON valid with all required fields after migration
Authored by: Aaron Lippold<lippold@gmail.com>
* feat(scripts): add migrate-audit.sh for batch SQLite→Dolt migration
Utility script to audit and batch-migrate beads boards:
- Scans all .beads/ directories under a configurable root
- Reports backend state, issue count, and schema version for each board
- --dry-run: shows what --migrate would do without changes
- --migrate: batch converts eligible SQLite boards to Dolt
- --exclude PATTERN: skip projects matching regex (e.g., "backup|test")
- --port/--host: target a specific Dolt server
Safety features:
- Backs up metadata.json before modifying each board
- Restores original metadata.json on migration failure
- Skips boards with old schema (missing owner column)
- bd binary handles SQLite backup, server verification, count verification
- Uses jq for JSON (consistent with existing scripts, no python dependency)
Companion tool for the migration safety PR (GH#2016, GH#2086).
Authored by: Aaron Lippold<lippold@gmail.com>
* fix(migrate): handle all schema versions in SQLite extract
Databases from older beads versions are missing columns added over time
(owner, created_by, crystallizes, mol_type, work_type, quality_score,
source_system, and others). The extract functions hardcoded COALESCE
for all columns, causing "no such column" errors.
Fix: make ALL non-id columns use sqliteOptionalTextExpr via a DRY
opt() helper in both CGO extract and shim extract paths. Missing
columns default to empty/zero/null. Also adds empty/corrupt beads.db
handling to the migrate-audit.sh script.
Tested against 12 real-world databases spanning multiple beads versions,
from the earliest (~30 columns) to the current schema (50+ columns).
All 28 boards migrated successfully.
Authored by: Aaron Lippold<lippold@gmail.com>
StartTestDoltServer now checks BEADS_DOLT_PORT before spawning a new
server. If the env var is set and the server is reachable, it returns a
lightweight handle with no-op cleanup. Falls through with a warning if
the port is stale.
scripts/test.sh gains BEADS_TEST_SHARED_SERVER=1 mode that pre-starts
a single server and exports the port for all test packages.
Closes: bd--sxnz
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Executed-By: beads/crew/emma
Rig: beads
Role: crew
Per Tim Sehn (Dolt CEO): DOLT_COMMIT() implicitly commits the SQL
transaction, so calling tx.Commit() afterward is redundant and "adds
raciness." Under high concurrent load (~20 agents), this raciness
may have contributed to a complete server hang that bricked the town.
The fix: after DOLT_COMMIT succeeds, return immediately without calling
tx.Commit(). When no DOLT_COMMIT is requested (empty commitMsg), the
explicit tx.Commit() is still used.
Also adds a repro script (scripts/repro-dolt-hang/) that compares the
old (with tx.Commit) vs new (without) patterns under concurrent load,
plus an incident report documenting the 2026-02-23 server hang.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Delete broken store_nocgo_test.go (references undefined errNoCGO),
remove dead bootstrapEmbeddedDolt/hasDoltSubdir functions, and clean up
stale comments and docs that still referenced embedded mode, CGO
requirements, or in-process Dolt across 20 files.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Executed-By: beads/crew/emma
Rig: beads
Role: crew
* fix(release): prevent non-CGO bd binaries from shipping
* fix: make verify-cgo.sh executable
GoReleaser invokes this as ./scripts/verify-cgo.sh which requires +x.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: beads/crew/collins <steve.yegge@gmail.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Fix release CI: strip -lresolv entirely from zig cross-compilation
wrappers instead of replacing with -lresolv.9 (zig sysroot has neither).
macOS builds use netgo tag so libresolv is not needed.
Also add GitHub API rate limit warnings to release formula, release.sh,
and emma private memory to prevent burning 5000/hr quota during CI wait.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Executed-By: beads/crew/emma
Rig: beads
Role: crew
The Homebrew formula is named "beads" (not "bd"), so all brew commands
must use `brew install beads` / `brew upgrade beads`. Also removes the
dead update-homebrew job from release.yml — homebrew-core handles
formula updates automatically.
Follows up on #1557 which fixed the Go code in bd doctor.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Revert commits e5330641 and 0df41523 which removed embedded Dolt mode
from the beads codebase. The embedded Dolt removal was only intended for
Gas Town, not for Beads.
Restores:
- dolthub/driver dependency and embedded connection path
- Advisory flock (AccessLock) for concurrent process protection
- Embedded connector lifecycle management in DoltStore
- All CGO build tags across ~45 files
- Vendored go-icu-regex library
- nocgo stub files for non-CGO builds
- Bootstrap and embedded_uow helpers
- factory_dolt_test.go and dolt_singleprocess_test.go
Merge conflict resolutions:
- store.go: TCP fail-fast check wrapped inside if cfg.ServerMode
- store.go: backtick-quoting for embedded CREATE DATABASE (prefix-based names)
- perf_dolt.go: port references updated from 3306 to 3307
- ci.yml: restored continue-on-error for Nix (dolthub/driver requires Go 1.25.6+)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Executed-By: beads/crew/emma
Rig: beads
Role: crew
Add go-winres integration to embed legitimate PE resource metadata (company name,
product name, version, file description, copyright, and application manifest) into
Windows binaries. AV heuristic engines check for PE metadata as a trust signal --
its absence is one of the triggers for Go binary false positives like Kaspersky
PDM:Trojan.Win32.Generic detection.
- Add cmd/bd/winres/ with PE version info config and app manifest
- Add scripts/gen-winres.sh to generate .syso resource files
- Update .goreleaser.yml before hooks to run gen-winres at build time
- Update release.yml CI to install go-winres
- Update version bump script to include winres metadata
- Update ANTIVIRUS.md documentation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove the embedded Dolt driver (dolthub/driver) and all associated code,
keeping only server-mode connections via MySQL protocol to dolt sql-server.
Key changes:
- Remove dolthub/driver dependency and go-icu-regex vendored dep
- Remove embedded connection path, access locks, bootstrap, nocgo stubs
- Remove CGO build tags from all ~40 files
- Remove CGO/ICU settings from Makefile and scripts/test.sh
- Simplify configfile: Dolt is always server mode now
- Update doctor checks, factory, daemon guard for server-only
- Binary size reduced from ~120MB to ~44MB
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Executed-By: beads/polecats/obsidian
Rig: beads
Role: polecats
- release.sh now creates a wisp instead of running batch operations
- Added explanation of WHY molecules over scripts (ledger, resumability,
observability, gates) with references to PRIMING.md and CONTEXT.md
- Shows next steps: hook it, sling it to a polecat, or watch progress
The desire path now leads to the proper workflow instead of bypassing it.
Note: Also added generate-newsletter step to local beads-release.formula.toml
(formulas are in .beads/ which is gitignored - they sync via beads federation)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Executed-By: beads/crew/emma
Rig: beads
Role: crew
Add a 'beads' symlink/alias that points to the 'bd' binary across all
installation methods, allowing users to invoke the tool using either
'bd' or 'beads'.
Changes:
- Makefile: Create 'beads' symlink in install target
- scripts/install.sh: Add create_beads_alias function, call it in all
three installation paths (release download, go install, build from source)
- flake.nix: Add 'beads' symlink in Nix package installPhase
- install.ps1: Add Create-BeadsAlias function for Windows (creates a copy
since symlinks require admin privileges)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
B1: DatabasePath() now always resolves to .beads/dolt/ for dolt backend,
ignoring stale Database field values like town, wyvern, beads_rig
that caused bd to look in the wrong directory.
B2: bootstrapEmbeddedDolt() now blocks JSONL auto-import in dolt-native
sync mode. If the dolt DB does not exist, it returns an error instead of
silently creating a new database from stale JSONL backup.
B-build: Makefile and scripts/test.sh now detect Homebrew keg-only
icu4c and export CGO_CFLAGS/CGO_CPPFLAGS/CGO_LDFLAGS so dolt
go-icu-regex dependency can compile and link.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* feat: update to use core tap for beads installation
Signed-off-by: Rui Chen <rui@chenrui.dev>
* remove custom tap related code and refs
Signed-off-by: Rui Chen <rui@chenrui.dev>
---------
Signed-off-by: Rui Chen <rui@chenrui.dev>
The complex bump-version.sh script has been replaced with:
1. A deprecation notice pointing to the release molecule
2. A simpler update-versions.sh for quick local-only version bumps
For releases, use:
bd mol wisp beads-release --var version=X.Y.Z
The molecule provides guided, step-by-step release workflows with
proper handoffs and CI gates.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* feat: comprehensive NixOS support improvements
This commit adds full NixOS support and automates Nix package maintenance:
## Static Linux Binaries for NixOS
Changes .goreleaser.yml to create static Linux binaries:
- Set CGO_ENABLED=0 for Linux amd64 and arm64 builds
- Remove cross-compiler dependencies (aarch64-linux-gnu-gcc)
- Simplifies build process while fixing NixOS compatibility
Static binaries work on all Linux distributions including NixOS, Alpine,
and musl-based distros without dynamic linker dependencies.
## Automated default.nix Version Management
Adds default.nix to the version bump workflow:
- Updates default.nix version field in bump-version.sh (new step 9)
- Adds default.nix to version verification checks
- Prevents version drift (was 5 releases behind: 0.42.0 vs 0.47.0)
- Updates README.md to remove glibc 2.32+ requirement
## Automated vendorHash Management
Creates scripts/update-nix-vendorhash.sh to automate vendorHash updates:
- Automatically detects correct hash by triggering Nix build error
- Extracts hash from error message and updates default.nix
- Verifies update with clean build
- Eliminates error-prone manual copy-paste workflow
- Works with local Nix OR Docker (uses nixos/nix image automatically)
Integrates vendorHash check into bump-version.sh:
- Detects when go.mod or go.sum have changed
- Prompts to run vendorHash update script interactively
- Catches synchronization issues at release time
## Documentation
Updates AGENTS.md with Nix package maintenance guide:
- Documents when and how to update vendorHash
- Recommends automated script as primary method
- Provides manual and alternative methods as fallback
- Notes Docker fallback for maintainers without Nix
## Impact
- NixOS users can now install via standard methods
- Nix package version stays synchronized automatically
- vendorHash updates work without Nix installed (via Docker)
- vendorHash updates are caught during release workflow
- All Linux users benefit from more portable binaries
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* fix: address PR review feedback for NixOS support
Fixes three issues identified in PR review:
1. Replace undefined log_* functions in bump-version.sh with existing
echo pattern (log_warning, log_info, log_success, log_error were
called but not defined)
2. Update default.nix version from 0.42.0 to 0.47.0 to fix version
drift with cmd/bd/version.go
3. Remove Nix Package Maintenance section from AGENTS.md per beads
architecture (use bd prime for dynamic context, keep AGENTS.md
minimal)
* fix: update versions to 0.47.1 after merge with main
- Update claude-plugin plugin.json to 0.47.1
- Update default.nix to 0.47.1
- Fixes version check failures after merging latest main branch
---------
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
Update documentation and scripts to reflect the plugin move from
root level to claude-plugin/ subdirectory:
- Fix command links in docs/DAEMON.md, docs/SYNC.md, examples/
- Update plugin.json path references in RELEASING.md, AGENT_INSTRUCTIONS.md
- Update scripts/bump-version.sh and scripts/check-versions.sh
- Update skill documentation paths in claude-plugin/skills/beads/
The marketplace.json correctly stays at .claude-plugin/ (root level)
while plugin.json moved to claude-plugin/.claude-plugin/.
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Stop existing daemons before binary replacement during install
Prevents file lock race condition by gracefully stopping bd daemons
before replacing the binary. Safe for fresh installs (skips if bd not found).
Cherry-picked website/, scripts/generate-llms-full.sh, and deploy-docs.yml
from joyshmitz's PR. Fixed workflow to trigger on main branch instead of
docs/docusaurus-site.
Features:
- Docusaurus documentation site with llms.txt support
- Environment-variable driven config (defaults to steveyegge org)
- Automated llms-full.txt generation from docs
- GitHub Pages deployment workflow
Co-authored-by: joyshmitz <joyshmitz@users.noreply.github.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Executed-By: beads/crew/dave
Rig: beads
Role: crew
When running the release workflow, users often stage CHANGELOG.md and info.go
changes before running bump-version.sh. Previously, the script would error
on uncommitted changes with --commit.
Now:
- --allow-staged permits pre-staged CHANGELOG.md and cmd/bd/info.go
- Script detects these as expected release files and includes them in commit
- Provides helpful error message if other files are staged
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Analysis found these commands are dead code:
- gt never calls `bd pin` - uses `bd update --status=pinned` instead
- Beads.Pin() wrapper exists but is never called
- bd hook functionality duplicated by gt mol status
- Code comment says "pinned field is cosmetic for bd hook visibility"
Removed:
- cmd/bd/pin.go
- cmd/bd/unpin.go
- cmd/bd/hook.go
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Without codesigning, the binary gets 'Killed: 9' on macOS due to
Gatekeeper security. This adds xattr -cr and codesign -f -s - after
building and after each copy to install locations.
Adds chaos and E2E test running to the release process:
- New --run-chaos-tests flag runs chaos/corruption recovery tests
- Runs both chaos and e2e tagged tests before commit/tag
- Updated quick start to recommend chaos tests for releases
- Tests use 10m timeout for thorough coverage
Part of PR #752 integration.
Implements Authenticode signing for Windows binaries to reduce AV false positives.
Changes:
- Add scripts/sign-windows.sh for osslsigncode-based signing
- Update .goreleaser.yml with post-build signing hook
- Update release.yml to install osslsigncode and pass secrets
- Update docs/ANTIVIRUS.md with signing verification instructions
- Update scripts/README.md with signing script documentation
The signing is gracefully degraded - releases continue without signing
if the certificate secrets are not configured.
Required secrets for signing:
- WINDOWS_SIGNING_CERT_PFX_BASE64: base64-encoded PFX certificate
- WINDOWS_SIGNING_CERT_PASSWORD: certificate password
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Adds manual publishing options for releases:
- --publish-npm: Publish @beads/bd to npm registry
- --publish-pypi: Publish beads-mcp to PyPI
- --publish-all: Shorthand for both
Note: CI already handles publishing automatically when tags are pushed.
These flags are for manual releases or when CI publishing fails.