bd sync: 2025-10-30 19:56:03
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
{"id":"bd-24ea0d72","content_hash":"e2d1279edd9a6ea4dae06772350823e069230280cfca6eb69891527caa9b7446","title":"Fix import collision resolution - treats updates as collisions","description":"## Problem\n\nImport with `--resolve-collisions` incorrectly treats normal updates as collisions, creating duplicate issues after routine `git pull`.\n\n## Root Cause\n\nCurrent collision detection:\n```\nif (JSONL.id exists in DB \u0026\u0026 JSONL.content != DB.content) {\n collision = true // WRONG!\n}\n```\n\nThis treats EVERY update as a collision. After `git pull`, JSONL has updated issues (e.g., bd-ef72b864 status changed from open→closed). Import sees this as a \"collision\" and remaps to new ID (bd-d355a07d), creating duplicates.\n\n## What Should Happen\n\n**Normal import (default):** JSONL is source of truth, update database on ID match\n```\nif (JSONL.id exists in DB) {\n if (content_hash matches) { skip }\n else { UPDATE existing issue } // Not a collision!\n}\n```\n\n**Collision resolution (separate mode):** Only for branch merges where two independent actors created same ID with different content\n\n## Solution Architecture\n\n1. Fix default import to UPDATE on ID match (not treat as collision)\n2. Make `--resolve-collisions` a separate mode ONLY for branch merges\n3. Add import validation to detect duplicates before committing\n4. Write comprehensive tests for normal update vs actual collision scenarios\n\nSee ~/src/fred/beads/collision-resolution-failure-analysis.md for full analysis.","status":"open","priority":0,"issue_type":"epic","created_at":"2025-10-29T23:47:37.906532-07:00","updated_at":"2025-10-30T17:05:26.018592-07:00"}
|
||||
{"id":"bd-2752a7a2","content_hash":"6b2a1aedbdbcb30b98d4a8196801953a1eb22204d63e31954ef9ab6020a7a26b","title":"Create cmd/bd/daemon_watcher.go (~150 LOC)","description":"Implement FileWatcher using fsnotify to watch JSONL file and git refs. Handle platform differences (inotify/FSEvents/ReadDirectoryChangesW). Include edge case handling for file rename, event storm, watcher failure.","status":"in_progress","priority":1,"issue_type":"task","created_at":"2025-10-29T23:05:13.887269-07:00","updated_at":"2025-10-30T17:05:26.01686-07:00"}
|
||||
{"id":"bd-29c128e8","content_hash":"b93b210ddad4f38c993d184e2f7c897eb00cb2f9c8183224e27ff54e129bb1f7","title":"Update AGENTS.md with event-driven mode","description":"Document BEADS_DAEMON_MODE env var. Explain opt-in during Phase 1. Add troubleshooting for watcher failures.","status":"closed","priority":2,"issue_type":"task","created_at":"2025-10-28T16:20:02.433145-07:00","updated_at":"2025-10-30T17:05:26.040499-07:00","closed_at":"2025-10-29T15:53:24.019613-07:00"}
|
||||
{"id":"bd-2a01ad","content_hash":"06917036524fd5120f7fd4bee62f35ede1c93ce156172a65f9fb4d5b66286d06","title":"Sort JSONL by ID to reduce git merge conflicts","description":"With hash-based IDs, JSONL order is meaningless. By sorting issues alphabetically by ID during export, we can drastically reduce merge conflicts when multiple clones add issues simultaneously.\n\nCurrent behavior:\n- Issues appended to end of JSONL\n- Every multi-clone create causes merge conflict at EOF\n- Conflicts are trivial but annoying\n\nProposed solution:\n- Sort issues by ID before writing JSONL\n- Clone A adds test-a1b2c3 (early in file)\n- Clone B adds test-z9y8x7 (late in file) \n- Git merges cleanly - no conflict\n\nBenefits:\n- Much lower conflict rate (only when IDs alphabetically adjacent)\n- Deterministic and reproducible\n- Human-readable sorted order\n- Works with existing git merge\n\nImplementation:\n- Update export logic to sort by ID\n- Update import to handle sorted order\n- Update tests\n\nRelated: bd-165 (hash IDs), current multi-clone test failures","status":"open","priority":1,"issue_type":"feature","created_at":"2025-10-30T19:53:09.61787-07:00","updated_at":"2025-10-30T19:53:09.61787-07:00"}
|
||||
{"id":"bd-2a01ad","content_hash":"3dcb5f171ea773fe3368f791a2ef71fbdda047bd8cc03356bde21b74b2b5ba86","title":"Sort JSONL by ID to reduce git merge conflicts","description":"With hash-based IDs, JSONL order is meaningless. By sorting issues alphabetically by ID during export, we can drastically reduce merge conflicts when multiple clones add issues simultaneously.\n\nCurrent behavior:\n- Issues appended to end of JSONL\n- Every multi-clone create causes merge conflict at EOF\n- Conflicts are trivial but annoying\n\nProposed solution:\n- Sort issues by ID before writing JSONL\n- Clone A adds test-a1b2c3 (early in file)\n- Clone B adds test-z9y8x7 (late in file) \n- Git merges cleanly - no conflict\n\nBenefits:\n- Much lower conflict rate (only when IDs alphabetically adjacent)\n- Deterministic and reproducible\n- Human-readable sorted order\n- Works with existing git merge\n\nImplementation:\n- Update export logic to sort by ID\n- Update import to handle sorted order\n- Update tests\n\nRelated: bd-165 (hash IDs), current multi-clone test failures","status":"in_progress","priority":1,"issue_type":"feature","created_at":"2025-10-30T19:53:09.61787-07:00","updated_at":"2025-10-30T19:53:59.025128-07:00"}
|
||||
{"id":"bd-2a491483","content_hash":"d1ffe0d966939abf9449b6157cf9fcf42342b3056bfa65aeffbfa913ff722928","title":"Child test","description":"","status":"closed","priority":2,"issue_type":"task","created_at":"2025-10-30T15:46:47.841563-07:00","updated_at":"2025-10-30T17:05:26.031068-07:00","closed_at":"2025-10-30T15:46:59.618715-07:00"}
|
||||
{"id":"bd-2f388ca7","content_hash":"27498c808874010ee62da58e12434a6ae7c73f4659b2233aaf8dcd59566a907d","title":"Fix TestTwoCloneCollision timeout","description":"","status":"closed","priority":1,"issue_type":"bug","created_at":"2025-10-28T14:11:25.219607-07:00","updated_at":"2025-10-30T17:05:26.03067-07:00","closed_at":"2025-10-28T16:12:26.286611-07:00"}
|
||||
{"id":"bd-317ddbbf","content_hash":"81a74ccf29037e5a780b12540a4059bab98b9a790a5a043a68118fc00a083cda","title":"Add BEADS_DAEMON_MODE flag handling","description":"Add environment variable BEADS_DAEMON_MODE (values: poll, events). Default to 'poll' for Phase 1. Wire into daemon startup to select runEventLoop vs runEventDrivenLoop.","status":"closed","priority":1,"issue_type":"task","created_at":"2025-10-28T16:20:02.433638-07:00","updated_at":"2025-10-30T17:05:26.041122-07:00","closed_at":"2025-10-28T12:31:47.819136-07:00"}
|
||||
|
||||
Reference in New Issue
Block a user