- Update examples/git-hooks README to use 'bd hooks install' instead of non-existent install.sh - Fix post-merge hook error message to not suggest --resolve-collisions flag (removed in v0.20) - Clean up all doc references to --resolve-collisions (flag removed, hash IDs prevent collisions) Fixes #264 (git hooks installer missing) Fixes #262 (misleading error message) Amp-Thread-ID: https://ampcode.com/threads/T-c9f0e4cb-fba2-4db2-a3d5-36dc1892be9d Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
+1
-1
@@ -380,7 +380,7 @@
|
|||||||
{"id":"bd-fkdw","content_hash":"aae326186151d20e26b9b5c34efa43d9261ffd0fe0d6f4de843f951e4c813886","title":"Update bash-agent example with Agent Mail integration","description":"Add Agent Mail integration to examples/bash-agent/agent.sh using curl for HTTP calls.\n\nAcceptance Criteria:\n- Health check function using curl\n- Reserve issue before claiming\n- Send notifications on status change\n- Release on completion\n- Graceful degradation if curl fails\n- No bash errors when Agent Mail unavailable\n\nFile: examples/bash-agent/agent.sh","status":"closed","priority":2,"issue_type":"feature","created_at":"2025-11-07T22:42:28.722048-08:00","updated_at":"2025-11-08T01:51:40.350436-08:00","closed_at":"2025-11-08T01:09:25.900138-08:00","source_repo":".","dependencies":[{"issue_id":"bd-fkdw","depends_on_id":"bd-m9th","type":"blocks","created_at":"2025-11-07T23:04:01.398259-08:00","created_by":"daemon"}]}
|
{"id":"bd-fkdw","content_hash":"aae326186151d20e26b9b5c34efa43d9261ffd0fe0d6f4de843f951e4c813886","title":"Update bash-agent example with Agent Mail integration","description":"Add Agent Mail integration to examples/bash-agent/agent.sh using curl for HTTP calls.\n\nAcceptance Criteria:\n- Health check function using curl\n- Reserve issue before claiming\n- Send notifications on status change\n- Release on completion\n- Graceful degradation if curl fails\n- No bash errors when Agent Mail unavailable\n\nFile: examples/bash-agent/agent.sh","status":"closed","priority":2,"issue_type":"feature","created_at":"2025-11-07T22:42:28.722048-08:00","updated_at":"2025-11-08T01:51:40.350436-08:00","closed_at":"2025-11-08T01:09:25.900138-08:00","source_repo":".","dependencies":[{"issue_id":"bd-fkdw","depends_on_id":"bd-m9th","type":"blocks","created_at":"2025-11-07T23:04:01.398259-08:00","created_by":"daemon"}]}
|
||||||
{"id":"bd-fsb1","content_hash":"a519fdd6d0ca6f70a177c2cb9441994b28d4bc2fe51a663532d4067caf126049","title":"Test issue","description":"","status":"closed","priority":1,"issue_type":"task","created_at":"2025-11-05T11:21:51.383077-08:00","updated_at":"2025-11-05T11:21:56.888913-08:00","closed_at":"2025-11-05T11:21:56.888913-08:00","source_repo":".","labels":["test","urgent"]}
|
{"id":"bd-fsb1","content_hash":"a519fdd6d0ca6f70a177c2cb9441994b28d4bc2fe51a663532d4067caf126049","title":"Test issue","description":"","status":"closed","priority":1,"issue_type":"task","created_at":"2025-11-05T11:21:51.383077-08:00","updated_at":"2025-11-05T11:21:56.888913-08:00","closed_at":"2025-11-05T11:21:56.888913-08:00","source_repo":".","labels":["test","urgent"]}
|
||||||
{"id":"bd-fzbg","content_hash":"4bf5f57a0a66a94d76882e337c25d49e807ec79257a0aeb636fb81d963493860","title":"Update python-agent example with Agent Mail integration","description":"Modify examples/python-agent/agent.py to use Agent Mail adapter at 4 integration points.\n\nAcceptance Criteria:\n- Import and initialize adapter\n- Check inbox before find_ready_work()\n- Reserve issue before claim_task()\n- Notify on status changes\n- Release reservation on complete_task()\n- Works identically when Agent Mail disabled\n- No changes required to core Beads CLI\n\nFile: examples/python-agent/agent.py","status":"closed","priority":1,"issue_type":"feature","created_at":"2025-11-07T22:42:28.661337-08:00","updated_at":"2025-11-08T01:51:40.350671-08:00","closed_at":"2025-11-08T00:20:35.213902-08:00","source_repo":".","dependencies":[{"issue_id":"bd-fzbg","depends_on_id":"bd-m9th","type":"blocks","created_at":"2025-11-07T23:04:01.315332-08:00","created_by":"daemon"}]}
|
{"id":"bd-fzbg","content_hash":"4bf5f57a0a66a94d76882e337c25d49e807ec79257a0aeb636fb81d963493860","title":"Update python-agent example with Agent Mail integration","description":"Modify examples/python-agent/agent.py to use Agent Mail adapter at 4 integration points.\n\nAcceptance Criteria:\n- Import and initialize adapter\n- Check inbox before find_ready_work()\n- Reserve issue before claim_task()\n- Notify on status changes\n- Release reservation on complete_task()\n- Works identically when Agent Mail disabled\n- No changes required to core Beads CLI\n\nFile: examples/python-agent/agent.py","status":"closed","priority":1,"issue_type":"feature","created_at":"2025-11-07T22:42:28.661337-08:00","updated_at":"2025-11-08T01:51:40.350671-08:00","closed_at":"2025-11-08T00:20:35.213902-08:00","source_repo":".","dependencies":[{"issue_id":"bd-fzbg","depends_on_id":"bd-m9th","type":"blocks","created_at":"2025-11-07T23:04:01.315332-08:00","created_by":"daemon"}]}
|
||||||
{"id":"bd-g3ey","content_hash":"3697da150785d4c99e125485efcf50dad02ccf01f93d3cc1a2944f652048f7ae","title":"bd sync --import-only doesn't update DB mtime causing bd doctor false warning","description":"","status":"open","priority":1,"issue_type":"bug","created_at":"2025-11-08T15:18:16.761052+01:00","updated_at":"2025-11-08T15:18:16.761052+01:00","source_repo":"."}
|
{"id":"bd-g3ey","content_hash":"3697da150785d4c99e125485efcf50dad02ccf01f93d3cc1a2944f652048f7ae","title":"bd sync --import-only doesn't update DB mtime causing bd doctor false warning","description":"","status":"closed","priority":1,"issue_type":"bug","created_at":"2025-11-08T15:18:16.761052+01:00","updated_at":"2025-11-08T13:12:01.718252-08:00","closed_at":"2025-11-08T13:12:01.718252-08:00","source_repo":"."}
|
||||||
{"id":"bd-gart","content_hash":"c4b3d68ec7d85a26e9c23ef529e4479b4741eade511d17f8f3602d412b0b3f0a","title":"Debug test 2","description":"","status":"closed","priority":3,"issue_type":"task","created_at":"2025-11-08T00:04:35.317835-08:00","updated_at":"2025-11-08T00:06:46.18875-08:00","closed_at":"2025-11-08T00:06:46.18875-08:00","source_repo":"."}
|
{"id":"bd-gart","content_hash":"c4b3d68ec7d85a26e9c23ef529e4479b4741eade511d17f8f3602d412b0b3f0a","title":"Debug test 2","description":"","status":"closed","priority":3,"issue_type":"task","created_at":"2025-11-08T00:04:35.317835-08:00","updated_at":"2025-11-08T00:06:46.18875-08:00","closed_at":"2025-11-08T00:06:46.18875-08:00","source_repo":"."}
|
||||||
{"id":"bd-gdzd","content_hash":"54a68b8b4c63fd88b33dbf8239de070a3c95f97d4a0aa5f64e694ff1384199b3","title":"Import fails on same-content-different-ID instead of treating as update","description":"## Problem\n\nThe importer still has rename detection (importer.go:482-500) that triggers when same content hash has different IDs. With hash IDs, this shouldn't happen, but when it does (test data, bugs, legacy data), the import fails:\n\n```\nfailed to handle rename bd-ce75 -\u003e bd-5a90: rename collision handling removed - should not occur with hash IDs\n```\n\n## Current Behavior\n\n1. Importer finds same content hash with different IDs\n2. Calls handleRename() (line 490)\n3. handleRename() errors out (line 294): \"rename collision handling removed\"\n4. Import fails\n\n## Expected Behavior\n\nSame content hash + different IDs should be treated as an **update**, not a rename:\n- Keep existing ID (already in database)\n- Update fields if incoming has newer timestamp\n- Discard incoming ID (it's wrong - hash should have generated same ID)\n\n## Impact\n\n- Import fails on legitimate edge cases (test data, data corruption)\n- Cryptic error message\n- Blocks sync operations\n\n## Fix\n\nIn handleRename() or import loop, instead of erroring:\n```go\n// Same content, different ID - treat as update\nif incoming.UpdatedAt.After(existing.UpdatedAt) {\n existing.Status = incoming.Status\n // ... copy other fields\n s.UpdateIssue(ctx, existing)\n}\nresult.Updated++\n```\n\n## Files\n- internal/importer/importer.go:271-294 (handleRename)\n- internal/importer/importer.go:482-500 (rename detection)\n\n## Repro\nImport JSONL with bd-ce75 and bd-5a90 (both \"Test parent issue\" but different content hashes).","status":"closed","priority":0,"issue_type":"bug","created_at":"2025-11-05T00:27:51.150233-08:00","updated_at":"2025-11-05T01:02:54.469971-08:00","closed_at":"2025-11-05T01:02:54.469979-08:00","source_repo":"."}
|
{"id":"bd-gdzd","content_hash":"54a68b8b4c63fd88b33dbf8239de070a3c95f97d4a0aa5f64e694ff1384199b3","title":"Import fails on same-content-different-ID instead of treating as update","description":"## Problem\n\nThe importer still has rename detection (importer.go:482-500) that triggers when same content hash has different IDs. With hash IDs, this shouldn't happen, but when it does (test data, bugs, legacy data), the import fails:\n\n```\nfailed to handle rename bd-ce75 -\u003e bd-5a90: rename collision handling removed - should not occur with hash IDs\n```\n\n## Current Behavior\n\n1. Importer finds same content hash with different IDs\n2. Calls handleRename() (line 490)\n3. handleRename() errors out (line 294): \"rename collision handling removed\"\n4. Import fails\n\n## Expected Behavior\n\nSame content hash + different IDs should be treated as an **update**, not a rename:\n- Keep existing ID (already in database)\n- Update fields if incoming has newer timestamp\n- Discard incoming ID (it's wrong - hash should have generated same ID)\n\n## Impact\n\n- Import fails on legitimate edge cases (test data, data corruption)\n- Cryptic error message\n- Blocks sync operations\n\n## Fix\n\nIn handleRename() or import loop, instead of erroring:\n```go\n// Same content, different ID - treat as update\nif incoming.UpdatedAt.After(existing.UpdatedAt) {\n existing.Status = incoming.Status\n // ... copy other fields\n s.UpdateIssue(ctx, existing)\n}\nresult.Updated++\n```\n\n## Files\n- internal/importer/importer.go:271-294 (handleRename)\n- internal/importer/importer.go:482-500 (rename detection)\n\n## Repro\nImport JSONL with bd-ce75 and bd-5a90 (both \"Test parent issue\" but different content hashes).","status":"closed","priority":0,"issue_type":"bug","created_at":"2025-11-05T00:27:51.150233-08:00","updated_at":"2025-11-05T01:02:54.469971-08:00","closed_at":"2025-11-05T01:02:54.469979-08:00","source_repo":"."}
|
||||||
{"id":"bd-ggbc","content_hash":"bfb238f72474f25fcf132603ae45e6c97c7c1e60ad865062bff75f32f54a9135","title":"Update documentation for merge driver auto-config","description":"Update documentation to reflect the new merge driver auto-configuration during `bd init`.\n\n**Files to update:**\n- README.md - Mention merge driver setup in initialization section\n- AGENTS.md - Update onboarding section about merge driver\n- Possibly QUICKSTART.md\n\n**Content:**\n- Explain what the merge driver does\n- Show --skip-merge-driver flag usage\n- Manual installation steps for post-init setup","status":"closed","priority":2,"issue_type":"task","created_at":"2025-11-05T19:27:04.155662-08:00","updated_at":"2025-11-05T19:29:55.188122-08:00","closed_at":"2025-11-05T19:29:55.188122-08:00","source_repo":".","dependencies":[{"issue_id":"bd-ggbc","depends_on_id":"bd-32nm","type":"discovered-from","created_at":"2025-11-05T19:27:04.156491-08:00","created_by":"daemon"}]}
|
{"id":"bd-ggbc","content_hash":"bfb238f72474f25fcf132603ae45e6c97c7c1e60ad865062bff75f32f54a9135","title":"Update documentation for merge driver auto-config","description":"Update documentation to reflect the new merge driver auto-configuration during `bd init`.\n\n**Files to update:**\n- README.md - Mention merge driver setup in initialization section\n- AGENTS.md - Update onboarding section about merge driver\n- Possibly QUICKSTART.md\n\n**Content:**\n- Explain what the merge driver does\n- Show --skip-merge-driver flag usage\n- Manual installation steps for post-init setup","status":"closed","priority":2,"issue_type":"task","created_at":"2025-11-05T19:27:04.155662-08:00","updated_at":"2025-11-05T19:29:55.188122-08:00","closed_at":"2025-11-05T19:29:55.188122-08:00","source_repo":".","dependencies":[{"issue_id":"bd-ggbc","depends_on_id":"bd-32nm","type":"discovered-from","created_at":"2025-11-05T19:27:04.156491-08:00","created_by":"daemon"}]}
|
||||||
|
|||||||
+2
-2
@@ -699,7 +699,7 @@ fi
|
|||||||
# Import the updated JSONL
|
# Import the updated JSONL
|
||||||
if ! bd import -i .beads/issues.jsonl >/dev/null 2>&1; then
|
if ! bd import -i .beads/issues.jsonl >/dev/null 2>&1; then
|
||||||
echo "Warning: Failed to import bd changes after merge" >&2
|
echo "Warning: Failed to import bd changes after merge" >&2
|
||||||
echo "Run 'bd import -i .beads/issues.jsonl' manually" >&2
|
echo "Run 'bd import -i .beads/issues.jsonl' manually to see the error" >&2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
@@ -734,7 +734,7 @@ fi
|
|||||||
# to ensure immediate sync after merge
|
# to ensure immediate sync after merge
|
||||||
if ! bd import -i .beads/issues.jsonl >/dev/null 2>&1; then
|
if ! bd import -i .beads/issues.jsonl >/dev/null 2>&1; then
|
||||||
echo "Warning: Failed to import bd changes after merge" >&2
|
echo "Warning: Failed to import bd changes after merge" >&2
|
||||||
echo "Run 'bd import -i .beads/issues.jsonl' manually" >&2
|
echo "Run 'bd import -i .beads/issues.jsonl' manually to see the error" >&2
|
||||||
# Don't fail the merge, just warn
|
# Don't fail the merge, just warn
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -73,7 +73,7 @@ bd duplicates --auto-merge
|
|||||||
bd duplicates --dry-run
|
bd duplicates --dry-run
|
||||||
|
|
||||||
# Detect duplicates during import
|
# Detect duplicates during import
|
||||||
bd import -i issues.jsonl --resolve-collisions --dedupe-after
|
bd import -i issues.jsonl --dedupe-after
|
||||||
```
|
```
|
||||||
|
|
||||||
**How it works:**
|
**How it works:**
|
||||||
|
|||||||
+1
-1
@@ -44,7 +44,7 @@ Remote JSONL (shared across machines)
|
|||||||
|
|
||||||
- **Write path**: CLI → SQLite → JSONL export → git commit
|
- **Write path**: CLI → SQLite → JSONL export → git commit
|
||||||
- **Read path**: git pull → JSONL import → SQLite → CLI
|
- **Read path**: git pull → JSONL import → SQLite → CLI
|
||||||
- **Collision handling**: `bd import --resolve-collisions` (see AGENTS.md)
|
- **Hash-based IDs**: Automatic collision prevention (v0.20+)
|
||||||
|
|
||||||
Core implementation:
|
Core implementation:
|
||||||
- Export: `cmd/bd/export.go`, `cmd/bd/autoflush.go`
|
- Export: `cmd/bd/export.go`, `cmd/bd/autoflush.go`
|
||||||
|
|||||||
+2
-2
@@ -23,7 +23,7 @@ GitHub Issues + gh CLI can approximate some features, but fundamentally cannot r
|
|||||||
- GH: No built-in "ready" concept; would require custom GraphQL + sync service + ongoing maintenance
|
- GH: No built-in "ready" concept; would require custom GraphQL + sync service + ongoing maintenance
|
||||||
|
|
||||||
3. **Git-First, Offline, Branch-Scoped Task Memory**
|
3. **Git-First, Offline, Branch-Scoped Task Memory**
|
||||||
- bd: Works offline, issues live on branches, mergeable with code via `bd import --resolve-collisions`
|
- bd: Works offline, issues live on branches, hash IDs prevent collisions on merge
|
||||||
- GH: Cloud-first, requires network/auth, global per-repo, no branch-scoped task state
|
- GH: Cloud-first, requires network/auth, global per-repo, no branch-scoped task state
|
||||||
|
|
||||||
4. **AI-Resolvable Conflicts & Duplicate Merge**
|
4. **AI-Resolvable Conflicts & Duplicate Merge**
|
||||||
@@ -439,7 +439,7 @@ The hash/fingerprint/collision architecture prevents:
|
|||||||
- **Wrong prefix bugs**: Issues created with incorrect prefix due to config mismatch
|
- **Wrong prefix bugs**: Issues created with incorrect prefix due to config mismatch
|
||||||
- **Merge conflicts**: Branch divergence creating conflicting JSONL content
|
- **Merge conflicts**: Branch divergence creating conflicting JSONL content
|
||||||
|
|
||||||
**Solution**: `bd import --resolve-collisions` automatically remaps colliding IDs and updates all references.
|
**Solution**: Hash-based IDs (v0.20+) eliminate collisions. Different issues automatically get different IDs.
|
||||||
|
|
||||||
**2. Physical SQLite Corruption**
|
**2. Physical SQLite Corruption**
|
||||||
|
|
||||||
|
|||||||
@@ -141,7 +141,7 @@ For **logical consistency issues** (ID collisions from branch merges, parallel w
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# This is NOT corruption - use collision resolution instead
|
# This is NOT corruption - use collision resolution instead
|
||||||
bd import -i .beads/issues.jsonl --resolve-collisions
|
bd import -i .beads/issues.jsonl
|
||||||
```
|
```
|
||||||
|
|
||||||
See [FAQ](FAQ.md#whats-the-difference-between-sqlite-corruption-and-id-collisions) for the distinction.
|
See [FAQ](FAQ.md#whats-the-difference-between-sqlite-corruption-and-id-collisions) for the distinction.
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ Complete command reference for bd (beads) CLI tool. All commands support `--json
|
|||||||
| `bd stats` | Get project statistics | `--json` |
|
| `bd stats` | Get project statistics | `--json` |
|
||||||
| `bd blocked` | Find blocked issues | `--json` |
|
| `bd blocked` | Find blocked issues | `--json` |
|
||||||
| `bd export` | Export issues to JSONL | `--json` |
|
| `bd export` | Export issues to JSONL | `--json` |
|
||||||
| `bd import` | Import issues from JSONL | `--resolve-collisions` |
|
| `bd import` | Import issues from JSONL | `--dedupe-after`, `--dry-run` |
|
||||||
| `bd init` | Initialize bd in directory | `--prefix` |
|
| `bd init` | Initialize bd in directory | `--prefix` |
|
||||||
| `bd quickstart` | Show quick start guide | (no flags) |
|
| `bd quickstart` | Show quick start guide | (no flags) |
|
||||||
|
|
||||||
|
|||||||
@@ -30,13 +30,13 @@ These git hooks ensure bd changes are always synchronized with your commits and
|
|||||||
|
|
||||||
### Quick Install (Recommended)
|
### Quick Install (Recommended)
|
||||||
|
|
||||||
From your repository root:
|
Use `bd hooks install` to install hooks automatically:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./examples/git-hooks/install.sh
|
bd hooks install
|
||||||
```
|
```
|
||||||
|
|
||||||
Or use `bd init --quiet` to install hooks automatically.
|
Alternatively, use `bd init --quiet` which installs hooks during initialization.
|
||||||
|
|
||||||
**Hook Chaining (New in v0.23):** If you already have git hooks installed (e.g., pre-commit framework), bd will:
|
**Hook Chaining (New in v0.23):** If you already have git hooks installed (e.g., pre-commit framework), bd will:
|
||||||
- Detect existing hooks
|
- Detect existing hooks
|
||||||
|
|||||||
Reference in New Issue
Block a user