board-commit-batching-idle-churn
Done. Solution written to ~/SOLUTION.md and the gate script created at ~/.coding-hermes/scripts/board_commit_gate.py.
Root cause: Every idle light-audit tick appends an audit event to board/events.jsonl and unconditionally pushes a board: tick #N commit, so ~99% of history is idle churn.
Fix: A self-contained Python gate (board_commit_gate.py) that runs before the board commit and returns 0 COMMIT / 1 SKIP / 2 ERROR:
- Finds last board-touching commit via git log -1 --format=%H -- .coding-hermes/board/
- Gets max committed event id via git show <hash>:.coding-hermes/board/events.jsonl
- Classifies uncommitted rows (id > max): any real event (task_completed/dispatched/created) or audit with battery/e2e/fixture (case-insensitive) → COMMIT; pure idle audit → SKIP.
Verification (ran live in this workspace):
- py_compile clean
- --selftest → 6/6 PASS
- Live checks: missing board → exit 2; idle-only → SKIP; mixed real → COMMIT; live repo (no uncommitted) → SKIP; gate exit contract honored.
One bug was caught and fixed during verification: my initial battery test used "battTERY" whose lowercase is "batttery" (extra t), which doesn't contain "battery" — corrected the test input. Note the marker match uses the exact substring "battery", so real-world data must contain that substring form.
# Evidence - Problem class: board-commit-batching-idle-churn - Model: openrouter/deepseek/deepseek-v4-flash-0731 - Solved: 2026-08-27T19:23:07.895Z - Verification: solution produced by pi in sandbox; see signatures.json
{"description": "Problem: git history is ~99% idle-tick board commit churn \u2014 every idle light-audit tick appends an audit event and pushes a 'board: tick #N' commit, burying real work in blame/CHANGELOG archaeology. Fix: a commit gate script (.coding-hermes/scripts/board_commit_gate.py) that decides COMMIT vs SKIP for board-only commits: (1) find last commit touching the board via git log -1 --format=%H -- .coding-hermes/board/; (2) read the events.jsonl at that commit via git show <hash>:.coding-hermes/board/events.jsonl to get max event id; (3) classify uncommitted events: ANY non-audit event (task_completed/dispatched/created) -> COMMIT (board state change); audit events whose detail contains battery/E2E/fixture (case-insensitive) -> COMMIT (battery close); pure idle light-audit events -> SKIP (accumulate until a real change). Exit 0 COMMIT / 1 SKIP / 2 error. --selftest builds a temp git repo with fake boards (idle-only -> SKIP, task_completed -> COMMIT, battery audit -> COMMIT, no uncommitted -> SKIP, missing board -> exit 2). Verified: selftest 6/6 PASS, live verdict SKIP (no uncommitted board events), py_compile clean, gitreins judge PASS.", "environment": "uhlp Go repo, JSONL-canonical foreman board (.coding-hermes/board/), scheduler-driven idle light-audit ticks", "language": "python", "model": "openrouter/deepseek/deepseek-v4-flash-0731", "problem_class": "board-commit-batching-idle-churn", "provider": "openrouter", "solved_at": "2026-08-27T19:23:07.895Z", "version": "master 0eb0429"}Done. Solution written to ~/SOLUTION.md and the gate script created at ~/.coding-hermes/scripts/board_commit_gate.py.
Root cause: Every idle light-audit tick appends an audit event to board/events.jsonl and unconditionally pushes a board: tick #N commit, so ~99% of history is idle churn.
Fix: A self-contained Python gate (board_commit_gate.py) that runs before the board commit and returns 0 COMMIT / 1 SKIP / 2 ERROR:
- Finds last board-touching commit via git log -1 --format=%H -- .coding-hermes/board/
- Gets max committed event id via git show <hash>:.coding-hermes/board/events.jsonl
- Classifies uncommitted rows (id > max): any real event (task_completed/dispatched/created) or audit with battery/e2e/fixture (case-insensitive) → COMMIT; pure idle audit → SKIP.
Verification (ran live in this workspace):
- py_compile clean
- --selftest → 6/6 PASS
- Live checks: missing board → exit 2; idle-only → SKIP; mixed real → COMMIT; live repo (no uncommitted) → SKIP; gate exit contract honored.
One bug was caught and fixed during verification: my initial battery test used "battTERY" whose lowercase is "batttery" (extra t), which doesn't contain "battery" — corrected the test input. Note the marker match uses the exact substring "battery", so real-world data must contain that substring form.
# Evidence - Problem class: board-commit-batching-idle-churn - Model: openrouter/deepseek/deepseek-v4-flash-0731 - Solved: 2026-08-27T19:23:07.895Z - Verification: solution produced by pi in sandbox; see signatures.json
{"description": "Problem: git history is ~99% idle-tick board commit churn \u2014 every idle light-audit tick appends an audit event and pushes a 'board: tick #N' commit, burying real work in blame/CHANGELOG archaeology. Fix: a commit gate script (.coding-hermes/scripts/board_commit_gate.py) that decides COMMIT vs SKIP for board-only commits: (1) find last commit touching the board via git log -1 --format=%H -- .coding-hermes/board/; (2) read the events.jsonl at that commit via git show <hash>:.coding-hermes/board/events.jsonl to get max event id; (3) classify uncommitted events: ANY non-audit event (task_completed/dispatched/created) -> COMMIT (board state change); audit events whose detail contains battery/E2E/fixture (case-insensitive) -> COMMIT (battery close); pure idle light-audit events -> SKIP (accumulate until a real change). Exit 0 COMMIT / 1 SKIP / 2 error. --selftest builds a temp git repo with fake boards (idle-only -> SKIP, task_completed -> COMMIT, battery audit -> COMMIT, no uncommitted -> SKIP, missing board -> exit 2). Verified: selftest 6/6 PASS, live verdict SKIP (no uncommitted board events), py_compile clean, gitreins judge PASS.", "environment": "uhlp Go repo, JSONL-canonical foreman board (.coding-hermes/board/), scheduler-driven idle light-audit ticks", "language": "python", "model": "openrouter/deepseek/deepseek-v4-flash-0731", "problem_class": "board-commit-batching-idle-churn", "provider": "openrouter", "solved_at": "2026-08-27T19:23:07.895Z", "version": "master 0eb0429"}