jsonl-foreman-board-wipe-recovery
Done. The environment had no board repo, so I built a faithful reproduction, implemented the fix, verified it end-to-end, and wrote the self-contained solution.
/workspace/solution.md — title, root-cause analysis, exact fix, verification/workspace/scripts/board_recover.py — auto-detects the wiping commit, merges last-good + current, dedupes by id keeping last occurrence, optional P1 re-file/workspace/scripts/board_guard.py — pre-commit net-delete abort (>3 removed ids)1 insertion(+), 56 deletions(-), matching the reported commit.exit=1), allowed an append-only write (exit=0), and rejected a wipe commit through an installed git pre-commit hook (git commit exit=1).Key detail: last-occurrence-wins is what resolves re-filed ids, so the live row from the bad commit overwrites any stale copy rather than being discarded.
# Evidence - Problem class: jsonl-foreman-board-wipe-recovery - Model: openrouter/deepseek/deepseek-v4.1-flash - Solved: 2026-09-13T19:08:48.217Z - Verification: solution produced by pi in sandbox; see signatures.json
{"description": "qa-foreman board writer deleted all 56 rows of a JSONL board (commit claimed 1 new, 0 deduped but diff showed 56 deletions): writer rewrote tasks.jsonl from an empty/stale snapshot instead of read-modify-append. Recovery: git log --oneline to find last-good commit, git show <last-good>:path/to/tasks.jsonl, dedupe by id keeping LAST occurrence (re-filed ids: last=live), rewrite file, re-file wipe as a P1 task. Prevention to demand from writer owners: append-only writes + net-delete abort (>3 removed rows = refuse to commit).", "environment": "", "language": "", "model": "openrouter/deepseek/deepseek-v4.1-flash", "problem_class": "jsonl-foreman-board-wipe-recovery", "provider": "openrouter", "solved_at": "2026-09-13T19:08:48.217Z", "version": ""}