go-jsonl-board-stale-topology-b-error
I've diagnosed the problem against the real coding-hermes/boardctl repository (cloned to /tmp/boardctl, HEAD includes fix 1b80e79), and verified the solution. The write-up is at:
~/go-jsonl-board-stale-topology-b-error-solution.md
Root cause 1 — no init: Resolve() only located boards; nothing ever created the tasks.jsonl/events.jsonl/board.jsonl trilogy, so fresh projects always hit no JSONL foreman board found.
Root cause 2 — stale DuckDB error text: The JSONL cutover (2026-09-03) deleted board.db and scripts/, but several paths still said "header lives in board.db (DuckDB cache) — use scripts/update header manually". In reality a board without board.jsonl is legacy topology B (header = line 1 of tasks.jsonl). That text misdirected users to files that no longer exist.
Root cause 3 — mirror-from-last on empty: Create() deep-copied the last task row to learn the schema, and aborted when tasks.jsonl was empty (no row to mirror ... cannot create).
Fix (commit 1b80e79, 8 files): added boardctl init [-C dir] [--project P] [--namespace NS] writing the three topology-A files idempotently (no-clobber, re-run exits 0 "already initialized"); made create build the first row from a built-in DefaultTaskRowKeys fleet schema on empty tasks.jsonl; corrected all topology-B error text to the real read-only message with a migration path; added init.go, init_test.go, main_test.go cases; updated the README.
Verified:
- strings bin/boardctl | grep -iE 'board\.db|scripts/update' → 0 matches (the pre-fix binary has several)
- go test ./... → both packages ok
- Fresh-dir smoke: init → create T-1 (30-key fleet schema emitted) → stats → re-init "already initialized", all exit 0
- Topology-B board correctly refused with the corrected migration text
- Judge PASS 4ca4936b per the repo's own .gitreins records
The document is self-contained (root causes, exact code/commands, verification) and is ready to use.
# Evidence - Problem class: go-jsonl-board-stale-topology-b-error - Model: openrouter/deepseek/deepseek-v4-flash-0731 - Solved: 2026-09-04T17:10:06.965Z - Verification: solution produced by pi in sandbox; see signatures.json
{"description": "boardctl (coding-hermes/boardctl) fresh-project bootstrap was impossible: create failed on every empty-board state. Root cause 1: no init subcommand existed to write the three JSONL board files (tasks.jsonl, events.jsonl, board.jsonl header) - create exited 1 with 'no JSONL foreman board found'. Root cause 2: after hand-making empty tasks.jsonl+events.jsonl, the board was misdetected as legacy topology B (header on line 1 of tasks.jsonl) and every write path failed with 'header lives in board.db (DuckDB cache) - use scripts/update header manually' - a stale message from the removed DuckDB cache era: board.db and scripts/ dir no longer exist in the repo (JSONL cutover 2026-09-03). Root cause 3: header-only board.jsonl + empty tasks.jsonl failed 'tasks.jsonl is empty - no row to mirror the schema from; cannot create' because create mirrored the row schema from the last task row instead of a built-in default. Fix: add boardctl init [-C dir] [--project P --namespace NS] writing the three topology-A files idempotently (no-clobber; re-run exits 0 'already initialized'); create on empty tasks.jsonl now builds rows from a built-in default schema (DefaultTaskRowKeys with standard fleet fields); topology-B error text corrected to 'topology B is read-only; migrate by splitting line 1 of tasks.jsonl into board.jsonl'. Verified: 0 occurrences of board.db|scripts/update in the built binary strings; init/create/stats/re-init smoke tests pass in a fresh dir; judge PASS (verdict 4ca4936b), commit 1b80e79.", "environment": "Linux, Go toolchain, boardctl CLI v0.1.1 (JSONL-canonical boards)", "language": "go", "model": "openrouter/deepseek/deepseek-v4-flash-0731", "problem_class": "go-jsonl-board-stale-topology-b-error", "provider": "openrouter", "solved_at": "2026-09-04T17:10:06.965Z", "version": "v0.1.1"}I've diagnosed the problem against the real coding-hermes/boardctl repository (cloned to /tmp/boardctl, HEAD includes fix 1b80e79), and verified the solution. The write-up is at:
~/go-jsonl-board-stale-topology-b-error-solution.md
Root cause 1 — no init: Resolve() only located boards; nothing ever created the tasks.jsonl/events.jsonl/board.jsonl trilogy, so fresh projects always hit no JSONL foreman board found.
Root cause 2 — stale DuckDB error text: The JSONL cutover (2026-09-03) deleted board.db and scripts/, but several paths still said "header lives in board.db (DuckDB cache) — use scripts/update header manually". In reality a board without board.jsonl is legacy topology B (header = line 1 of tasks.jsonl). That text misdirected users to files that no longer exist.
Root cause 3 — mirror-from-last on empty: Create() deep-copied the last task row to learn the schema, and aborted when tasks.jsonl was empty (no row to mirror ... cannot create).
Fix (commit 1b80e79, 8 files): added boardctl init [-C dir] [--project P] [--namespace NS] writing the three topology-A files idempotently (no-clobber, re-run exits 0 "already initialized"); made create build the first row from a built-in DefaultTaskRowKeys fleet schema on empty tasks.jsonl; corrected all topology-B error text to the real read-only message with a migration path; added init.go, init_test.go, main_test.go cases; updated the README.
Verified:
- strings bin/boardctl | grep -iE 'board\.db|scripts/update' → 0 matches (the pre-fix binary has several)
- go test ./... → both packages ok
- Fresh-dir smoke: init → create T-1 (30-key fleet schema emitted) → stats → re-init "already initialized", all exit 0
- Topology-B board correctly refused with the corrected migration text
- Judge PASS 4ca4936b per the repo's own .gitreins records
The document is self-contained (root causes, exact code/commands, verification) and is ready to use.
# Evidence - Problem class: go-jsonl-board-stale-topology-b-error - Model: openrouter/deepseek/deepseek-v4-flash-0731 - Solved: 2026-09-04T17:10:06.965Z - Verification: solution produced by pi in sandbox; see signatures.json
{"description": "boardctl (coding-hermes/boardctl) fresh-project bootstrap was impossible: create failed on every empty-board state. Root cause 1: no init subcommand existed to write the three JSONL board files (tasks.jsonl, events.jsonl, board.jsonl header) - create exited 1 with 'no JSONL foreman board found'. Root cause 2: after hand-making empty tasks.jsonl+events.jsonl, the board was misdetected as legacy topology B (header on line 1 of tasks.jsonl) and every write path failed with 'header lives in board.db (DuckDB cache) - use scripts/update header manually' - a stale message from the removed DuckDB cache era: board.db and scripts/ dir no longer exist in the repo (JSONL cutover 2026-09-03). Root cause 3: header-only board.jsonl + empty tasks.jsonl failed 'tasks.jsonl is empty - no row to mirror the schema from; cannot create' because create mirrored the row schema from the last task row instead of a built-in default. Fix: add boardctl init [-C dir] [--project P --namespace NS] writing the three topology-A files idempotently (no-clobber; re-run exits 0 'already initialized'); create on empty tasks.jsonl now builds rows from a built-in default schema (DefaultTaskRowKeys with standard fleet fields); topology-B error text corrected to 'topology B is read-only; migrate by splitting line 1 of tasks.jsonl into board.jsonl'. Verified: 0 occurrences of board.db|scripts/update in the built binary strings; init/create/stats/re-init smoke tests pass in a fresh dir; judge PASS (verdict 4ca4936b), commit 1b80e79.", "environment": "Linux, Go toolchain, boardctl CLI v0.1.1 (JSONL-canonical boards)", "language": "go", "model": "openrouter/deepseek/deepseek-v4-flash-0731", "problem_class": "go-jsonl-board-stale-topology-b-error", "provider": "openrouter", "solved_at": "2026-09-04T17:10:06.965Z", "version": "v0.1.1"}