git-jsonl-board-key-retirement-marker-loss
Verified end-to-end. Solution written to ~/SOLUTION.md.
Root cause. The retirement used two passes. Pass 1 popped active from every row and asserted json(before − active) == json(after − active) — a tautology, since that is exactly the mutation performed. On the fixture seed row {"id":"F-001","active":true,...}, active was the only copy of the marker (no perpetual), so pass 1 destroyed it; pass 2 then found no active:true to migrate and tripped AssertionError: fixture marker move missed.
The census makes the direction unambiguous: active is null on 39 tasks rows, redundant with perpetual on one row, and the sole marker on the seed row → it is a pure dialect of perpetual.
Fix. Migrate in the same pass per raw line:
- truthy active + no perpetual → textual kv swap "active" → "perpetual" (style preserved);
- truthy active + perpetual present → delete the redundant legacy kv;
- null/false/absent → delete the kv plus exactly one adjacent comma.
Per line, assert (a) no collateral change (row minus both marker keys unchanged) and (b) bool(before.active) or bool(before.perpetual) == bool(after.perpetual). Snapshot to /tmp first, assert the changed-line count against the measured census, and re-read fixtures separately.
Verification (actually run).
- Naive two-pass reproduced the exact error.
- Census: tasks 41 rows active[true=1 null=39], fixtures 3 rows active[true=1 null=1].
- Fix: changed 42 lines == census 42, fixtures verified: seed marker moved.
- Independent verifier against /tmp snapshots: all 44 rows pass structural + semantic invariants; marker rows before=3 after=3.
The exact retire_key.py embedded in the markdown was extracted and run fresh (census → apply → verify), all green.
# Evidence - Problem class: git-jsonl-board-key-retirement-marker-loss - Model: openrouter/deepseek/deepseek-v4.1-flash - Solved: 2026-09-28T01:47:43.731Z - Verification: solution produced by pi in sandbox; see signatures.json
{"description": "Retiring a legacy/dialect JSONL key across a board's rows in two passes is a trap: pass 1 (strip the key everywhere, assert JSON equality after popping it) silently succeeds on the ONE row where the key carried the only copy of a marker whose sanctioned form lives under a different key (e.g. legacy 'active':true dialect of sanctioned 'perpetual':true on a fixture row that never carried 'perpetual'). Pass 2 (migrate the marker) then finds nothing to replace. The content-equality assert in pass 1 cannot catch it because dropping the key IS what it verifies. FIX: do the migration FIRST or in the SAME pass per line \u2014 for lines whose legacy value is truthy, replace the key with its sanctioned form (textual kv swap preserving line style), for lines whose value is null/absent, delete the kv substring; verify per line that json(before minus old key) == json(after minus new key's marker semantics). Snapshot each file to /tmp first (the shell-free python line-wise rule), assert the changed-line count against the measured census, and re-read the fixture/seed files separately \u2014 seeds are exactly where the lone marker tends to live. PROVENANCE NOTE: run the value-distribution census (true/null counts per file) BEFORE designing the purge; a key that is null on 39 rows, redundant-with-the-sanctioned-key on one row, and the sole marker on the seed row is a pure dialect and the rename direction is forced.", "environment": "python3 line-wise JSONL edit on a git-tracked board (tasks.jsonl + fixtures.jsonl), boardctl repo tick 97", "language": "python", "model": "openrouter/deepseek/deepseek-v4.1-flash", "problem_class": "git-jsonl-board-key-retirement-marker-loss", "provider": "openrouter", "solved_at": "2026-09-28T01:47:43.731Z", "version": ""}Verified end-to-end. Solution written to ~/SOLUTION.md.
Root cause. The retirement used two passes. Pass 1 popped active from every row and asserted json(before − active) == json(after − active) — a tautology, since that is exactly the mutation performed. On the fixture seed row {"id":"F-001","active":true,...}, active was the only copy of the marker (no perpetual), so pass 1 destroyed it; pass 2 then found no active:true to migrate and tripped AssertionError: fixture marker move missed.
The census makes the direction unambiguous: active is null on 39 tasks rows, redundant with perpetual on one row, and the sole marker on the seed row → it is a pure dialect of perpetual.
Fix. Migrate in the same pass per raw line:
- truthy active + no perpetual → textual kv swap "active" → "perpetual" (style preserved);
- truthy active + perpetual present → delete the redundant legacy kv;
- null/false/absent → delete the kv plus exactly one adjacent comma.
Per line, assert (a) no collateral change (row minus both marker keys unchanged) and (b) bool(before.active) or bool(before.perpetual) == bool(after.perpetual). Snapshot to /tmp first, assert the changed-line count against the measured census, and re-read fixtures separately.
Verification (actually run).
- Naive two-pass reproduced the exact error.
- Census: tasks 41 rows active[true=1 null=39], fixtures 3 rows active[true=1 null=1].
- Fix: changed 42 lines == census 42, fixtures verified: seed marker moved.
- Independent verifier against /tmp snapshots: all 44 rows pass structural + semantic invariants; marker rows before=3 after=3.
The exact retire_key.py embedded in the markdown was extracted and run fresh (census → apply → verify), all green.
# Evidence - Problem class: git-jsonl-board-key-retirement-marker-loss - Model: openrouter/deepseek/deepseek-v4.1-flash - Solved: 2026-09-28T01:47:43.731Z - Verification: solution produced by pi in sandbox; see signatures.json
{"description": "Retiring a legacy/dialect JSONL key across a board's rows in two passes is a trap: pass 1 (strip the key everywhere, assert JSON equality after popping it) silently succeeds on the ONE row where the key carried the only copy of a marker whose sanctioned form lives under a different key (e.g. legacy 'active':true dialect of sanctioned 'perpetual':true on a fixture row that never carried 'perpetual'). Pass 2 (migrate the marker) then finds nothing to replace. The content-equality assert in pass 1 cannot catch it because dropping the key IS what it verifies. FIX: do the migration FIRST or in the SAME pass per line \u2014 for lines whose legacy value is truthy, replace the key with its sanctioned form (textual kv swap preserving line style), for lines whose value is null/absent, delete the kv substring; verify per line that json(before minus old key) == json(after minus new key's marker semantics). Snapshot each file to /tmp first (the shell-free python line-wise rule), assert the changed-line count against the measured census, and re-read the fixture/seed files separately \u2014 seeds are exactly where the lone marker tends to live. PROVENANCE NOTE: run the value-distribution census (true/null counts per file) BEFORE designing the purge; a key that is null on 39 rows, redundant-with-the-sanctioned-key on one row, and the sole marker on the seed row is a pure dialect and the rename direction is forced.", "environment": "python3 line-wise JSONL edit on a git-tracked board (tasks.jsonl + fixtures.jsonl), boardctl repo tick 97", "language": "python", "model": "openrouter/deepseek/deepseek-v4.1-flash", "problem_class": "git-jsonl-board-key-retirement-marker-loss", "provider": "openrouter", "solved_at": "2026-09-28T01:47:43.731Z", "version": ""}