Skip to content

feat(video): Verdict Interpreter suppresses Transient Hits - #125

Merged
govza merged 2 commits into
masterfrom
feat/verdict-interpreter
Sep 26, 2026
Merged

govza merged 2 commits into
masterfrom
feat/verdict-interpreter

Conversation

@govza

@govza govza commented Sep 25, 2026

Copy link
Copy Markdown
Owner

Summary

  • Verdict Interpreter (dvr/verdictInterpreter.ts) is the only reader of the Verdict Timeline. It uses the DVR's presentation delay to see the closing verdict before a run's first frame is shown. Short, low-confidence unsafe runs bounded by clean samples (Transient Hits) are presented clean instead of flashing a mask.
  • A Confident Hit (probability ≥ threshold × coefficient, capped) or a run longer than maxSuppressedRun still masks. The decision latches per run, so a mask never cuts mid-run.
  • Session machine: a single confirmation rule replaces CLEAN_STREAK_TO_CLEAR. Tentative hits defer status while the DVR presents, and lateHitPresented flips status when a run had to be masked before it could be judged.
  • Pre-mask lead: the mask starts PRE_MASK_LEAD_SEC (0.15 s) before a Hit's sample, so safe-to-NSFW scene cuts are no longer shown unmasked for up to a sample interval. It never applies across a coverage gap or before a suppressed Transient Hit.
  • maskTiming.ts holds the mask timing constants and TRANSIENT_HIT_CONFIG. strictnessToScoreThreshold moves to utils/ (it is now shared by the content script and inference).
  • Telemetry: a new hb.video.transient_runs counter, plus Grafana panels for tuning the config and the lead.
  • Docs: Verdict Interpreter, Transient Hit and Confident Hit added to the vocabulary.

Test plan

  • pnpm test:unit (video, scoreThreshold and inference suites)
  • Manual: a video with brief false positives stays unmasked, and a real NSFW cut is masked from its first frame
  • Check the transient_runs dashboard panels populate

Short low-confidence unsafe runs bounded by clean samples (model
hallucinations) are presented clean instead of flashing a mask, using the
DVR's presentation delay to see the closing verdict before the run's first
frame is shown. A Confident Hit (probability >= threshold x coefficient,
capped) or a run longer than maxSuppressedRun still masks; the decision
latches per run at first presentation so a mask never cuts mid-run.

- VerdictInterpreter (dvr/verdictInterpreter.ts) is the only reader of the
  Verdict Timeline: per-frame cover for the DVR player, per-sample
  classification (clean | confirmedClean | tentative | unsafe) for the
  session machine
- machine: one confirmation rule replaces CLEAN_STREAK_TO_CLEAR; tentative
  hits defer status while the DVR presents; lateHitPresented flips status
  when a run had to be masked before it could be judged
- TRANSIENT_HIT_CONFIG (3 / 1.5 / 0.95) and hb.video.transient_runs counter
  with a dashboard panel for tuning
- docs: Verdict Interpreter, Transient Hit, Confident Hit vocabulary
…n late

Frames between the last clean sample and the first unsafe one were
presented clean, so a safe-to-NSFW cut showed unmasked for up to a
sample interval. The DVR already knows the Hit when it presents those
frames, so the mask now starts PRE_MASK_LEAD_SEC before the Hit's
sample (not across a coverage gap, not before a suppressed Transient
Hit).

- maskTiming.ts: one home for mask timing constants (sample floors,
  coverage gap, bridge horizon, pre-mask lead, TRANSIENT_HIT_CONFIG)
- hb.video.transient_runs gains onset_gap_sec and pre_mask_lead_sec
  labels, plus a dashboard query, to tune the lead from data
@govza
govza merged commit ea09d84 into master Sep 26, 2026
4 checks passed
@govza
govza deleted the feat/verdict-interpreter branch September 26, 2026 10:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant