* docs: generate CLI reference from live help
* docs(cli): move bd version stamp from per-command pages to index only
Drops the `(bd version X.Y.Z)` suffix from the auto-generated header on
every per-command CLI reference page (writeSingleCommandDoc) and the
docs/CLI_REFERENCE.md preamble (writeAllHelp). The version label now
lives only on the index page emitted by scripts/generate-cli-docs.sh:
- Dev tree (website/docs/cli-reference/index.md, docs/CLI_REFERENCE.md):
labelled "Latest"
- Versioned snapshots (website/versioned_docs/version-X.Y.Z/...):
labelled with the explicit semver tag parsed from the directory name
This eliminates the 100+-file no-signal diff a release version bump
otherwise produces, restoring the "regen as a separate small commit"
workflow PR #3704 enables. After this change a version bump alone
yields zero diff on the dev tree; only the new versioned snapshot
created at release-cut time carries the new tag. No datestamps are
introduced anywhere — scripts/generate-cli-docs.sh --check remains
deterministic across CI runs.
Refs: mybd-afb, PR #3704
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: CI Bot <ci@beads.test>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The Windows-detection block at Makefile:6 used cmd.exe's `2>nul`
convention to silence stderr from `where git`. But GNU Make's
$(shell ...) on Windows + Git Bash uses /bin/sh (MSYS bash) as its
subshell, where `nul` is NOT a special device — it's treated as a
literal file path. So every `make <target>` invocation evaluated this
line, ran the subshell, and created a zero-byte file named `nul` in
the project root.
Switch to `2>/dev/null`:
- MSYS bash / git bash (the affected env): /dev/null is the bit
bucket. No file created.
- Pure cmd.exe make (rare; mostly hypothetical for this project
since git bash is required for the next line's SHELL switch):
/dev/null is not recognized as a special path; the redirect
attempts to write to <cwd>/dev/null. <cwd>/dev/ doesn't exist,
redirect fails harmlessly, stderr leaks to terminal. No file
created either way — strictly better than the prior behavior.
Verified empirically: pre-fix, nul mtime updated on every `make`
invocation; post-fix, mtime stays static and GIT_BASH still resolves
to git's path correctly.
Fixes#3513
Converges the sprinkle of -tags=gms_pure_go fixes into a single source plus a source-time CI guard. .buildflags is now canonical (exports GOFLAGS, CGO_ENABLED), scripts source it, scripts/check-build-tags.sh runs in CI to catch bare go commands. Fixes 5 latent bugs the guard caught (regression.yml, Makefile bench/test-regression, devcontainer, embedded-test-shard fallback, smoke-test scripts).
The gms_pure_go build tag already tells go-mysql-server to use Go's
stdlib regex instead of ICU-backed go-icu-regex. However, .buildflags
and the Makefile were unconditionally injecting ICU linker flags
(including -licui18n -licuuc -licudata on Linux), which re-introduced
the ICU shared-library dependency at link time.
This caused release binaries to require a specific ICU version
(e.g., libicui18n.so.74), making them non-portable across Linux distros
with different ICU versions.
Changes:
- .buildflags: Remove ICU flag injection; only export CGO_ENABLED=1
- Makefile: Replace ICU4C detection block with BUILD_TAGS := gms_pure_go;
use the tag for all platforms (not just Windows)
- scripts/verify-cgo.sh: Add readelf check to fail if ICU shared-library
dependency is present in ELF binaries
- scripts/install.sh: Add -tags gms_pure_go to build_from_source()
CGO remains enabled for embedded Dolt support. Only the ICU regex
backend is swapped for Go's stdlib regex, which is sufficient since
bd does not use SQL REGEXP functions.
Amp-Thread-ID: https://ampcode.com/threads/T-019d6450-7b10-77ee-b3d0-58e9474e61da
Co-authored-by: Amp <amp@ampcode.com>
* wip: add migration test harness for cross-era upgrade fidelity
Rich dataset generator, field-level fidelity checker, and migration
recipes for SQLite/Dolt-server/embedded-Dolt eras. Addresses GH#2938
upgrade pain by testing and documenting working upgrade paths.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: snapshot JSON format handling and self-test mode
- show --json returns array, not object — use jq array concatenation
- Field is issue_type not type in bd JSON output
- Normalize empty comment_count to 0 (show vs list field differences)
- Add --self-test flag for harness validation without old binaries
- Fix local variable outside function in self-test block
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* ci: re-trigger Kilo Code Review
* address review: timeouts, env var docs, quoting
- Add BD_OP_TIMEOUT (30s) for bd operations via timeout(1)
- Add DOWNLOAD_TIMEOUT (60s) for curl binary downloads
- Document all environment variables in run.sh header
- Convert init_flags from word-split string to proper bash array
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: fall back to source build when release binary has missing shared libs
Downloaded release binaries dynamically link ICU (libicui18n.so.74),
which isn't available on all systems. Now download_binary verifies the
binary actually runs, and falls back to building from source with
gms_pure_go tag when it doesn't. Also applies gms_pure_go to
build_candidate for consistency.
Ref: gastownhall/beads#3065
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Tests that data created with old bd versions (epic, issues, dependencies)
is readable after upgrading to the candidate binary. Covers the last 30
release tags by default, with --from flag for broader sweeps.
- Add docs/RELEASE-STABILITY-GATE.md defining the upgrade matrix,
verification criteria, and sign-off process
- Add scripts/upgrade-smoke-test.sh that tests data preservation,
mode preservation, role preservation, and doctor health across
upgrade scenarios (embedded maintainer, contributor, mode flip)
- Add 'make test-upgrade' target
- Update RELEASING.md checklist with upgrade smoke tests, regression
tests, and breaking-change documentation requirements
- Links to #2764, #2765, #2949, #2950 for related test gap work
Amp-Thread-ID: https://ampcode.com/threads/T-019d4a99-63c8-779f-bb8e-ee8522b61cdf
Co-authored-by: Amp <amp@ampcode.com>
- Add docs/RELEASE-STABILITY-GATE.md defining the upgrade matrix,
verification criteria, and sign-off process
- Add scripts/upgrade-smoke-test.sh that tests data preservation,
mode preservation, role preservation, and doctor health across
upgrade scenarios (embedded maintainer, contributor, mode flip)
- Add 'make test-upgrade' target
- Update RELEASING.md checklist with upgrade smoke tests, regression
tests, and breaking-change documentation requirements
- Links to #2764, #2765, #2949, #2950 for related test gap work
Amp-Thread-ID: https://ampcode.com/threads/T-019d4a99-63c8-779f-bb8e-ee8522b61cdf
Co-authored-by: Amp <amp@ampcode.com>
Add .githooks/pre-commit that auto-formats staged Go files with gofmt
and runs golangci-lint --new-from-rev=HEAD --fix to catch lint issues
before they reach CI. The hook is auto-installed when running make install.
Closes#2179
Co-Authored-By: miteshashar <miteshashar@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Skip the up-to-date check when HEAD is detached (tag checkout or CI).
git symbolic-ref HEAD fails on detached HEAD, so we exit 0 early.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
GNU Make on Windows falls back to cmd.exe when sh.exe is not in PATH. cmd.exe does not support POSIX shell syntax (dollar-paren substitution, [ -n ] tests, etc.) used throughout the Makefile recipes.
Fixes: - Set SHELL to Git for Windows bash so all recipes use POSIX shell - Compute git hash via Make shell function (GIT_BUILD variable) for ldflags - Use USERPROFILE instead of HOME for INSTALL_DIR on Windows - Add install-force target to skip origin/main update check
Amp-Thread-ID: https://ampcode.com/threads/T-019ca03e-6b88-71b9-b86c-137df23f15b1
Co-authored-by: Amp <amp@ampcode.com>
* feat(test): differential regression suite (v0.49.6 baseline)
Adds 53 regression test scenarios comparing current bd behavior against
v0.49.6 SQLite baseline. Tests run identical CLI scenarios against both
binaries in isolated workspaces, capture JSONL snapshots via bd export,
normalize volatile fields, and fail on any unexpected difference.
44 PASS, 9 SKIP (documenting known regressions/intentional changes), 0 FAIL.
Build-tagged `//go:build regression` so it never runs in normal `go test`.
Run with: `go test -tags=regression -timeout=10m -v ./tests/regression/...`
* test(regression): add 17 scenarios targeting recent open bugs
New scenarios covering subtle bugs found by surveying GH issues since v0.50:
Epic lifecycle (GH#1495):
- TestEpicAllChildrenClosedNotBlocked: epic with all children closed
should not show as BLOCKED with "0 dependencies"
- TestBlockedEpicChildrenNotReady: children of blocked epic should not
appear in bd ready
Dependency semantics (GH#1524, GH#1858):
- TestCloseGuardNonBlocksDepTypes: close guard should not reject close
for non-blocks dep types (caused-by, validates, tracks)
- TestListResolvedBlockerAnnotation: bd list should not show "blocked by"
after blocker is closed
CLI surface coverage (GH#1840, GH#1954):
- TestListAllOverridesLimitWithLabel: --all should override limit of 50
when combined with --label filter
- TestDepTreeOutput: bd dep tree should show full parent-child hierarchy
- TestChildrenCommand: bd children parity between backends
- TestBlockedCommandParity: bd blocked --json agreement
- TestCountCommandParity: bd count agreement
- TestStaleCommandParity: bd stale agreement
- TestQueryDSLParity: bd query DSL returns same results
Data integrity (GH#1914, GH#1926, GH#1927, GH#1969, GH#1973):
- TestShowJSONFieldCompleteness: bd show --json includes all fields from
baseline (catches scan projection drift)
- TestExportImportEpicTree: multi-level epic tree export → import round-trip
- TestRapidLabelAddRemoveStability: rapid label churn not silently rolled back
- TestRapidDepAddRemoveStability: rapid dep churn consistency
- TestRapidCommentAddStability: 10 rapid comments all survive
- TestLargeExportImportRoundTrip: 20 issues with deps/labels/comments
round-trip at scale
* test(regression): add bug discovery tests and 14 confirmed bug reports
Systematic manual testing against current main (Dolt server mode) found
14 bugs and confirmed 23 protocol invariants. All tests require a running
Dolt server on :3307 and use unique prefixes for test isolation.
Bug reproduction tests (10 FAIL = confirmed bugs):
- BUG-2: dep tree shows no children (ParentID never set)
- BUG-3: dep tree shows [READY] on blocked root
- BUG-4: list --status blocked returns empty
- BUG-7: dep add silently overwrites dep type
- BUG-8: reparented child appears under both parents
- BUG-10: close guard / claim exit 0 on soft failure
- BUG-11: update --status accepts arbitrary values
- BUG-12: update --title "" stores empty title
- BUG-13: reopen of closed+deferred creates limbo state
- BUG-14: empty string label accepted
Protocol invariant tests (23 PASS):
Close guard, epic lifecycle, delete cleanup, reopen preservation,
transitive blocking, cycle detection, force close, defer/undefer,
claim semantics, notes, supersede, duplicate, count grouping,
special chars, SQL injection safety, dep remove, self-dep prevention,
status/type/due-date round-trips, label/comment round-trips.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* docs(regression): add audit verdicts and session log to DISCOVERY.md
Triage all 14 bugs: 5-6 clear fix PRs, 2 need design discussion,
5-6 wontfix/by-design. Add session log to avoid redoing work.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* docs(regression): revised audit, protocol test classifications, prior art
- Updated bug verdicts based on code review: BUG-4 upgraded to DOCS FIX,
BUG-5 upgraded to INVESTIGATE (INSERT IGNORE is correct but concurrent
Dolt working-set commits may race), BUG-7 downgraded to FILE ISSUE
(upsert is intentionally coded, needs product decision)
- Tagged all 32 protocol test ideas as DATA INTEGRITY, POLICY/UX, or
MESSAGE CONTRACT to distinguish hard invariants from policy decisions
- Added "Prior Art" section documenting key Dolt migration fixes already
merged (PRs #1797, #1816, #1909, #1914, #1966-1969, #1948) and
Dolt-specific constraints learned from them
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
The ICU detection was macOS-only (Darwin check), but Linux users
with Homebrew/Linuxbrew have icu4c installed in the same keg-only
layout. This broadens the check to all non-Windows platforms.
Also sets CXX=g++ on Linux since Linuxbrew's gcc formula doesn't
create a 'c++' symlink that CGO expects.
Tested on Fedora Bluefin (rpm-ostree) with Linuxbrew icu4c@78.
Amp-Thread-ID: https://ampcode.com/threads/T-019c4cec-a601-7027-93bf-396eb21591bc
Co-authored-by: Amp <amp@ampcode.com>
When the locally installed Go (e.g. 1.25.5) is older than go.mod requires
(e.g. 1.25.6), GOTOOLCHAIN=auto downloads the right compiler but coverage
instrumentation still uses the local compile tool, causing version mismatch
errors. Force GOTOOLCHAIN from go.mod so all tools use the same version.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Move global BINARY conditional into build/install targets where it works
- Hardcode bd.exe/bd in each target for clarity and correctness
- Fix Makefile parse error on Windows (BINARY not resolved in global scope)
- Update clean target to remove bd.exe
- Ensure install target works correctly on Windows with .exe extension
Amp-Thread-ID: https://ampcode.com/threads/T-019c4871-c0f1-7735-823a-e94bccb01e6c
Co-authored-by: Amp <amp@ampcode.com>
Windows builds do not require ICU libraries:
- go-mysql-server uses pure-Go regex via gms_pure_go build tag
- go-icu-regex has a Windows-specific pure-Go implementation (regex_windows.go)
- The only CGO deps on Windows are runtime/cgo and gozstd (bundled C source)
Changes:
- CI: Remove MSYS2/ICU setup, build with CGO_ENABLED=0 -tags gms_pure_go
- Makefile: Add Windows-specific comments clarifying ICU is not needed
- docs/INSTALLING.md: Clarify Windows build instructions and ICU requirements
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Executed-By: beads/polecats/jasper
Rig: beads
Role: polecats
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
Remove dead -tags gms_pure_go from Windows cross-compile, remove //go:build
cgo constraint from benchmarks, and remove CGO/ICU build dependencies from
INSTALLING.md that no longer apply after embedded Dolt driver removal.
Resolves merge conflicts from PR #1579 and applies changes to main.
Co-authored-by: turian <turian@users.noreply.github.com>
Executed-By: beads/crew/emma
Rig: beads
Role: crew
- Add pure_go_windows.go with build constraint to auto-enable gms_pure_go tag
- Update Makefile to use -tags gms_pure_go on Windows builds
- Update INSTALLING.md to document Windows Dolt support via pure-Go regex
Uses upstream go-mysql-server's gms_pure_go build tag instead of vendoring.
This avoids ICU/CGO dependencies while keeping full functionality.
Fixes#1497
Amp-Thread-ID: https://ampcode.com/threads/T-019c3339-57d9-75b9-8d86-d5a79d77b9c6
Co-authored-by: Amp <amp@ampcode.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
Prevents installing outdated bd binaries by checking HEAD against
origin/main before building. Use SKIP_UPDATE_CHECK=1 to override.
Closes bd-h0j0u
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Executed-By: gastown/crew/mel
Rig: gastown
Role: crew
- Makefile: Explicitly set CGO_ENABLED=1 for Dolt backend support
- DOLT.md: Update environment variable documentation to reflect
current server mode settings (BEADS_DOLT_* vars)
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>
Previously `make install` used `go install` which put the binary in ~/go/bin
without codesigning, while PATH used ~/.local/bin - causing chronic stale
binary issues. Now install depends on build (which codesigns on macOS) and
copies to the correct location.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Executed-By: mayor
Role: mayor
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>
- Update Makefile install target to extract and pass git commit/branch via ldflags
- Add -X main.Commit and -X main.Branch to all build configurations in .goreleaser.yml
- Create scripts/install.sh helper for explicit version control during installation
- Add comprehensive tests for commit/branch resolution and output formatting
Fixes github #503: 'bd version' now reports as-built commit hash and branch
information regardless of installation method (make install, go install, or
released binaries from goreleaser).
Overview: Added comprehensive test infrastructure to handle the large
test suite (41K LOC, 313 tests in cmd/bd alone) with automatic skipping
of known broken tests.
Changes:
- .test-skip: List of broken tests to skip (with GH issue references)
- scripts/test.sh: Smart test runner that auto-skips broken tests
- docs/TESTING.md: Comprehensive testing guide
- .claude/test-strategy.md: Quick reference for AI agents
- Updated Makefile to use new test script
Known Issues Filed:
- GH #355: TestFallbackToDirectModeEnablesFlush (database deadlock)
- GH #356: TestFindJSONLPathDefault (wrong JSONL filename)
Performance: 3min total (180s compilation, 3.8s execution)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* feat: add performance testing framework foundation
Implements foundation for comprehensive performance testing and user
diagnostics for beads databases at 10K-20K scale.
Components added:
- Fixture generator (internal/testutil/fixtures/) for realistic test data
* LargeSQLite/XLargeSQLite: 10K/20K issues with epic hierarchies
* LargeFromJSONL/XLargeFromJSONL: test JSONL import path
* Realistic cross-linked dependencies, labels, assignees
* Reproducible with seeded RNG
- User diagnostics (bd doctor --perf) for field performance data
* Collects platform info (OS, arch, Go/SQLite versions)
* Measures key operation timings (ready, list, show, search)
* Generates CPU profiles for bug reports
* Clean separation in cmd/bd/doctor/perf.go
Test data characteristics:
- 10% epics, 30% features, 60% tasks
- 4-level hierarchies (Epic → Feature → Task → Subtask)
- 20% cross-epic blocking dependencies
- Realistic status/priority/label distributions
Supports bd-l954 (Performance Testing Framework epic)
Closes bd-6ed8, bd-q59i
* perf: optimize GetReadyWork with compound index (20x speedup)
Add compound index on dependencies(depends_on_id, type, issue_id) to
eliminate performance bottleneck in GetReadyWork recursive CTE query.
Performance improvements (10K issue database):
- GetReadyWork: 752ms → 36.6ms (20.5x faster)
- Target: <50ms ✓ ACHIEVED
- 20K database: ~1500ms → 79.4ms (19x faster)
Benchmark infrastructure enhancements:
- Add dataset caching in /tmp/beads-bench-cache/ to avoid regenerating
10K-20K issues on every benchmark run (first run: ~2min, subsequent: <5s)
- Add progress logging during fixture generation (shows 10%, 20%... completion)
- Add database size logging (17.5 MB for 10K, 35.1 MB for 20K)
- Document rationale for only benchmarking large datasets (>10K issues)
- Add CPU/trace profiling with --profile flag for performance debugging
Schema changes:
- internal/storage/sqlite/schema.go: Add idx_dependencies_depends_on_type_issue
New files:
- internal/storage/sqlite/bench_helpers_test.go: Reusable benchmark setup with caching
- internal/storage/sqlite/sqlite_bench_test.go: Comprehensive benchmarks for critical operations
- Makefile: Convenient benchmark execution (make bench-quick, make bench)
Related:
- Resolves bd-5qim (optimize GetReadyWork performance)
- Builds on bd-6ed8 (fixture generator), bd-q59i (bd doctor --perf)
* perf: add WASM compilation cache to eliminate cold-start overhead
Configure wazero compilation cache for ncruces/go-sqlite3 to avoid
~220ms JIT compilation on every process start.
Cache configuration:
- Location: ~/.cache/beads/wasm/ (platform-specific via os.UserCacheDir)
- Automatic version management: wazero keys entries by its version
- Fallback: in-memory cache if directory creation fails
- No cleanup needed: old versions are harmless (~5-10MB each)
Performance impact:
- First run: ~220ms (populate cache)
- Subsequent runs: ~20ms (load from cache)
- Savings: ~200ms per cold start
Cache invalidation:
- Automatic when wazero version changes (upgrades use new cache dir)
- Manual cleanup: rm -rf ~/.cache/beads/wasm/ (safe to delete anytime)
This complements daemon mode:
- Daemon mode: eliminates startup cost by keeping process alive
- WASM cache: reduces startup cost for one-off commands or daemon restarts
Changes:
- internal/storage/sqlite/sqlite.go: Add init() with cache setup
* refactor: improve maintainability of performance testing code
Extract common patterns and eliminate duplication across benchmarks, fixture generation, and performance diagnostics. Replace magic numbers with explicit configuration to improve readability and make it easier to tune test parameters.
* docs: clarify profiling behavior and add missing documentation
Add explanatory comments for profiling setup to clarify why --profile
forces direct mode (captures actual database operations instead of RPC
overhead) and document the stopCPUProfile function's role in flushing
profile data to disk. Also fix gosec G104 linter warning by explicitly
ignoring Close() error during cleanup.
* fix: prevent bench-quick from running indefinitely
Added //go:build bench tags and skipped timeout-prone benchmarks to
prevent make bench-quick from running for hours.
Changes:
- Add //go:build bench tag to cycle_bench_test.go and compact_bench_test.go
- Skip Dense graph benchmarks (documented to timeout >120s)
- Fix compact benchmark prefix: bd- → bd (validation expects prefix without trailing dash)
Before: make bench-quick ran for 3.5+ hours (12,699s) before manual interrupt
After: make bench-quick completes in ~25 seconds
The Dense graph benchmarks are known to timeout and represent rare edge
cases that don't need optimization for typical workflows.