Commit Graph

471 Commits

Author SHA1 Message Date
Steve Yegge
d685da41e9 bd sync: 2025-10-28 18:09:16 2025-10-28 18:09:16 -07:00
Steve Yegge
bbea17ae51 Fix TestTwoCloneCollision to compare content not timestamps (bd-91)
The test was comparing full JSON output including timestamps, causing
false negative failures. The 2-clone collision resolution actually works
correctly - both clones converge to identical semantic content.

Changes:
- Added compareIssuesIgnoringTimestamps helper to compare issue content
- Compares ID, title, description, status, priority, type (not timestamps)
- Added filterTrackedChanges to ignore untracked files in git status
- Test now passes, proving collision resolution works for 2-clone case

Closes bd-91

Amp-Thread-ID: https://ampcode.com/threads/T-a58284d2-f39f-482a-9db0-bec31c19e9e5
Co-authored-by: Amp <amp@ampcode.com>
2025-10-28 18:03:17 -07:00
Steve Yegge
a687b395a4 Update bd-86 with progress on rename detection 2025-10-28 17:20:44 -07:00
Steve Yegge
ceb1b922a9 bd sync: 2025-10-28 17:19:28 2025-10-28 17:19:28 -07:00
Steve Yegge
2e87329cf8 WIP: Implement content-hash based collision resolution (bd-89)
- Replace timestamp-based collision scoring with deterministic content hashing
- Add hashIssueContent() using SHA-256 of all substantive fields
- Modify ScoreCollisions to compare hashes and set RemapIncoming flag
- Update RemapCollisions to handle both directions (remap incoming OR existing)
- Add CollisionDetail.RemapIncoming field to control which version gets remapped
- Add unit tests for hash function and deterministic collision resolution

Status: Hash-based resolution works correctly, but TestTwoCloneCollision still
fails due to missing rename detection. After Clone B resolves collision,
Clone A needs to recognize its issue was remapped to a different ID.

Next: Add content-based rename detection during import to prevent
re-resolving already-resolved collisions.

Progress on bd-86.

Amp-Thread-ID: https://ampcode.com/threads/T-b19b49e8-b52a-463d-b052-8a526a500260
Co-authored-by: Amp <amp@ampcode.com>
2025-10-28 17:11:40 -07:00
Steve Yegge
c5e7ad8d71 Add bd-86: Epic for making two-clone workflow work 2025-10-28 16:57:04 -07:00
Steve Yegge
b19c24ac55 bd sync: 2025-10-28 16:30:54 2025-10-28 16:30:54 -07:00
Steve Yegge
923c48d5f6 bd sync: 2025-10-28 16:28:58 2025-10-28 16:28:58 -07:00
Steve Yegge
d5ab6c8fa0 bd sync: merge duplicates 2025-10-28 16:26:12 -07:00
Steve Yegge
7d575a0267 bd sync: 2025-10-28 16:23:40 2025-10-28 16:23:40 -07:00
Steve Yegge
9af5f6b997 bd sync: 2025-10-28 16:21:41 2025-10-28 16:21:41 -07:00
Steve Yegge
92efd45460 bd sync: 2025-10-28 16:18:45 2025-10-28 16:18:45 -07:00
Steve Yegge
3841e6c0cf bd sync: 2025-10-28 14:48:33 2025-10-28 14:48:33 -07:00
Steve Yegge
7d366461a5 bd sync: 2025-10-28 14:22:11 2025-10-28 14:22:11 -07:00
Steve Yegge
7985214e25 bd sync: 2025-10-28 14:21:23 2025-10-28 14:21:25 -07:00
Steve Yegge
ee4bd834f0 bd sync: 2025-10-28 14:19:39 2025-10-28 14:20:04 -07:00
Steve Yegge
97c676077d bd sync: 2025-10-28 12:31:47 2025-10-28 12:31:47 -07:00
Steve Yegge
96fb7ed29c bd sync: 2025-10-28 12:03:57 2025-10-28 12:03:57 -07:00
Steve Yegge
d52851f452 bd sync: 2025-10-28 10:49:53 2025-10-28 10:49:53 -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
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
4d67939c2c bd sync: 2025-10-27 23:05:06 2025-10-27 23:05:06 -07:00
Steve Yegge
e39341a6b3 bd sync: 2025-10-27 23:02:43 2025-10-27 23:02:43 -07:00
Steve Yegge
9e062b97c8 bd sync: 2025-10-27 22:56:29 2025-10-27 22:56:29 -07:00
Steve Yegge
af0582ae5d bd sync: 2025-10-27 22:26:46 2025-10-27 22:26:46 -07:00
Steve Yegge
393e57302d bd sync: 2025-10-27 22:26:40 2025-10-27 22:26:40 -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
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
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