You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Coverage ledger accepts ordinary classes absent from their hunter assignments #126
At c1c8a8c, an otherwise valid covered ledger unit can claim ATTACK-CLASSES.md#Access control while its ordinary_attack_class_block is null or ATTACK-CLASSES.md#Injection. The coverage validator returns no errors in both cases.
That is a mismatch between the coverage claim and the instructions actually sent to the hunter: RECONNAISSANCE.md defines the canonical attack class as the exact block reference, and HUNTING.md builds the hunter prompt from the assignment map. The validator currently checks those fields independently.
A reproduction using the existing fixtures in validate-coverage-ledger.test.cjs:
constvalue=unit({status: "covered",agent_id: "hunter-1",reviewed_paths: ["src/router.ts"],local_checks: [sourceCheck()],ordinary_attack_class_block: "ATTACK-CLASSES.md#Injection",});// unit() sets canonical_refs.attack_class to ATTACK-CLASSES.md#Access control.console.log(errorsFor([value]));// [] on mainvalue.ordinary_attack_class_block=null;console.log(errorsFor([value]));// [] on main
The same acceptance occurs for in_progress, blocked, and candidate units with otherwise valid state evidence.
A narrow fix is to require exact equality for ordinary ATTACK-CLASSES.md#... references in those four assigned/reviewed states. A planned unit can still be incomplete while being prepared, but must have the correct block before its transition to in_progress passes validation. Leave all unassigned states and custom/companion class representations unchanged.
Related but distinct: #104 rejects a block selected and excluded simultaneously; it does not connect the canonical coverage class to the selected ordinary block. I applied its current patch alongside this proposed fix in a temporary checkout, and all 78 tests pass together.
This is ledger consistency, not a claim about a deployed system. A focused fix with failing-before/passing-after regression tests is ready.
Activity