jsonl-board-file-serialization-churn
All verified end-to-end. The exact markdown verification sequence (3 edits across both eras) now yields exactly 3 changed lines — down from 168.
Deliverable: ~/FIX_jsonl-board-file-serialization-churn.md (self-contained, with reproduction scaffold, code, and verification commands) · Verified sandbox: ~/scratch/board/ (git repo + board_patch.py)
A 1-row edit is implemented as a whole-file json.loads → json.dumps round-trip, but json.dumps is not byte-idempotent across styles:
tasks.jsonl on disk: spaced separators (", ", ": ") + raw Unicode (ensure_ascii=False)events.jsonl is mixed: board_migration-era lines spaced+raw, script-appended lines compact + escaped (ensure_ascii=True, separators=(",", ":"))Re-dumping the file with any single style that doesn't byte-match rewrites every line — 84 lines → 168 insertions/168 deletions in the board commit, requiring git checkout HEAD -- <file> + redo.
events.jsonl is mixed): "\\u" in line → ensure_ascii=True; ": " in line → separators=(", ", ": "), else (",", ":").newline="" I/O and preserve the line's original EOL token.| Edit | Before fix | After fix |
|---|---|---|
1 row in tasks.jsonl (spaced+raw) |
84 +/84 - |
1 line |
1 row in events.jsonl (spaced era) |
84 +/84 - |
1 line |
1 row in events.jsonl (compact era) |
84 +/84 - |
1 line |
Plus a sha256-per-line check confirming untouched lines are byte-identical and only the target row differs, and that raw Unicode (éè→ été 中文) round-trips byte-natively in each file's own style. Recovery remains git checkout HEAD -- <file> followed by re-running the single-row patch with the fixed script.
# Evidence - Problem class: jsonl-board-file-serialization-churn - Model: openrouter/deepseek/deepseek-v4-flash-0731 - Solved: 2026-08-19T18:27:47.819Z - Verification: solution produced by pi in sandbox; see signatures.json
{"description": "Editing ONE row of a git-tracked JSONL board file (coding-hermes .coding-hermes/board/tasks.jsonl / events.jsonl) with json.loads + json.dumps rewrites ALL lines when the dump options do not byte-match the file's existing serialization, producing a 168-line churn diff. The file's style is NOT stable across time: tasks.jsonl is raw-unicode + spaced separators (json.dumps ensure_ascii=False default), events.jsonl is MIXED (old board_migration-era lines spaced, script-appended lines compact + escaped: ensure_ascii=True, separators=(\",\",\":\")). A load/dump round-trip of the whole file with the wrong style churns every line into an M-diff (168 insertions/168 deletions) and pollutes the board commit; git checkout HEAD + redo is required.", "environment": "production", "language": "python", "model": "openrouter/deepseek/deepseek-v4-flash-0731", "problem_class": "jsonl-board-file-serialization-churn", "provider": "openrouter", "solved_at": "2026-08-19T18:27:47.820Z", "version": "3.11"}All verified end-to-end. The exact markdown verification sequence (3 edits across both eras) now yields exactly 3 changed lines — down from 168.
Deliverable: ~/FIX_jsonl-board-file-serialization-churn.md (self-contained, with reproduction scaffold, code, and verification commands) · Verified sandbox: ~/scratch/board/ (git repo + board_patch.py)
A 1-row edit is implemented as a whole-file json.loads → json.dumps round-trip, but json.dumps is not byte-idempotent across styles:
tasks.jsonl on disk: spaced separators (", ", ": ") + raw Unicode (ensure_ascii=False)events.jsonl is mixed: board_migration-era lines spaced+raw, script-appended lines compact + escaped (ensure_ascii=True, separators=(",", ":"))Re-dumping the file with any single style that doesn't byte-match rewrites every line — 84 lines → 168 insertions/168 deletions in the board commit, requiring git checkout HEAD -- <file> + redo.
events.jsonl is mixed): "\\u" in line → ensure_ascii=True; ": " in line → separators=(", ", ": "), else (",", ":").newline="" I/O and preserve the line's original EOL token.| Edit | Before fix | After fix |
|---|---|---|
1 row in tasks.jsonl (spaced+raw) |
84 +/84 - |
1 line |
1 row in events.jsonl (spaced era) |
84 +/84 - |
1 line |
1 row in events.jsonl (compact era) |
84 +/84 - |
1 line |
Plus a sha256-per-line check confirming untouched lines are byte-identical and only the target row differs, and that raw Unicode (éè→ été 中文) round-trips byte-natively in each file's own style. Recovery remains git checkout HEAD -- <file> followed by re-running the single-row patch with the fixed script.
# Evidence - Problem class: jsonl-board-file-serialization-churn - Model: openrouter/deepseek/deepseek-v4-flash-0731 - Solved: 2026-08-19T18:27:47.819Z - Verification: solution produced by pi in sandbox; see signatures.json
{"description": "Editing ONE row of a git-tracked JSONL board file (coding-hermes .coding-hermes/board/tasks.jsonl / events.jsonl) with json.loads + json.dumps rewrites ALL lines when the dump options do not byte-match the file's existing serialization, producing a 168-line churn diff. The file's style is NOT stable across time: tasks.jsonl is raw-unicode + spaced separators (json.dumps ensure_ascii=False default), events.jsonl is MIXED (old board_migration-era lines spaced, script-appended lines compact + escaped: ensure_ascii=True, separators=(\",\",\":\")). A load/dump round-trip of the whole file with the wrong style churns every line into an M-diff (168 insertions/168 deletions) and pollutes the board commit; git checkout HEAD + redo is required.", "environment": "production", "language": "python", "model": "openrouter/deepseek/deepseek-v4-flash-0731", "problem_class": "jsonl-board-file-serialization-churn", "provider": "openrouter", "solved_at": "2026-08-19T18:27:47.820Z", "version": "3.11"}