From 40ab349c0a258a1a572bdfbee4a42d4c03e27233 Mon Sep 17 00:00:00 2001 From: Steve Yegge Date: Sun, 30 Nov 2025 21:31:13 -0800 Subject: [PATCH] bd sync: 2025-11-30 21:31:13 --- .beads/issues.jsonl | 2 +- .beads/metadata.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.beads/issues.jsonl b/.beads/issues.jsonl index 2c1e5961..78e1158f 100644 --- a/.beads/issues.jsonl +++ b/.beads/issues.jsonl @@ -75,7 +75,7 @@ {"id":"bd-qvj","title":"Jira import/export integration","description":"Add ability to import issues from Jira and export beads issues to Jira. See GitHub discussion #430 for user request.\n\n**Background**: User @kaihendry configured jira.* settings but found bd sync doesn't sync with Jira - only with git. The config namespace exists but the integration doesn't.\n\n**Existing infrastructure**:\n- external_ref field for linking to external systems\n- Import logic matches by external_ref first (priority over ID matching)\n- Config namespace jira.* documented in CONFIG.md\n- GitHub import example (examples/github-import/gh2jsonl.py) provides pattern\n\n**Schema mapping challenges**:\n- Jira workflows are highly customizable (status mapping)\n- Jira has more field types (components, versions, custom fields)\n- Two-way sync needs conflict resolution\n- Jira Cloud vs Server/Data Center have different APIs\n\n**Approach**: Phased implementation starting with import, then export, then bidirectional sync.","status":"open","priority":2,"issue_type":"epic","created_at":"2025-11-30T12:55:44.835009-08:00","updated_at":"2025-11-30T12:55:44.835009-08:00"} {"id":"bd-s0z","title":"Consider extracting error handling helpers","description":"Evaluate creating FatalError() and WarnError() helpers as suggested in ERROR_HANDLING.md to reduce boilerplate and enforce consistency. Prototype in a few files first to validate the approach.","status":"closed","priority":4,"issue_type":"task","created_at":"2025-11-24T00:28:57.248959-08:00","updated_at":"2025-11-29T22:06:06.332176-08:00","closed_at":"2025-11-28T23:28:00.886536-08:00"} {"id":"bd-t3b","title":"Add test coverage for internal/config package","description":"","status":"closed","priority":2,"issue_type":"task","created_at":"2025-11-20T21:21:22.91657-05:00","updated_at":"2025-11-28T22:17:12.609614-08:00","closed_at":"2025-11-28T21:54:15.009889-08:00","dependencies":[{"issue_id":"bd-t3b","depends_on_id":"bd-ge7","type":"blocks","created_at":"2025-11-20T21:21:31.201036-05:00","created_by":"daemon"}]} -{"id":"bd-t5m","title":"CRITICAL: git-history-backfill purges entire database when JSONL reset","description":"When a clone gets reset (git reset --hard origin/main), the git-history-backfill logic incorrectly adds ALL issues to the deletions manifest, then sync purges the entire database.\\n\\nFix adds safety guard: never delete more than 50% of issues via git-history-backfill. If threshold exceeded, abort with warning message.","status":"closed","priority":0,"issue_type":"bug","created_at":"2025-11-30T21:24:47.397394-08:00","updated_at":"2025-11-30T21:24:52.710971-08:00","closed_at":"2025-11-30T21:24:52.710971-08:00","close_reason":"Fixed: Added safety guard to git-history-backfill that aborts if \u003e50% of issues would be deleted. Also warns when \u003e10 issues would be deleted. Added test TestMassDeletionSafetyGuard."} +{"id":"bd-t5m","title":"CRITICAL: git-history-backfill purges entire database when JSONL reset","description":"When a clone gets reset (git reset --hard origin/main), the git-history-backfill logic incorrectly adds ALL issues to the deletions manifest, then sync purges the entire database.\\n\\nFix adds safety guard: never delete more than 50% of issues via git-history-backfill. If threshold exceeded, abort with warning message.","status":"closed","priority":0,"issue_type":"bug","created_at":"2025-11-30T21:24:47.397394-08:00","updated_at":"2025-11-30T21:24:52.710971-08:00","closed_at":"2025-11-30T21:24:52.710971-08:00"} {"id":"bd-tjn","title":"Jira import script (jira2jsonl.py)","description":"Create a Python script to import Jira issues into beads JSONL format.\n\n**Pattern**: Follow examples/github-import/gh2jsonl.py\n\n**Features needed**:\n- Fetch issues via Jira REST API with JQL queries\n- Pagination handling (100 issues per request)\n- Map Jira fields to beads fields (see schema mapping in epic)\n- Set external_ref to Jira issue URL for re-sync\n- Support both Jira Cloud and Server/Data Center APIs\n- Read config from bd config (jira.url, jira.project, jira.api_token)\n\n**Config-driven mapping**:\n- jira.status_map.* for status conversion\n- jira.type_map.* for issue type conversion\n- jira.priority_map.* for priority conversion\n\n**Usage**:\n```bash\npython jira2jsonl.py --project PROJ | bd import\n# or\npython jira2jsonl.py --jql 'project=PROJ AND status\\!=Done' | bd import\n```\n\n**Output**: JSONL with external_ref set to Jira issue URL","status":"closed","priority":2,"issue_type":"feature","created_at":"2025-11-30T12:55:59.517985-08:00","updated_at":"2025-11-30T15:11:56.692594-08:00","closed_at":"2025-11-30T15:11:56.692594-08:00","dependencies":[{"issue_id":"bd-tjn","depends_on_id":"bd-qvj","type":"parent-child","created_at":"2025-11-30T12:56:39.507643-08:00","created_by":"stevey"}]} {"id":"bd-tne","title":"Add Claude setup tip with dynamic priority","description":"Add a predefined tip that suggests running `bd setup claude` when Claude Code is detected but not configured. This tip should have higher priority (shown more frequently) until the setup is complete.","status":"closed","priority":2,"issue_type":"task","created_at":"2025-11-11T23:29:29.871324-08:00","updated_at":"2025-11-25T17:52:35.044989-08:00","closed_at":"2025-11-25T17:52:35.044989-08:00","dependencies":[{"issue_id":"bd-tne","depends_on_id":"bd-d4i","type":"blocks","created_at":"2025-11-11T23:29:29.872081-08:00","created_by":"daemon"}]} {"id":"bd-tqo","title":"deletions.jsonl gets corrupted with full issue objects instead of deletion records","description":"## Bug Description\n\nThe deletions.jsonl file was found to contain full issue objects (like issues.jsonl) instead of deletion records.\n\n### Expected Format (DeletionRecord)\n```json\n{\"id\":\"bd-xxx\",\"timestamp\":\"2025-...\",\"actor\":\"user\",\"reason\":\"deleted\"}\n```\n\n### Actual Content Found\n```json\n{\"id\":\"bd-03r\",\"title\":\"Document deletions manifest...\",\"description\":\"...\",\"status\":\"closed\",...}\n```\n\n## Impact\n- bd sync sanitization step reads deletions.jsonl and removes any matching IDs from issues.jsonl\n- With 60 full issue objects in deletions.jsonl, ALL 60 issues were incorrectly removed during sync\n- This caused complete data loss of the issue database\n\n## Root Cause (suspected)\nSomething wrote issues.jsonl content to deletions.jsonl. Possible causes:\n- Export writing to wrong file\n- File path confusion during sync\n- Race condition between export and deletion tracking\n\n## Related Issues\n- bd-0b2: --no-git-history flag (just fixed)\n- bd-4pv: export outputs only 1 issue after corruption \n- bd-4t7: auto-import runs during --no-auto-import\n\n## Reproduction\nUnknown - discovered during bd sync session on 2025-11-26\n\n## Fix\nNeed to investigate what code path could write issue objects to deletions.jsonl","status":"closed","priority":1,"issue_type":"bug","created_at":"2025-11-26T23:17:01.938931-08:00","updated_at":"2025-11-26T23:25:21.445143-08:00","closed_at":"2025-11-26T23:25:02.209911-08:00"} diff --git a/.beads/metadata.json b/.beads/metadata.json index 3749e87a..62b4fb1a 100644 --- a/.beads/metadata.json +++ b/.beads/metadata.json @@ -1,5 +1,5 @@ { "database": "beads.db", "jsonl_export": "issues.jsonl", - "last_bd_version": "0.27.1" + "last_bd_version": "0.27.0" } \ No newline at end of file