011 T8-import: real one-shot import of all open GitHub issues into bd (import only, not flip/turndown) nf-s4h ← Beads

closed priority 2 task 011-t8import activesession:011-t8import

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

Session: TBD

Carved out from T8 (#1042) per Aedan's direction (2026-08-19): land the import half first, with checks, before touching the flip or turndown. Follows #1151 (twin-body fix, merged) landing.

Context

T8a (#1140/#1151, merged) built tools/beads/import_github.py's reconcile() — but that function is scoped to one bd epic at a time, matching a design doc's own <doc-id> T<n>: <title> task-title convention (what it was built and tested against: design 011's own epic nf-tvc).

T8's actual scope (per design_docs/011-task-tracking-on-beads.md's T8 card) is bigger: import every open GitHub issue repo-wide (~250, unrelated to any design doc) as standalone bd tasks — no epic parent, external_ref gh-<n>, labels carried verbatim (session:*/active/needs:direction/meta/priority:next), assignee+claim state parsed from the latest CLAIM marker where one exists. Idempotent by external_ref — re-running updates rather than duplicates. Closed GitHub issues are not imported (996 all-time stay archived).

This is genuinely new work, not just invoking the existing script — build a repo-wide mode (new function or main() mode that doesn't require --epic-id), reusing what's reusable from the existing module (_fetch_gh_issue, _twin_body, label mirroring). For the CLAIM-marker parsing, reuse sessions.py's existing full-text extraction logic — don't reinvent it.

Scope (this issue) — import only

- The repo-wide import capability itself. - Explicitly NOT included: flipping /triage//spec/poll.py's authoritative source to bd, or the closing-pointer-comment turndown sweep on GitHub issues. Those are a separate follow-up chunk (the rest of #1042), assigned only after Aedan inspects the imported data.

Checks (Aedan's ask, applying DEV_PRINCIPLES — do these, in order)

1. A2 (blast radius) — this writes bd tasks for the whole tracker. --dry-run first; paste the plan/summary on this issue before running for real. 2. E8 (main must always work) — an explicit bd export snapshot of the shared workspace immediately before the real --apply run, as a rollback point. 3. Run --apply for real. Paste real before/after counts on this issue: total open GitHub issues, how many already had a bd twin (from prior design-doc epics), how many newly created. 4. Idempotency proof — run it a second time against unchanged state; paste the output showing it's a true no-op, not just re-runnable. 5. D2 (fail noisily) — confirm no issue is silently skipped; if any listing/pagination ceiling could apply at real repo scale, either verify it doesn't truncate silently or make it loud.

Files

tools/beads/import_github.py (extended), its tests, real output pasted on this issue per the checks above.

Real dependency: #1151 (twin-body fix), merged.

Dependencies

None.

Comments

No comments.

Add a comment