Commit Graph

797 Commits

Author SHA1 Message Date
Steve Yegge
a4eb4fe451 Add two-clone collision test proving beads multi-agent workflow failure
- Creates TestTwoCloneCollision integration test
- Sets up 2 independent clones with git hooks and daemons
- Both file issues with same ID (test-1)
- Demonstrates databases don't converge after collision resolution
- Clone A: test-1='Issue from clone A', test-2='Issue from clone B'
- Clone B: test-1='Issue from clone B', test-2='Issue from clone A'
- Git status shows dirty state in both clones
- Test proves beads fails at basic multi-agent workflow

Also adds --json flag to create, ready, and list commands for
better test integration.

Amp-Thread-ID: https://ampcode.com/threads/T-8fa0ab6c-2226-4f9b-8e11-14e1156537fc
Co-authored-by: Amp <amp@ampcode.com>
2025-10-28 11:34:27 -07:00
Steve Yegge
e75f8c77a2 Merge beads.jsonl changes 2025-10-28 10:50:12 -07:00
Steve Yegge
d2920e3701 Remove cache_size from MCP docs and tests 2025-10-28 10:50:00 -07:00
Steve Yegge
d52851f452 bd sync: 2025-10-28 10:49:53 2025-10-28 10:49:53 -07:00
Steve Yegge
a0cbf2291a bd sync: 2025-10-28 10:48:13 2025-10-28 10:48:13 -07:00
Steve Yegge
322ab63b10 Remove daemon storage cache (bd-33, bd-34, bd-35)
- Deleted server_cache_storage.go (~300 lines)
- Removed cache fields from Server struct
- Simplified database routing to use s.storage directly
- Removed cache metrics from health and metrics endpoints
- Deleted server_eviction_test.go (cache eviction tests)
- Cleaned up limits_test.go (removed cache assertions)
- All tests passing
2025-10-28 10:33:19 -07:00
Steve Yegge
77095d9ac3 bd sync: 2025-10-28 10:33:10 2025-10-28 10:33:10 -07:00
Steve Yegge
1e3ffa839e bd sync: 2025-10-28 10:25:43 2025-10-28 10:25:43 -07:00
Steve Yegge
0f5e92b229 Update issue tracker 2025-10-27 23:20:19 -07:00
Steve Yegge
9edcb6f19f Remove cache fields from Server struct (bd-31)
- Removed storageCache, cacheMu, maxCacheSize, cacheTTL, cleanupTicker fields
- Removed cacheHits and cacheMisses metrics
- Removed cache size/TTL parsing from env vars in NewServer()
- Removed cleanup ticker goroutine from Start()
- Removed cache cleanup logic from Stop()
- Part of bd-29 epic to remove daemon storage cache

Amp-Thread-ID: https://ampcode.com/threads/T-239a5531-68a5-4c98-b85d-0e3512b2553c
Co-authored-by: Amp <amp@ampcode.com>
2025-10-27 23:20:10 -07:00
Steve Yegge
c7477464fc bd sync: 2025-10-27 23:19:14 2025-10-27 23:19:14 -07:00
Steve Yegge
bbb1725c32 Replace getStorageForRequest with s.storage (bd-32)
- Replaced all getStorageForRequest(req) calls with direct s.storage access
- Updated 5 handler files: server_issues_epics.go (~8 calls), server_labels_deps_comments.go (~4 calls), server_compact.go (~2 calls), server_export_import_auto.go (~2 calls), server_routing_validation_diagnostics.go (~1 call)
- Only remaining references are in server_cache_storage.go (to be deleted in bd-33) and server_eviction_test.go (to be deleted in bd-34)
- Part of bd-29 epic to remove daemon storage cache

Amp-Thread-ID: https://ampcode.com/threads/T-239a5531-68a5-4c98-b85d-0e3512b2553c
Co-authored-by: Amp <amp@ampcode.com>
2025-10-27 23:14:38 -07:00
Steve Yegge
085a64f573 Remove CACHE_AUDIT.md, moved findings to bd-30 notes 2025-10-27 23:05:09 -07:00
Steve Yegge
4d67939c2c bd sync: 2025-10-27 23:05:06 2025-10-27 23:05:06 -07:00
Steve Yegge
c3786e3bc4 Add cache usage audit documentation (bd-30) 2025-10-27 23:02:48 -07:00
Steve Yegge
e39341a6b3 bd sync: 2025-10-27 23:02:43 2025-10-27 23:02:43 -07:00
Steve Yegge
6a199875ea Fix TestRepairMultiplePrefixes to bypass prefix validation
The test was failing because CreateIssue() now validates that issue IDs
match the configured prefix (bd-177). To simulate a corrupted database
with multiple prefixes, the test now directly inserts issues via SQL
instead of using CreateIssue().

This allows the test to verify the prefix repair functionality works
correctly without triggering validation errors.

Amp-Thread-ID: https://ampcode.com/threads/T-74d861bc-3abb-47f0-8080-64e46b452233
Co-authored-by: Amp <amp@ampcode.com>
2025-10-27 22:59:19 -07:00
Steve Yegge
9e062b97c8 bd sync: 2025-10-27 22:56:29 2025-10-27 22:56:29 -07:00
Steve Yegge
a46c2f79a9 Resolve merge conflicts: use importer package 2025-10-27 22:44:40 -07:00
dependabot[bot]
b882672673 Bump fastmcp from 2.12.4 to 2.13.0.1 in /integrations/beads-mcp
Bumps [fastmcp](https://github.com/jlowin/fastmcp) from 2.12.4 to 2.13.0.1.
- [Release notes](https://github.com/jlowin/fastmcp/releases)
- [Changelog](https://github.com/jlowin/fastmcp/blob/main/docs/changelog.mdx)
- [Commits](https://github.com/jlowin/fastmcp/compare/v2.12.4...v2.13.0.1)

---
updated-dependencies:
- dependency-name: fastmcp
  dependency-version: 2.13.0.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-27 22:41:01 -07:00
Steve Yegge
c69d4b4adb Fix variable shadowing in author detection 2025-10-27 22:30:36 -07:00
Lon Lundgren
9dcfa88711 Properly pipe BD_ACTOR through to Comment.Author field in bd comments add. Add flag to bd comments add to accept author. Precedence is now glag, BD_ACTOR, USER 2025-10-27 22:30:36 -07:00
Steve Yegge
af0582ae5d bd sync: 2025-10-27 22:26:46 2025-10-27 22:26:46 -07:00
Steve Yegge
fb21a319cd Fix bd-28: Auto-import should update issues, not create duplicates
Changed ResolveCollisions from true to false in auto-import logic.
This ensures git pull updates existing issues instead of creating duplicates.
2025-10-27 22:26:44 -07:00
Steve Yegge
393e57302d bd sync: 2025-10-27 22:26:40 2025-10-27 22:26:40 -07:00
Steve Yegge
eeb69c94bc Add test to prevent ResolveCollisions in auto-import (bd-247) 2025-10-27 22:23:23 -07:00
Steve Yegge
203b8934da bd sync: 2025-10-27 22:22:29 2025-10-27 22:22:29 -07:00
Steve Yegge
a8077f4623 bd sync: 2025-10-27 21:49:01 2025-10-27 21:49:01 -07:00
Steve Yegge
6e673b324a bd sync: 2025-10-27 21:43:00 2025-10-27 21:43:00 -07:00
Steve Yegge
9882ea3807 bd sync: 2025-10-27 21:34:16 2025-10-27 21:34:16 -07:00
Steve Yegge
44957478f7 Resolve merge conflict - use remote beads.jsonl 2025-10-27 21:30:15 -07:00
Steve Yegge
10a0c108db bd sync: 2025-10-27 21:30:03 2025-10-27 21:30:04 -07:00
Steve Yegge
1c0576158a bd sync: 2025-10-27 21:28:53 2025-10-27 21:28:53 -07:00
Steve Yegge
b2c286e4d5 Auto-merge 24 duplicate issue groups 2025-10-27 21:23:03 -07:00
Steve Yegge
51307cdd40 bd sync: 2025-10-27 21:22:48 2025-10-27 21:22:48 -07:00
Steve Yegge
0c737025b5 Split internal/rpc/server.go into 8 focused modules (bd-215)
Refactored monolithic 2238-line server.go into 8 files with clear responsibilities:
- server_core.go: Server type, NewServer (115 lines)
- server_lifecycle_conn.go: Start/Stop/connection handling (248 lines)
- server_cache_storage.go: Storage caching and eviction (286 lines)
- server_routing_validation_diagnostics.go: Request routing/validation (384 lines)
- server_issues_epics.go: Issue CRUD operations (506 lines)
- server_labels_deps_comments.go: Labels/deps/comments (199 lines)
- server_compact.go: Compaction operations (287 lines)
- server_export_import_auto.go: Export/import operations (293 lines)

Improvements:
- Replaced RWMutex.TryLock with atomic.Bool for portable single-flight guard
- Added default storage close in Stop() to prevent FD leaks
- All methods remain on *Server receiver (no behavior changes)
- Each file <510 LOC for better maintainability
- All tests pass, daemon verified working

Amp-Thread-ID: https://ampcode.com/threads/T-92d481ad-1bda-4ecd-bcf5-874a1889db30
Co-authored-by: Amp <amp@ampcode.com>
2025-10-27 21:14:34 -07:00
Steve Yegge
a017a936e1 bd sync: 2025-10-27 21:12:32 2025-10-27 21:12:32 -07:00
Steve Yegge
1ba3d04b27 bd sync: 2025-10-27 21:12:26 2025-10-27 21:12:26 -07:00
Steve Yegge
ee3bf47c71 bd sync: 2025-10-27 21:12:19 2025-10-27 21:12:19 -07:00
Steve Yegge
9bf053d3c2 bd sync: 2025-10-27 20:55:47 2025-10-27 20:55:47 -07:00
Steve Yegge
ef23d98542 bd sync: 2025-10-27 20:54:48 2025-10-27 20:54:48 -07:00
Steve Yegge
fb398ded35 bd sync: 2025-10-27 20:52:55 2025-10-27 20:52:55 -07:00
Steve Yegge
d47378cfbc Remove skipped tests and unreachable RPC methods (bd-212, bd-213)
bd-212: Delete 3 permanently skipped test functions (~150 LOC)
- TestImportDependencyUpdates (import_collision_test.go)
- TestImportChainDependencies (import_collision_test.go)
- TestUpdateDependencyReferences (collision_test.go)

bd-213: Remove 4 unreachable RPC methods (~80 LOC)
- Server.GetLastImportTime
- Server.SetLastImportTime
- Server.findJSONLPath
- Client.Import

All tests pass. Phase 1 dead code cleanup continues.
2025-10-27 20:52:52 -07:00
Steve Yegge
d795dbe3d7 bd sync: 2025-10-27 20:48:11 2025-10-27 20:48:12 -07:00
Steve Yegge
298d559407 Remove unreachable utility functions (bd-224, bd-214)
- Remove duplicate computeIssueContentHash from sqlite/hash.go
- Remove FileUsed() from internal/config/config.go
- Remove verifyIssueOpen() test helper from git_sync_test.go
- Remove unimplemented SummarizeTier2 and all tier2 infrastructure from haiku.go

Removes ~120 LOC of dead code identified by deadcode analyzer.

Amp-Thread-ID: https://ampcode.com/threads/T-5f150c35-8d67-4dae-bb92-a7b5887d649d
Co-authored-by: Amp <amp@ampcode.com>
2025-10-27 20:45:59 -07:00
Steve Yegge
64a464fe6f bd sync: 2025-10-27 20:45:04 2025-10-27 20:45:04 -07:00
Steve Yegge
4910d88f22 bd sync: 2025-10-27 20:39:18 2025-10-27 20:39:18 -07:00
Steve Yegge
f33489714a bd sync: 2025-10-27 20:38:54 2025-10-27 20:38:54 -07:00
Steve Yegge
4ea32803e3 bd sync: 2025-10-27 20:38:13 2025-10-27 20:38:13 -07:00
Steve Yegge
ea7eaafb06 bd-211: Remove deprecated rename functions from import_shared.go
- Removed renameImportedIssuePrefixes (wrapper, 3 LOC)
- Removed renameImportedIssuePrefixesOld (deprecated, 61 LOC)
- Removed replaceIDReferences (32 LOC)
- Removed replaceBoundaryAware (31 LOC)
- Removed isBoundary (5 LOC)
- Removed TestIsBoundary (37 LOC)
- Removed TestReplaceBoundaryAware (54 LOC)
- Total: 223 LOC removed (136 LOC code + 91 LOC tests)
- Active implementation is in internal/importer/importer.go
- All tests pass
2025-10-27 20:38:13 -07:00