Commit Graph

972 Commits

Author SHA1 Message Date
Steve Yegge
73e73aecf9 File bd-srwk: Prevent stale database exports
bd export currently silently overwrites issues.jsonl even when the
database is stale (older than the JSONL file). This causes data loss
in multi-agent workflows.

Real incident from vc project:
- Agent A created 4 discovery epics and exported
- Agent B had stale database and exported, removing those epics
- Required manual recovery

Proposed fix: Check database freshness before export, similar to
VC's ValidateDatabaseFreshness(). Require --force to override.

Priority P1: Silent data loss in common multi-agent scenario.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-07 19:39:44 -08:00
Steve Yegge
d97df21a65 Fix MCP server integration tests - add env variable propagation
- Fix BdCliClient._run_command() to pass BEADS_DIR/BEADS_DB env vars to subprocess
- Update temp_db fixture to create .beads in workspace and return .beads dir path
- Update mcp_client fixture to use beads_dir and enable BEADS_NO_DAEMON mode
- Simplify test_init_tool to work with connection pool architecture

Result: All 19 integration tests now pass (was 19 failing)
Amp-Thread-ID: https://ampcode.com/threads/T-c1da2a55-f086-4284-9c85-0dfa4c479cf9
Co-authored-by: Amp <amp@ampcode.com>
2025-11-07 19:27:22 -08:00
Steve Yegge
33c3b05eef Update bd JSONL 2025-11-07 19:08:05 -08:00
Steve Yegge
52833704f0 bd sync: 2025-11-07 19:07:55 2025-11-07 19:07:55 -08:00
Steve Yegge
0e8936bf61 Fix test failures: update to new AddDependencyParams field names
- Update tests to use issue_id/depends_on_id instead of from_id/to_id
- Fix test_client_lazy_initialization to mock create_bd_client instead of BdClient
- Add workspace setup for lazy initialization test
- Fixes 2 test failures (now 123 passing, down from 121)

Amp-Thread-ID: https://ampcode.com/threads/T-71b3ce65-87cb-451a-a30d-162d76d92f9c
Co-authored-by: Amp <amp@ampcode.com>
2025-11-07 19:07:49 -08:00
Steve Yegge
9eab271010 bd sync: 2025-11-07 19:05:05 2025-11-07 19:05:05 -08:00
Steve Yegge
62643ea8c6 Fix Windows MCP subprocess timeout for git detection (bd-r79z)
- Add shell=True for subprocess.run() on Windows platform
- Improves git command PATH resolution on Windows
- Add debug logging for git detection failures
- Fixes GH#245 timeout issue where git rev-parse times out in MCP server

Amp-Thread-ID: https://ampcode.com/threads/T-71b3ce65-87cb-451a-a30d-162d76d92f9c
Co-authored-by: Amp <amp@ampcode.com>
2025-11-07 19:05:02 -08:00
Steve Yegge
a6c9579645 bd sync: 2025-11-07 18:57:35 2025-11-07 18:57:35 -08:00
Steve Yegge
c81c1653fd Fix beads-mcp workspace context persistence and buffer overflow
Fixes bd-ww0g - Two critical bugs in beads-mcp v0.21:

1. "No workspace set" error after successful set_context:
   - Root cause: os.environ doesn't persist across MCP tool calls
   - Solution: Added module-level _workspace_context dict (server.py)
   - Modified set_context(), with_workspace(), where_am_i() to use persistent storage

2. "chunk longer than limit" MCP buffer overflow:
   - Root cause: Large issue lists exceed MCP stdio buffer limits
   - Solution: Reduced default list limit from 50 to 20
   - Strip dependencies/dependents from list() and ready() responses
   - Full details still available via show() command

Files changed:
- integrations/beads-mcp/src/beads_mcp/server.py
- integrations/beads-mcp/src/beads_mcp/models.py

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-07 16:54:17 -08:00
Steve Yegge
f1f144dbf3 bd sync: 2025-11-07 16:08:52 2025-11-07 16:08:52 -08:00
Steve Yegge
3e207dfca9 Add cleanup script for test pollution (bd-vxdr) 2025-11-07 16:08:47 -08:00
Steve Yegge
36919da128 bd sync: 2025-11-07 16:08:36 2025-11-07 16:08:36 -08:00
Steve Yegge
a1ef05db98 Update bd JSONL 2025-11-07 16:07:25 -08:00
Steve Yegge
d9db9755a8 Sync beads database after merge
Amp-Thread-ID: https://ampcode.com/threads/T-37164fd7-6452-40b0-b5dd-c13672dcb843
Co-authored-by: Amp <amp@ampcode.com>
2025-11-07 15:56:30 -08:00
Steve Yegge
cdecc02e4d bd sync: 2025-11-07 15:56:20 2025-11-07 15:56:20 -08:00
Steve Yegge
0815ac2602 bd sync: 2025-11-07 15:55:36 2025-11-07 15:55:36 -08:00
Steve Yegge
d3de5519b2 Fix Windows SQLite support in releases
- Enable CGO in GoReleaser config
- Add MinGW cross-compiler for Windows builds
- Split builds per platform to configure correct CC
- Install cross-compilation toolchains in release workflow

Fixes #253

Amp-Thread-ID: https://ampcode.com/threads/T-8600ed89-42af-4785-b5dc-01ad37f1451d
Co-authored-by: Amp <amp@ampcode.com>
2025-11-07 15:54:59 -08:00
Steve Yegge
2db2203630 Sync bd issues 2025-11-07 09:54:21 -08:00
Steve Yegge
ba87533f34 bd sync: 2025-11-07 09:50:03 2025-11-07 09:50:03 -08:00
Steve Yegge
19da81caea bd sync: 2025-11-07 00:28:01 2025-11-07 00:28:01 -08:00
Steve Yegge
769cd7b1d3 bd sync: 2025-11-06 22:23:46 2025-11-06 22:23:46 -08:00
Steve Yegge
559d1ecf65 docs: Add CHANGELOG entry for v0.22.1 2025-11-06 20:24:09 -08:00
Steve Yegge
6b25ad1122 bd sync: 2025-11-06 20:15:41 2025-11-06 20:15:41 -08:00
Steve Yegge
95cbcf4fbc Centralize BD_DEBUG logging into internal/debug package
- Created internal/debug package with Enabled(), Logf(), Printf()
- Added comprehensive unit tests for debug package
- Replaced 50+ scattered os.Getenv("BD_DEBUG") checks across 9 files
- Centralized debug logic for easier maintenance and testing
- All tests passing, behavior unchanged

Closes bd-fb95094c.5
2025-11-06 20:14:34 -08:00
Steve Yegge
04621fe731 bd sync: close bd-fb95094c.7 2025-11-06 20:07:12 -08:00
Steve Yegge
0095464e83 bd sync: 2025-11-06 20:00:09 2025-11-06 20:00:09 -08:00
Steve Yegge
78c9d744cb Add edge case tests for getMultiRepoJSONLPaths()
- Test empty path handling (returns nil for single-repo mode)
- Test duplicate paths (documents non-deduping behavior)
- Test paths with spaces (handles correctly)
- Test relative paths (not normalized, used as-is)
- Test tilde expansion (not expanded, used literally)

Closes bd-kdoh

Amp-Thread-ID: https://ampcode.com/threads/T-ac07d8fd-51a3-4511-a477-d7041b950ea8
Co-authored-by: Amp <amp@ampcode.com>
2025-11-06 19:54:59 -08:00
Steve Yegge
b9607e1814 Update JSONL after closing bd-4b6u
Amp-Thread-ID: https://ampcode.com/threads/T-645ccbf4-a5b6-44a1-bbd9-913447e17b49
Co-authored-by: Amp <amp@ampcode.com>
2025-11-06 19:54:00 -08:00
Steve Yegge
6960feb93d Update beads.jsonl (bd-bc2c6191 closed) 2025-11-06 19:51:31 -08:00
Steve Yegge
b15d4c7340 Update bd JSONL 2025-11-06 19:42:48 -08:00
Steve Yegge
99acd03e32 Update beads.jsonl (close bd-iov0, bd-aec5439f, bd-fd8753d9)
Amp-Thread-ID: https://ampcode.com/threads/T-71887707-4d93-4070-869e-b46b32ab8b6a
Co-authored-by: Amp <amp@ampcode.com>
2025-11-06 19:42:27 -08:00
Steve Yegge
20eafa103a Merge branch 'main' of github.com:steveyegge/beads
# Conflicts:
#	.beads/beads.jsonl
2025-11-06 19:41:52 -08:00
Steve Yegge
5c1f441c2a Fix bd-ng56: add raw string equality short-circuit before jsonEquals
Optimization to avoid JSON unmarshalling when strings match exactly (common case).
Simple 1-line change instead of complex streaming rewrite for P3 issue.
2025-11-06 19:41:27 -08:00
Steve Yegge
581294f98b bd sync: 2025-11-06 19:40:52 2025-11-06 19:40:52 -08:00
Steve Yegge
244367c351 Update bd JSONL 2025-11-06 19:37:54 -08:00
Steve Yegge
729ab60ef5 Update beads.jsonl - close bd-2997 2025-11-06 19:36:32 -08:00
Steve Yegge
621ffdb594 Update beads.jsonl (close bd-irq6)
Amp-Thread-ID: https://ampcode.com/threads/T-71887707-4d93-4070-869e-b46b32ab8b6a
Co-authored-by: Amp <amp@ampcode.com>
2025-11-06 19:36:06 -08:00
Steve Yegge
7672473bbd Update bd JSONL 2025-11-06 19:25:03 -08:00
Steve Yegge
fb17b4286d Update issue metadata for bd-rb75 and bd-6ku3 closures 2025-11-06 19:23:45 -08:00
Steve Yegge
6e182fa32f Update bd JSONL 2025-11-06 19:21:17 -08:00
Steve Yegge
7726d6207e Update beads database after closing bd-1fkr
Amp-Thread-ID: https://ampcode.com/threads/T-11b30d1f-1dbf-4bf1-b3ef-866ff6f75662
Co-authored-by: Amp <amp@ampcode.com>
2025-11-06 19:17:21 -08:00
Steve Yegge
f61f8dd2ba bd sync: apply DB changes after import 2025-11-06 19:16:50 -08:00
Steve Yegge
7c124835bf Merge branch 'main' of github.com:steveyegge/beads 2025-11-06 19:16:48 -08:00
Steve Yegge
d6cc42d7b1 bd sync: 2025-11-06 19:16:47 2025-11-06 19:16:47 -08:00
Steve Yegge
ba71874cac Update beads JSONL (timestamp updates from daemon) 2025-11-06 19:15:03 -08:00
Steve Yegge
055f1d9c1e Fix isHashID to handle hash IDs without letters a-f
The previous implementation required hash IDs to contain letters a-f,
but SHA256 hashes can be all digits (probability ~2.4%). This caused
TestMigrateHashIDs to fail when the generated hash ID was all numeric.

Updated isHashID to:
- Strip hierarchical suffixes (.1, .1.2) before checking
- Accept any valid hex string (0-9, a-f)
- Distinguish hash IDs by presence of letters a-f

Fixes bd-6ku3
2025-11-06 19:14:49 -08:00
Steve Yegge
41b1a21206 Fix bd-rb75: Ignore merge artifacts in .beads/.gitignore 2025-11-06 19:14:04 -08:00
Steve Yegge
d2d31766e6 bd sync: 2025-11-06 19:07:35 2025-11-06 19:07:35 -08:00
Steve Yegge
746961efd2 Merge branch 'main' of github.com:steveyegge/beads
# Conflicts:
#	.beads/beads.jsonl
2025-11-06 19:07:31 -08:00
Steve Yegge
d6c2550579 bd sync: 2025-11-06 19:07:19 2025-11-06 19:07:19 -08:00