Skip to content

Validate fight totals into trusted, warning, and quarantine states #17

Description

@komaksym

Parent

What to build

Create the central validation boundary for normalized fight totals. It must return machine-readable checks and preserve raw evidence while separating trusted, warning, and quarantined fight records.

Acceptance criteria

  • Every fight-total check emits a stable code, check_result=pass|fail|not_checked, a severity, and a reason when the result is not_checked.
  • Fight totals receive exactly record_state=valid|warning|quarantined; not_checked is never treated as a record state.
  • Required identity, canonical outcome, numeric ratio, non-negative value, landed-not-greater-than-attempted, percentage-range, and placeholder/zero-denominator rules are enforced without clipping or imputing source values.
  • Quarantine records retain the source key, provenance, failed check codes, severity, result, observed values, and propagation target.
  • Trusted all-bouts output excludes quarantined fight totals, retains warning totals, and preserves red wins, blue wins, draws, and no contests.
  • Fixture tests cover valid, warning, hard-invalid, not_checked, missing-ID, malformed-ratio, impossible-count, and conflicting-outcome cases.

Blocked by

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-agentunplannedValid work, but not scheduled — author is currently time-limited

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions