jsonl-event-max-id-missing-id-row
Done. The verified solution is at /workspace/SOLUTION.md, backed by /workspace/board_fix.py and /workspace/test_board_fix.py.
max(int(e["id"]) for e in events) + 1 indexes every row. Coding-hermes events.jsonl legitimately contains metadata/legacy rows without an id, so the generator raises KeyError: 'id' before max() runs. Worse, it fires after the task row was already persisted as in_progress (and attempts bumped), so retrying either fails a pending guard or double-increments attempts, and the event is never written. "id": null gives TypeError; an empty fresh log gives ValueError.
numeric_event_ids() / next_event_id() skip missing, null, and non-numeric ids; assert when rows exist but none is numeric; return 1 for a genuinely empty log.append_event() dedupes on (event_type, task_id, tick_number) and holds an exclusive flock around read→compute→append.dispatch_task() accepts pending or in_progress, and only increments attempts on a real pending → in_progress transition.event_type, tick_number, detail, timestamp).python3 -m pytest test_board_fix.py -q → 11 passed.task_dispatched event (id: 2, no KeyError), then boardctl validate → RESULT: OK, and boardctl show TASK-1 --events displays the new event.attempts stays 1 and exactly one event exists.# Evidence - Problem class: jsonl-event-max-id-missing-id-row - Model: openrouter/deepseek/deepseek-v4.1-flash - Solved: 2026-09-12T18:07:20.440Z - Verification: solution produced by pi in sandbox; see signatures.json
{"description": "A JSONL event log may contain valid metadata rows without an id key, so max(int(e['id']) for e in events) raises KeyError during append. Compute the next event id only from rows where e.get('id') is not null, assert at least one numeric id, and make the write idempotent because task status may already have been updated before the append failed.", "environment": "JSONL-canonical coding-hermes board", "language": "python", "model": "openrouter/deepseek/deepseek-v4.1-flash", "problem_class": "jsonl-event-max-id-missing-id-row", "provider": "openrouter", "solved_at": "2026-09-12T18:07:20.441Z", "version": ""}Done. The verified solution is at /workspace/SOLUTION.md, backed by /workspace/board_fix.py and /workspace/test_board_fix.py.
max(int(e["id"]) for e in events) + 1 indexes every row. Coding-hermes events.jsonl legitimately contains metadata/legacy rows without an id, so the generator raises KeyError: 'id' before max() runs. Worse, it fires after the task row was already persisted as in_progress (and attempts bumped), so retrying either fails a pending guard or double-increments attempts, and the event is never written. "id": null gives TypeError; an empty fresh log gives ValueError.
numeric_event_ids() / next_event_id() skip missing, null, and non-numeric ids; assert when rows exist but none is numeric; return 1 for a genuinely empty log.append_event() dedupes on (event_type, task_id, tick_number) and holds an exclusive flock around read→compute→append.dispatch_task() accepts pending or in_progress, and only increments attempts on a real pending → in_progress transition.event_type, tick_number, detail, timestamp).python3 -m pytest test_board_fix.py -q → 11 passed.task_dispatched event (id: 2, no KeyError), then boardctl validate → RESULT: OK, and boardctl show TASK-1 --events displays the new event.attempts stays 1 and exactly one event exists.# Evidence - Problem class: jsonl-event-max-id-missing-id-row - Model: openrouter/deepseek/deepseek-v4.1-flash - Solved: 2026-09-12T18:07:20.440Z - Verification: solution produced by pi in sandbox; see signatures.json
{"description": "A JSONL event log may contain valid metadata rows without an id key, so max(int(e['id']) for e in events) raises KeyError during append. Compute the next event id only from rows where e.get('id') is not null, assert at least one numeric id, and make the write idempotent because task status may already have been updated before the append failed.", "environment": "JSONL-canonical coding-hermes board", "language": "python", "model": "openrouter/deepseek/deepseek-v4.1-flash", "problem_class": "jsonl-event-max-id-missing-id-row", "provider": "openrouter", "solved_at": "2026-09-12T18:07:20.441Z", "version": ""}