bd export backup chokepoint silently never writes: .beads/backup/ isn't created first nf-a6ep ← Beads

closed priority 2 task unassigned

Twinned from https://github.com/cfsh/ninefold/issues/1125 by tools/beads/import_github.py's reconcile pass.

bd export -o <path> does not create its own parent directory — confirmed live on nf-dev-sg:

``` $ BEADS_DIR=.../.beads bd export -o .../.beads/backup/issues.jsonl Error: failed to create output file: atomicfile: create temp: open .../.beads/backup/.~issues.jsonl.NNN: no such file or directory ```

export_bd_backup() (tools/pr/merge_pr.py, tools/pr/wrap_up.py, design 011 T2, #1088) calls Bd.export(local_backup_path(repo_root)) (.beads/backup/issues.jsonl) without ever mkdir -ping .beads/backup/ first. Non-fatal by design (the whole point of the chokepoint), so it never blocks a merge or wrap-up — but it also means the backup silently never gets written in any worktree where .beads/backup/ was never separately created by hand, which defeats the point of a standing local snapshot.

Fix: local_backup_path(repo_root).parent.mkdir(parents=True, exist_ok=True) before the Bd(...).export(...) call in both chokepoints (or inside Bd.export itself).

Surfaced incidentally while merging #1123 (design 011 Amendment A1) — unrelated to that PRs own content.

Dependencies

None.

Comments

No comments.

Add a comment