Commit Graph

1490 Commits

Author SHA1 Message Date
Steve Yegge 3973ccbfa3 bd sync: 2025-11-05 13:56:12 2025-11-05 13:56:12 -08:00
Steve Yegge 187c395e3e bd sync: 2025-11-05 12:34:59 2025-11-05 12:34:59 -08:00
Steve Yegge 3acaf1de65 Show dependency status in bd show output
- Add status display (open/closed/in_progress/blocked) for dependencies and dependents
- Improves quick progress tracking and context rebuilding for AI agents
- Fixes GH-226
2025-11-05 11:31:33 -08:00
Steve Yegge 55c9c45b2a Add --label as alias for --labels in bd create
Amp-Thread-ID: https://ampcode.com/threads/T-b13b6be4-b1aa-432f-9bbc-f2d31925fd11
Co-authored-by: Amp <amp@ampcode.com>
2025-11-05 11:23:34 -08:00
Steve Yegge 85ca8c3cbf bd sync: 2025-11-05 11:12:29 2025-11-05 11:12:29 -08:00
Steve Yegge 05d010e135 bd sync: 2025-11-05 11:09:34 2025-11-05 11:09:34 -08:00
Steve Yegge e1e58ef419 fix: Handle both string and *string for external_ref in UpdateIssue
Fixes panic during import when handleRename passes ExternalRef as *string.
The UpdateIssue function now accepts both string and *string for the
external_ref field to match the type definition in types.Issue.
2025-11-05 10:55:32 -08:00
Steve Yegge 8c5e51e3e6 Merge branch 'main' of github.com:steveyegge/beads
# Conflicts:
#	.beads/beads.jsonl
2025-11-05 10:27:12 -08:00
Steve Yegge 0fc4da7358 Optimize test suite performance (15-18x speedup)
- Add t.Parallel() to CLI and export/import tests for concurrent execution
- Remove unnecessary 200ms sleep in daemon_autoimport_test (Execute forces sync)
- Reduce filesystem settle wait from 100ms to 50ms on non-Windows
- Optimize debouncer test sleeps (9 reductions, 30-50% faster)

Results:
- cmd/bd: 5+ minutes → 18 seconds
- internal/importer: < 1 second
- Most packages: < 2 seconds

Closes bd-gpe7
2025-11-05 10:26:58 -08:00
Steve Yegge 32849c727a bd sync: 2025-11-05 01:41:58 2025-11-05 01:41:58 -08:00
Steve Yegge 6e3eaa0978 bd sync: auto-export 2025-11-05 01:26:55 -08:00
Steve Yegge 2ac28b0122 fix: Windows CLI tests and skip hanging concurrent test
- Fix Windows test failure: use bd.exe instead of bd on Windows
- Skip TestConcurrentExternalRefImports which hangs due to database deadlock
- Added TODO reference to bd-gpe7 for investigation

Fixes CI failures in Test (Windows) and Test Nix Flake jobs.
2025-11-05 01:23:33 -08:00
Steve Yegge 4c48b60b2e chore: Bump version to 0.21.9 2025-11-05 01:16:45 -08:00
Steve Yegge a41a08506b docs: Add CHANGELOG entry for v0.21.9 2025-11-05 01:15:57 -08:00
Steve Yegge 52cf2af9f7 Fix lint errors: add error check and gosec suppressions 2025-11-05 01:11:09 -08:00
Steve Yegge 97786e0bf9 bd sync: auto-export 2025-11-05 01:08:27 -08:00
Steve Yegge f27d0ba5a8 bd sync: 2025-11-05 01:08:17 2025-11-05 01:08:17 -08:00
Steve Yegge 0f15bdf5d2 bd sync: Update JSONL 2025-11-05 01:08:06 -08:00
Steve Yegge f354d6e905 bd sync: 2025-11-05 01:07:57 2025-11-05 01:07:57 -08:00
Steve Yegge 7eba7f6504 bd sync: 2025-11-05 01:05:18 2025-11-05 01:07:51 -08:00
Steve Yegge 183add96cc Resolve beads.jsonl merge conflict
Amp-Thread-ID: https://ampcode.com/threads/T-4b293f18-1d0a-41bf-932e-d65bc134fcfe
Co-authored-by: Amp <amp@ampcode.com>
2025-11-05 01:07:32 -08:00
Steve Yegge ca14127698 bd sync: Update JSONL 2025-11-05 01:04:51 -08:00
Steve Yegge 147ae14c34 bd sync: auto-export 2025-11-05 01:04:36 -08:00
Steve Yegge 0875e50f85 docs: Document new bd list query facilities (pattern matching, date ranges, empty checks)
Amp-Thread-ID: https://ampcode.com/threads/T-4d8dfaab-6a44-4ee5-ad11-93b915bbe1dc
Co-authored-by: Amp <amp@ampcode.com>
2025-11-05 01:02:55 -08:00
Steve Yegge 4892b8550f Export database to JSONL
Amp-Thread-ID: https://ampcode.com/threads/T-e58a11be-cbbb-4a75-86d5-fc51af8f51d2
Co-authored-by: Amp <amp@ampcode.com>
2025-11-05 01:01:06 -08:00
Steve Yegge 7c20f4bec1 Update issues (bd-gdzd closed, bd-gpe7 created) 2025-11-05 01:00:37 -08:00
Steve Yegge a727cd0990 bd sync: 2025-11-05 01:00:07 2025-11-05 01:00:37 -08:00
Steve Yegge c3ce00b257 bd sync: 2025-11-05 00:59:17 2025-11-05 00:59:17 -08:00
Steve Yegge 24126eaba5 bd sync: 2025-11-05 00:59:03
Amp-Thread-ID: https://ampcode.com/threads/T-9edaf5ed-11e2-49fe-93f2-2224ecd143f6
Co-authored-by: Amp <amp@ampcode.com>
2025-11-05 00:59:03 -08:00
Steve Yegge d693a7d3a1 bd sync: 2025-11-05 00:58:28 2025-11-05 00:58:28 -08:00
Steve Yegge 3bde4b06e2 Add child_counters migration with ON DELETE CASCADE (bd-bb08)
Amp-Thread-ID: https://ampcode.com/threads/T-9edaf5ed-11e2-49fe-93f2-2224ecd143f6
Co-authored-by: Amp <amp@ampcode.com>
2025-11-05 00:58:10 -08:00
Steve Yegge 510ca17195 test: Add comprehensive RPC list filter parity tests (bd-zkl)
- Test pattern matching filters (title/description/notes contains)
- Test empty/null checks (empty description, no assignee, no labels)
- Test priority range filters (min/max)
- Test date range filters with multiple formats
- Test status normalization ('all' vs unset)
- Test backward compatibility (deprecated --label flag)
- Verify daemon mode (RPC) behaves identically to direct mode
- All tests pass with real daemon instance

Resolves bd-zkl
2025-11-05 00:56:06 -08:00
Steve Yegge c10a5bc839 bd sync: 2025-11-05 00:55:53 2025-11-05 00:55:53 -08:00
Steve Yegge b5e451694a fix: resolve JSONL conflict
Amp-Thread-ID: https://ampcode.com/threads/T-22f7d7c5-6f7b-4783-beda-8494360d887a
Co-authored-by: Amp <amp@ampcode.com>
2025-11-05 00:55:52 -08:00
Steve Yegge 6da54f49fa bd sync: 2025-11-05 00:55:40 2025-11-05 00:55:40 -08:00
Steve Yegge 0abd21f7a6 Fix bd-gdzd: Treat same-content-different-ID as update
When import finds same content hash with different IDs, treat it as
an update to the existing issue instead of failing with 'rename
collision' error. This handles edge cases like test data, legacy
data, or data corruption gracefully.

Amp-Thread-ID: https://ampcode.com/threads/T-e58a11be-cbbb-4a75-86d5-fc51af8f51d2
Co-authored-by: Amp <amp@ampcode.com>
2025-11-05 00:54:25 -08:00
Steve Yegge 6c541edeed Database export: WASM issues now properly closed 2025-11-05 00:46:36 -08:00
Steve Yegge e0c1872dd8 bd sync: 2025-11-05 00:44:55 2025-11-05 00:44:55 -08:00
Steve Yegge fbe790aa40 feat: Add ancestor_id field and implement epic/child filtering
Amp-Thread-ID: https://ampcode.com/threads/T-22f7d7c5-6f7b-4783-beda-8494360d887a
Co-authored-by: Amp <amp@ampcode.com>
2025-11-05 00:44:41 -08:00
Steve Yegge 23f09ee0c1 Update .beads metadata after sync
Amp-Thread-ID: https://ampcode.com/threads/T-d089540c-c172-440f-88c9-ff06bde6504d
Co-authored-by: Amp <amp@ampcode.com>
2025-11-05 00:41:42 -08:00
Steve Yegge 78fe709deb bd sync: 2025-11-05 00:41:02 2025-11-05 00:41:42 -08:00
Steve Yegge 7292c856dd Fix import to respect import.missing_parents config
When --orphan-handling flag not specified, import was passing empty string
instead of reading config or defaulting to 'allow'. This broke all imports
with hierarchical IDs after git pull.

Fix: Read import.missing_parents config, default to 'allow' if unset.
Priority: flag > config > default
Amp-Thread-ID: https://ampcode.com/threads/T-d089540c-c172-440f-88c9-ff06bde6504d
Co-authored-by: Amp <amp@ampcode.com>
2025-11-05 00:41:14 -08:00
Steve Yegge 8b9a486056 Fix critical import bug: preserve closed_at timestamps during sync
**Problem:**
Closed issues were silently reopening during git sync/import operations.
When importing an issue update, the importer built an updates map with
status='closed' but NO closed_at timestamp. The UpdateIssue() function's
manageClosedAt() would only set closed_at when status was CHANGING to
closed, not when it was already closed. Result: closed_at got cleared,
effectively reopening issues.

**Root Cause:**
1. Importer built updates map without closed_at field (lines 443-451, 519-528)
2. closed_at was not in allowedUpdateFields whitelist
3. manageClosedAt() only managed closed_at for status TRANSITIONS
4. Import of already-closed issue → closed_at lost → issue reopens

**Impact:**
- WASM issues (bd-44d0, bd-8507, etc.) were closed on Nov 4 (commit 0df9144)
- They reopened as 'open' status during sync on Nov 5 (commit 8c9814a)
- Users had to repeatedly close the same issues
- Data integrity violation: status=closed with closed_at=NULL

**Fix:**
1. Add closed_at to allowedUpdateFields whitelist
2. Add closed_at to importer updates maps (both external_ref and ID paths)
3. Update manageClosedAt() to skip auto-management if closed_at explicitly provided
   - Preserves import timestamps while maintaining auto-management for CLI operations

**Testing:**
- All internal/importer tests pass
- All internal/storage/sqlite tests pass
- Explicitly tests timestamp preservation in TestImportWithExternalRef

**Files Changed:**
- internal/importer/importer.go: Add closed_at to updates maps
- internal/storage/sqlite/sqlite.go: Allow closed_at updates, respect explicit values

Amp-Thread-ID: https://ampcode.com/threads/T-53ed6e45-9d04-4a35-97e9-d1ec36321ab0
Co-authored-by: Amp <amp@ampcode.com>
2025-11-05 00:41:10 -08:00
Steve Yegge 6f5687f934 bd sync: 2025-11-05 00:32:20 2025-11-05 00:32:20 -08:00
Steve Yegge 8c9814a827 bd sync: 2025-11-05 00:27:51 2025-11-05 00:27:51 -08:00
Steve Yegge 626d51dd61 fix: Add npm-package to bump-version script and publish v0.21.8
- Added npm-package/package.json to version bump automation
- Published @beads/bd@0.21.8 to npm
- Future releases will auto-update npm package version
2025-11-05 00:18:19 -08:00
Steve Yegge e774d80939 bd sync: 2025-11-05 00:17:06 2025-11-05 00:17:06 -08:00
Steve Yegge 37ed10c7be fix: Point GoReleaser homebrew tap to homebrew-beads repo
Was pushing to steveyegge/beads instead of steveyegge/homebrew-beads.
This caused Homebrew formula to be committed to wrong repo.
2025-11-05 00:13:48 -08:00
goreleaserbot 8d2cc60600 Brew formula update for beads version v0.21.8 2025-11-05 08:10:46 +00:00
Steve Yegge 9855388094 docs: Make CHANGELOG update mandatory first step in release process 2025-11-05 00:09:48 -08:00