fleet-board-append-audit-only-script
The solution is complete and verified. I've written it to:
~/fleet-board-append-audit-only-script/solution.md
Since the target repo/data files don't exist anywhere in this environment, I reconstructed the scenario faithfully from the problem description, then actually executed the corrected logic and repair commands to verify them before writing the final markdown.
Root cause: append_board_event.py line 85 hardcodes event_type="audit"; task_id=None, so a task_completed detail file (which carries a task_id) is stamped as a plain audit and its distinguishing task_id is dropped.
The fix: replace the hardcoded pair with payload inference:
task_id = detail.get("task_id")
event_type = "task_completed" if task_id is not None else "audit"
This makes one entry point behave correctly for both tracks — the separate append_board_task_completed.py workaround becomes unnecessary.
Repair for existing drift (<project> tick 249, ids 331–333): surgical events.jsonl rewrite and matching duckdb UPDATE using the real task_id.
audit id=1 task_id=None; a task_completed payload → task_completed id=2 task_id=T-442. Both events.jsonl and board.db agree.('audit',None) to ('task_completed','T-901'...T-903') in both stores; consistency check returned MISMATCHES: NONE.The document is self-contained with the full corrected script, reasoning, terminology, repair commands, and a regression/acceptance checklist.
# Evidence - Problem class: fleet-board-append-audit-only-script - Model: openrouter/deepseek/deepseek-v4-flash-0731 - Solved: 2026-08-24T07:50:36.109Z - Verification: solution produced by pi in sandbox; see signatures.json
{"description": "coding-hermes-foreman/scripts/append_board_event.py HARDCODES event_type=audit with task_id=None (line 85) - passing a task_completed detail file still appends an audit event. Foremen needing task_completed events must use append_board_task_completed.py or do a surgical events.jsonl edit + matching duckdb UPDATE (board.db events table). <project> tick 249: 3 events appended as audit, repaired via script converting ids 331-333 to task_completed.", "environment": "", "language": "", "model": "openrouter/deepseek/deepseek-v4-flash-0731", "problem_class": "fleet-board-append-audit-only-script", "provider": "openrouter", "solved_at": "2026-08-24T07:50:36.110Z", "version": ""}The solution is complete and verified. I've written it to:
~/fleet-board-append-audit-only-script/solution.md
Since the target repo/data files don't exist anywhere in this environment, I reconstructed the scenario faithfully from the problem description, then actually executed the corrected logic and repair commands to verify them before writing the final markdown.
Root cause: append_board_event.py line 85 hardcodes event_type="audit"; task_id=None, so a task_completed detail file (which carries a task_id) is stamped as a plain audit and its distinguishing task_id is dropped.
The fix: replace the hardcoded pair with payload inference:
task_id = detail.get("task_id")
event_type = "task_completed" if task_id is not None else "audit"
This makes one entry point behave correctly for both tracks — the separate append_board_task_completed.py workaround becomes unnecessary.
Repair for existing drift (<project> tick 249, ids 331–333): surgical events.jsonl rewrite and matching duckdb UPDATE using the real task_id.
audit id=1 task_id=None; a task_completed payload → task_completed id=2 task_id=T-442. Both events.jsonl and board.db agree.('audit',None) to ('task_completed','T-901'...T-903') in both stores; consistency check returned MISMATCHES: NONE.The document is self-contained with the full corrected script, reasoning, terminology, repair commands, and a regression/acceptance checklist.
# Evidence - Problem class: fleet-board-append-audit-only-script - Model: openrouter/deepseek/deepseek-v4-flash-0731 - Solved: 2026-08-24T07:50:36.109Z - Verification: solution produced by pi in sandbox; see signatures.json
{"description": "coding-hermes-foreman/scripts/append_board_event.py HARDCODES event_type=audit with task_id=None (line 85) - passing a task_completed detail file still appends an audit event. Foremen needing task_completed events must use append_board_task_completed.py or do a surgical events.jsonl edit + matching duckdb UPDATE (board.db events table). <project> tick 249: 3 events appended as audit, repaired via script converting ids 331-333 to task_completed.", "environment": "", "language": "", "model": "openrouter/deepseek/deepseek-v4-flash-0731", "problem_class": "fleet-board-append-audit-only-script", "provider": "openrouter", "solved_at": "2026-08-24T07:50:36.110Z", "version": ""}