Description
collector/label_rules.json (versioned) plus loader with schema validation and a pure evaluate(stack_inventory, rules, tunables). Implements the frozen contracts in doc-0008 Part 1: result enum pass|fail|not_evaluated|not_applicable with closed reason enum (missing_input, route_parked, truncated, deadline, no_signal_data, precondition_false); one result per (rule, stack, signal) with closed-enum and numeric evidence only; truncation and byte-cap overflow semantics; applicable weight excludes judgement rules and parked or unapproved routes; severity low|medium|high weights 1/3/5 with PS band mapping; score = 100*passed/evaluated weight published only at coverage >= 0.8; catalogue_version; D-LBL8 size floor and static-infrastructure allowlist; rule-input registry extensible by E tasks. Every rule carries provenance published|ps|policy and a source URL; quotes via summary are re-verified with URL and date recorded in doc-0008 before provenance published.
Acceptance Criteria
- #1 A rule whose input is missing can never pass, and a test proves it
- #2 Tests cover at_least at and below a band, byte-cap overflow, truncated name lists, not_applicable for no-data signals and single-signal cross rules, and the coverage floor withholding the score
- #3 The catalogue schema test rejects any evidence field that is not a closed enum or a number
- #4 Every published-provenance rule has a re-verification URL and date in doc-0008
Definition of Done
- #1 just test
- #2 just tf-validate
- #3 just check-identifiers and just no-em-dashes both return clean
Implementation Plan
Freeze deterministic result/evidence/coverage and explicit persisted input registry schema; verify published source passages; fail-first boundary tests and CodeRabbit; return candidate before independent review and landing. Root records doc-0008 verification rows.
Implementation Notes
loop14:2 implementation attempts,1 review-repair round. Major units seam and minor valid-input aggregate overflow corrected; independent52 tests pass, original-snapshot CodeRabbit delta complete0 findings, exact composed072121c gate2278 passed/2 skipped and CI37565941410 all required leaves successful. Frozen input seam e275a472d06bc9161b5d2fa0331b5c7791139659f813ce26fc3d445efda39adf; source verification recorded preserving complete research body.