Commit Graph

709 Commits

Author SHA1 Message Date
Steve Yegge
dfd2ad6e75 bd sync: 2025-11-02 12:55:58 2025-11-02 12:55:58 -08:00
Steve Yegge
0cfe741553 Fix config version update in migrate command
- Save updated config with current version (fixes GH #193)
- Update version field when loading existing config
- Database version now stays in sync with binary version

Amp-Thread-ID: https://ampcode.com/threads/T-dfacc972-f6c8-4bb3-8997-faa079b5d070
Co-authored-by: Amp <amp@ampcode.com>
2025-11-02 12:55:53 -08:00
Steve Yegge
79fa6d2fec bd sync: 2025-11-02 12:32:23 2025-11-02 12:32:29 -08:00
Steve Yegge
130b8eee28 bd sync: apply rename detection from import 2025-11-02 12:32:00 -08:00
Steve Yegge
525b6d4a78 Merge branch 'main' of github.com:steveyegge/beads 2025-11-02 12:31:59 -08:00
Steve Yegge
4387757369 bd sync: 2025-11-02 12:31:58 2025-11-02 12:31:58 -08:00
Steve Yegge
1c5dc7fc93 bd sync: 2025-11-02 11:17:39 2025-11-02 11:17:40 -08:00
Steve Yegge
f0beba354e bd sync: apply rename detection from import 2025-11-02 10:42:12 -08:00
Steve Yegge
aea486180e Merge branch 'main' of github.com:steveyegge/beads 2025-11-02 10:42:12 -08:00
Steve Yegge
f25e06fb3a bd sync: 2025-11-02 10:42:10 2025-11-02 10:42:10 -08:00
Steve Yegge
b55c62fd06 Add missing runtime import in autoimport.go 2025-11-02 10:04:13 -08:00
Steve Yegge
1036b0b700 Fix TestMetricsSnapshot/uptime flakiness on Windows
Simplify uptime calculation to always enforce minimum of 1 second,
even if time.Since returns exactly 0 (can happen on Windows with
coarse timing). This makes the test deterministic.
2025-11-02 09:56:42 -08:00
Steve Yegge
9f9b8bbdc2 Fix Windows test failures: path handling and bd binary references
- Fix TestFindDatabasePathEnvVar to expect canonicalized absolute paths
- Add getBDCommand() helper for platform-specific bd executable paths
- Update beads_hash_multiclone_test.go to use platform-specific bd paths
- Fix cleanupWALFiles linting error (removed unused error return)
2025-11-02 09:49:39 -08:00
Steve Yegge
361f46346e bd sync: 2025-11-02 09:29:37 2025-11-02 09:29:37 -08:00
Steve Yegge
9003913847 bd sync: 2025-11-02 09:29:15 2025-11-02 09:29:15 -08:00
Steve Yegge
efd68fbfb7 bd sync: 2025-11-02 09:02:35 2025-11-02 09:02:35 -08:00
Steve Yegge
09bd4d3462 Fix CI test failures (bd-1231)
- Always recompute content_hash in importer to avoid stale hashes from JSONL
- Add .gitignore to test repos to prevent database files from being tracked
- Fix daemon auto-import test to use correct RPC operation ('show' not 'get_issue')
- Set last_import_time metadata in test helper to enable staleness check
- Add filesystem settle delay after git pull in tests

Root cause: CloseIssue updates status but not content_hash, so importer
thought issues were unchanged. Always recomputing content_hash fixes this.

Amp-Thread-ID: https://ampcode.com/threads/T-63ef3a7d-8efe-472d-97ed-6ac95bd8318b
Co-authored-by: Amp <amp@ampcode.com>
2025-11-02 08:55:34 -08:00
David Laing
50a324db85 Fix #202: Add dependency_type to bd show --json output (#203)
The JSON output from bd show now includes the dependency_type field
for both dependencies and dependents, enabling programmatic
differentiation between dependency types (blocks, related,
parent-child, discovered-from).

Implementation approach:
- Added IssueWithDependencyMetadata type with embedded Issue and
  DependencyType field
- Extended GetDependenciesWithMetadata and GetDependentsWithMetadata
  to include dependency type from SQL JOIN
- Made GetDependencies and GetDependents wrap the WithMetadata
  methods for backward compatibility
- Added scanIssuesWithDependencyType helper to handle scanning with
  dependency type field
- Updated bd show --json to use WithMetadata methods

Tests added:
- TestGetDependenciesWithMetadata - basic functionality
- TestGetDependentsWithMetadata - dependent retrieval
- TestGetDependenciesWithMetadataEmpty - edge case handling
- TestGetDependenciesWithMetadataMultipleTypes - multiple types

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Happy <yesreply@happy.engineering>
2025-11-02 08:40:10 -08:00
Steve Yegge
2b086951c4 fix: Address all errcheck and misspell linter errors 2025-11-01 23:56:03 -07:00
Steve Yegge
3a5889fc12 bd sync: apply rename detection from import 2025-11-01 23:47:33 -07:00
Steve Yegge
b8c5559359 bd sync: 2025-11-01 23:47:31 2025-11-01 23:47:32 -07:00
Steve Yegge
7032d7d8ec Refactor: separate process/lock/PID concerns into process.go (bd-d33c) 2025-11-01 23:46:01 -07:00
Steve Yegge
9d23805a26 bd sync: apply rename detection from import 2025-11-01 23:37:08 -07:00
Steve Yegge
edf1fba17a bd sync: 2025-11-01 23:37:07 2025-11-01 23:37:08 -07:00
Steve Yegge
784f7bc3bf bd sync: 2025-11-01 23:34:17 2025-11-01 23:34:17 -07:00
Steve Yegge
010525607f bd sync: 2025-11-01 23:33:09 2025-11-01 23:33:09 -07:00
Steve Yegge
ac64f9b18b bd sync: 2025-11-01 23:32:03 2025-11-01 23:32:03 -07:00
Steve Yegge
1578afff24 bd sync: apply rename detection from import 2025-11-01 23:25:56 -07:00
Steve Yegge
9e7a2dfd4e Merge branch 'main' of github.com:steveyegge/beads 2025-11-01 23:25:55 -07:00
Steve Yegge
6ec5fc1273 bd sync: 2025-11-01 23:25:54 2025-11-01 23:25:54 -07:00
Steve Yegge
83f04c9662 bd sync: 2025-11-01 23:25:13 2025-11-01 23:25:13 -07:00
Steve Yegge
88fd7b2bc2 Improve git operations: use --ff-only for pull, make commit idempotent 2025-11-01 23:00:25 -07:00
Steve Yegge
2615c72fc9 Merge remote changes 2025-11-01 22:56:21 -07:00
Steve Yegge
988521d668 bd sync: 2025-11-01 22:56:11 2025-11-01 22:56:11 -07:00
Steve Yegge
9c62d548b6 bd sync: 2025-11-01 22:53:45 2025-11-01 22:53:45 -07:00
Steve Yegge
1849ffe17a test: add comprehensive Comments API tests (bd-d68f)
- Test AddIssueComment basic functionality
- Test GetIssueComments retrieval and ordering
- Test edge cases (empty, nonexistent issues)
- Test dirty flag marking
- Test comment isolation across issues

Improves sqlite package coverage: 69.1% → 70.6%
2025-11-01 22:53:38 -07:00
Steve Yegge
d86f359e63 fix: DetectCycles SQL bug and add comprehensive tests
- Fix SQL query bug preventing cycle detection (bd-9f20)
  - Allow revisiting start node to complete cycle
  - Remove duplicate start_id concatenation in final SELECT
- Add cycle_detection_test.go with comprehensive test coverage (bd-cdf7)
  - Simple 2-node cycles
  - Complex multi-node cycles (4-node, 10-node)
  - Self-loops
  - Multiple independent cycles
  - Acyclic graphs (diamond, chain)
  - Empty graph and single node edge cases
  - Mixed dependency types

Improves sqlite package coverage: 68.2% → 69.1%
2025-11-01 22:51:58 -07:00
Steve Yegge
39b49ca4b6 bd sync: 2025-11-01 22:41:02 2025-11-01 22:41:02 -07:00
Steve Yegge
27940878cf bd sync: apply rename detection from import 2025-11-01 22:39:39 -07:00
Steve Yegge
7a47e4d108 Merge branch 'main' of github.com:steveyegge/beads 2025-11-01 22:39:38 -07:00
Steve Yegge
440d9bf913 bd sync: 2025-11-01 22:39:37 2025-11-01 22:39:37 -07:00
Steve Yegge
123a0faa8b bd sync: 2025-11-01 22:34:01 2025-11-01 22:34:01 -07:00
Steve Yegge
6ef3ba1d49 bd sync: 2025-11-01 22:21:05 2025-11-01 22:21:05 -07:00
Steve Yegge
14f28020c6 Sync databases after daemon race condition fix 2025-11-01 22:20:32 -07:00
Steve Yegge
43ed423575 bd sync: 2025-11-01 22:20:19 2025-11-01 22:20:19 -07:00
Steve Yegge
50edb7349e bd sync: 2025-11-01 22:18:58 2025-11-01 22:18:58 -07:00
Steve Yegge
05b2d2bdbb bd sync: 2025-11-01 22:01:47 2025-11-01 22:01:47 -07:00
Steve Yegge
7c1ff833f4 bd sync: 2025-11-01 22:01:28 2025-11-01 22:01:41 -07:00
Steve Yegge
8cc1bb4e24 bd sync: 2025-11-01 21:49:42 2025-11-01 21:49:42 -07:00
Steve Yegge
839a4877e8 Close bd-5f26: daemon.go refactoring complete 2025-11-01 21:46:50 -07:00