Steve Yegge
e2bb4311f1
Improve mutation channel robustness
...
- Add event type constants (MutationCreate, MutationUpdate, MutationDelete, MutationComment)
- Make buffer size configurable via BEADS_MUTATION_BUFFER (default 512, up from 100)
- Add defensive closed-channel handling in event loop consumer
- Add 1s dropped-events ticker (down from 60s) for faster recovery
- Verify mutationChan is never closed (prevents panic)
Oracle review findings addressed:
- Eliminates panic risk from send-on-closed-channel
- Reduces worst-case recovery latency from 60s to 1s
- Increases buffer capacity for better burst handling
- Type-safe event constants prevent string typos
Related: bd-36320a04, bd-1f4086c5
2025-10-31 19:12:02 -07:00
Steve Yegge
45504dde91
bd sync: 2025-10-31 19:10:08
2025-10-31 19:10:08 -07:00
Steve Yegge
e313e6e2c2
Improve test coverage for cmd/bd
...
- Add comprehensive version mismatch tests (checkVersionMismatch: 25% → 100%)
- Add daemon formatting helper tests (formatDaemonDuration, formatDaemonRelativeTime: 0% → 100%)
- Add auto-import test cases (checkAndAutoImport: 27.8% → 44.4%)
- Add compact eligibility test
Overall coverage: 47.9% → 48.3%
cmd/bd coverage: 20.5% → 21.0%
New test files:
- cmd/bd/autoflush_version_test.go (5 test functions)
- cmd/bd/daemons_test.go (2 test functions)
All tests passing.
Amp-Thread-ID: https://ampcode.com/threads/T-29fa5379-fd71-4f75-bc4f-272beff96c8f
Co-authored-by: Amp <amp@ampcode.com >
2025-10-31 18:40:32 -07:00
Steve Yegge
4fbff148f0
bd sync: 2025-10-31 18:27:27
2025-10-31 18:27:27 -07:00
Steve Yegge
7ad15fe524
Fix #188 : Add --json flag to blocked command
...
- Added --json flag registration for blockedCmd
- Fixed blockedCmd to read json flag from cmd.Flags()
- All commands now consistently support --json for agent use
- Completes the fix started in earlier commits for show/update/close/stats
2025-10-31 18:15:13 -07:00
Steve Yegge
fa1d13af11
Fix #190 : Clarify onboarding completion message
...
Changed 'confirm by saying' to 'tell your AI assistant' to make it clear
this is meant for the AI, not a bd command to run.
2025-10-31 18:12:40 -07:00
Steve Yegge
253caef761
Fix bd-e55c: Import respects updated_at timestamps
...
- Import now checks timestamps before updating issues
- Only applies updates if incoming version is newer than local
- Prevents older remote versions from overwriting newer local changes
- Added comprehensive tests for timestamp precedence
- Fixes issue where git pull would revert local changes to open status
2025-10-31 18:06:05 -07:00
Steve Yegge
19c1c1570d
bd sync: 2025-10-31 18:05:57
2025-10-31 18:06:05 -07:00
Steve Yegge
4d2efdc7b3
test: add autoimport and utility function tests
...
- Test checkAndAutoImport with various conditions
- Test findBeadsDir and findBeadsDir in parent
- Test checkGitForIssues edge cases
- Test boolToFlag utility function
- cmd/bd coverage: 20.4% -> 20.5%
2025-10-31 18:04:29 -07:00
Steve Yegge
f1dd1e4446
test: improve internal/importer coverage from 33.5% to 70.5%
...
- Add comprehensive tests for ImportIssues main function
- Test basic import, updates, dry-run, dependencies, labels
- Test helper functions: getOrCreateStore, GetPrefixList
- All tests passing
2025-10-31 18:01:43 -07:00
Steve Yegge
5b342ff827
bd sync: apply rename detection from import
2025-10-31 17:56:47 -07:00
Steve Yegge
c2f7019786
bd sync: 2025-10-31 17:56:46
2025-10-31 17:56:47 -07:00
Steve Yegge
ddc04eb6f9
bd sync: 2025-10-31 17:54:26
2025-10-31 17:54:26 -07:00
Steve Yegge
9ae40eb3cd
Merge branch 'main' of github.com:steveyegge/beads
2025-10-31 17:54:25 -07:00
Steve Yegge
54391798a0
Add tests for internal/importer field comparison functions
...
- Added tests for equalPtrStr (0% -> 100% coverage)
- Added tests for equalIssueType (50% -> 100% coverage)
- Improved internal/importer coverage from 31.2% to 33.5%
- Overall project coverage increased to 46.0%
2025-10-31 17:54:14 -07:00
Steve Yegge
48fdb3ee9c
bd sync: 2025-10-31 17:54:06
2025-10-31 17:54:06 -07:00
Steve Yegge
cbd0bf0b53
bd sync: 2025-10-31 17:54:01
2025-10-31 17:54:01 -07:00
Steve Yegge
29f77b2220
bd sync: 2025-10-31 17:53:48
2025-10-31 17:53:49 -07:00
Steve Yegge
cd8cf997c9
Add comprehensive tests for internal/utils ID parsing functions
...
- Added tests for ExtractIssuePrefix (100% coverage)
- Added tests for ExtractIssueNumber (100% coverage)
- Enhanced ResolvePartialID tests with edge cases
- Added ResolvePartialIDs error handling tests
- Improved internal/utils coverage from 42% to 88%
- Overall project coverage increased from 45.6% to 45.8%
Amp-Thread-ID: https://ampcode.com/threads/T-1a44c987-7e49-431d-8e0b-467157d079eb
Co-authored-by: Amp <amp@ampcode.com >
2025-10-31 17:52:36 -07:00
Steve Yegge
a60ae8d2de
bd sync: 2025-10-31 17:51:09
2025-10-31 17:51:09 -07:00
Steve Yegge
dd959d09cd
bd sync: 2025-10-31 17:47:46
2025-10-31 17:47:46 -07:00
Steve Yegge
7eb315bbe0
bd sync: 2025-10-31 17:41:02
2025-10-31 17:41:04 -07:00
Steve Yegge
caf0161ed1
Add unit tests for nodb.go and daemon/discovery.go
...
- Added tests for extractIssuePrefix, loadIssuesFromJSONL, detectPrefix, writeIssuesToJSONL
- Added tests for walkWithDepth depth limiting and hidden directory skipping
- Added tests for DiscoverDaemons registry and legacy discovery paths
- Improved test coverage for cmd/bd and internal/daemon
2025-10-31 17:26:37 -07:00
Steve Yegge
8bf6b1eb63
Add unit tests for autoimport, importer, and main CLI
...
Amp-Thread-ID: https://ampcode.com/threads/T-b89cad6b-636f-477f-925d-4c3e3f769215
Co-authored-by: Amp <amp@ampcode.com >
2025-10-31 17:17:33 -07:00
Steve Yegge
d5483574fd
Rebuild DB from JSONL after corruption cleanup
...
- Database had 72 duplicate issues from incomplete migration
- Sequential IDs (no content_hash) mixed with hash IDs
- Removed corrupt DB, rebuilt from JSONL (source of truth)
- 225 → 153 issues (duplicates eliminated)
- Updated config.json version to 0.20.1
2025-10-31 17:15:55 -07:00
Steve Yegge
a1b1b5b559
bd sync: 2025-10-31 17:15:49
2025-10-31 17:15:49 -07:00
Steve Yegge
33565f10db
bd sync: 2025-10-31 15:12:13
2025-10-31 15:12:13 -07:00
Steve Yegge
39d5608497
Merge branch 'main' of github.com:steveyegge/beads
...
# Conflicts:
# .beads/beads.jsonl
2025-10-31 15:12:08 -07:00
Steve Yegge
025166072c
bd sync: 2025-10-31 15:12:02
2025-10-31 15:12:02 -07:00
Steve Yegge
ddab26315f
Remove dead code found by deadcode analyzer
...
- Removed 5 unreachable functions (~200 LOC)
- computeIssueContentHash, shouldSkipExport from autoflush.go
- addDependencyUnchecked, removeDependencyIfExists from dependencies.go
- isUniqueConstraintError alias from util.go
- All tests still pass
- Closes bd-7c5915ae
2025-10-31 15:12:01 -07:00
Steve Yegge
aa567f6b9a
feat: add Mermaid.js format for dependency tree visualization ( #191 )
...
Adds `bd dep tree --format mermaid` to export dependency trees as Mermaid.js flowcharts.
Features:
- Status indicators: ☐ open, ◧ in_progress, ⚠ blocked, ☑ closed
- Theme-agnostic design
- Works with --reverse flag
- Comprehensive unit tests following TDD
Co-authored-by: David Laing <david@davidlaing.com >
2025-10-31 15:11:29 -07:00
Steve Yegge
c070a9e7d4
bd sync: 2025-10-31 14:36:24
2025-10-31 14:36:24 -07:00
Steve Yegge
118d7541dd
Add --json flag support to more bd commands
...
- stats: Added --json flag for programmatic output
- show, update: Added --json flag for issue details
- close, reopen: Added --json flag for bulk operations
- dep (add, remove, tree, cycles): Added --json flags
- label (add, remove, list, list-all): Added --json flags
- duplicates, merge: Added --json flags
Closes bd-4dcd2d09
2025-10-31 14:36:20 -07:00
Steve Yegge
b2b0373d08
bd sync: 2025-10-31 14:36:12
2025-10-31 14:36:12 -07:00
Steve Yegge
d5488cb97f
Remove collision-era language from docs and code
...
- Updated FAQ.md, ADVANCED.md, TROUBLESHOOTING.md to explain hash IDs eliminate collisions
- Removed --resolve-collisions references from all documentation and examples
- Renamed handleCollisions() to detectUpdates() to reflect update semantics
- Updated test names: TestAutoImportWithCollision → TestAutoImportWithUpdate
- Clarified: with hash IDs, same-ID = update operation, not collision
Closes: bd-50a7, bd-b84f, bd-bda8, bd-650c, bd-3ef2, bd-c083, bd-85a6
2025-10-31 14:24:50 -07:00
Steve Yegge
b9b1b162d1
bd sync: 2025-10-31 14:24:43
2025-10-31 14:24:43 -07:00
Steve Yegge
6dc768797e
Update issues: close bd-a5e2bd80 epic and children
2025-10-31 13:51:22 -07:00
Steve Yegge
427c88ea04
Remove outdated --resolve-collisions documentation (flag removed in v0.20.1)
2025-10-31 13:40:57 -07:00
Steve Yegge
223b2ced46
Merge branch 'main' of github.com:steveyegge/beads
2025-10-31 13:39:39 -07:00
Steve Yegge
eb18d342f4
Fix: Treat same-ID updates as normal updates, not collisions (bd-0134cc5a)
2025-10-31 13:39:38 -07:00
Steve Yegge
932b293118
Document hash-based IDs and hierarchical children (bd-a5e2bd80.15)
...
Amp-Thread-ID: https://ampcode.com/threads/T-afcbc67c-4b83-47d4-8361-7c1ad08906a0
Co-authored-by: Amp <amp@ampcode.com >
2025-10-31 12:51:10 -07:00
Steve Yegge
25e6fba866
bd sync: 2025-10-31 12:50:41
2025-10-31 12:50:41 -07:00
Steve Yegge
415f2e8206
bd sync: 2025-10-31 12:32:54
2025-10-31 12:32:54 -07:00
Steve Yegge
97f4bf0e2f
Resolve merge conflict - accept remote
2025-10-31 12:32:49 -07:00
Steve Yegge
2e72823277
bd sync: 2025-10-31 12:32:32
2025-10-31 12:32:32 -07:00
Steve Yegge
0c908f1fd5
bd sync: 2025-10-31 12:22:35
2025-10-31 12:22:35 -07:00
Steve Yegge
75b8e23c14
bd sync: apply rename detection from import
2025-10-31 12:00:44 -07:00
Steve Yegge
f0858bbf38
bd sync: 2025-10-31 12:00:43
2025-10-31 12:00:43 -07:00
Steve Yegge
5842a77e11
Merge branch 'main' of github.com:steveyegge/beads
2025-10-31 12:00:12 -07:00
Steve Yegge
1e99b251a6
bd sync: 2025-10-31 12:00:10
2025-10-31 12:00:10 -07:00