Commit Graph

5 Commits

Author SHA1 Message Date
Steve Yegge
a44ddf5cfc Fix autoimport test failures and cleanup test issues
This commit fixes all 7 failing autoimport tests by correcting a bug
in import_shared.go where the function returned early when no issue
prefix was configured, preventing any imports from happening.

Changes:
- Fix early return bug in importIssuesCore (import_shared.go:85-121)
- Now continues with import even when prefix is not configured
- Only validates prefixes when a prefix is actually set
- Delete test issues bd-50 through bd-63 (14 cleanup issues)

All tests now pass:
 TestAutoImportMultipleCollisionsRemapped
 TestAutoImportAllCollisionsRemapped
 TestAutoImportExactMatchesOnly
 TestAutoImportNewIssuesOnly
 TestAutoImportIfNewer
 TestAutoImportNoCollision
 TestAutoImportClosedAtInvariant

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-21 23:43:04 -07:00
Steve Yegge
2426f556d4 Fix prefix validation critical bugs from oracle review
- Boundary-aware ID replacement (prevents wy-1 corrupting wy-10)
- Sort IDs by length descending before replacement
- Validate configured prefix is not empty
- Validate ID format before renaming (numeric suffix required)
- All critical issues from oracle review addressed
2025-10-21 20:49:03 -07:00
Steve Yegge
3e44951f15 Add prefix validation on bulk import
- Detects prefix mismatches during import
- Shows warning with mismatched prefixes and counts
- Added --rename-on-import flag to automatically fix prefixes
- Auto-import is lenient about prefixes (doesn't enforce)
- All tests passing
2025-10-21 20:34:37 -07:00
Steve Yegge
a28d4fe4c7 Add comments feature (bd-162)
- Add comments table to SQLite schema
- Add Comment type to internal/types
- Implement AddIssueComment and GetIssueComments in storage layer
- Update JSONL export/import to include comments
- Add comments to 'bd show' output
- Create 'bd comments' CLI command structure
- Fix UpdateIssueID to update comments table and defer FK checks
- Add GetIssueComments/AddIssueComment to Storage interface

Note: CLI command needs daemon RPC support (tracked in bd-163)
Amp-Thread-ID: https://ampcode.com/threads/T-ece10dd1-cf64-48ff-9adb-dd304d0bcb25
Co-authored-by: Amp <amp@ampcode.com>
2025-10-19 18:28:41 -07:00
Steve Yegge
790233f748 feat: Add 'bd stale' command to show and release orphaned executor claims
- Implements bd stale command to show issues with execution_state where executor is dead/stopped
- Adds --release flag to automatically release orphaned issues
- Adds --threshold flag to customize heartbeat staleness threshold (default: 300s/5min)
- Handles missing executor instances (LEFT JOIN) for cases where executor was deleted
- Adds QueryContext and BeginTx helper methods to SQLiteStorage for advanced queries
- Fixes ExternalRef comparison bug in import_shared.go (pointer vs string)
- Removes unused imports in import.go

Resolves vc-124
2025-10-18 17:14:21 -07:00