Skip to content

Recording #1030 follow-up: outputs-drill judge excuses only real held frames - #1038

Merged
iamfatness merged 3 commits into
mainfrom
codex/rc-1030
Oct 24, 2026
Merged

iamfatness merged 3 commits into
mainfrom
codex/rc-1030

Conversation

@iamfatness

@iamfatness iamfatness commented Oct 24, 2026 •

Copy link
Copy Markdown
Owner

Follow-up to #1035 (#1030), which merged at f06ac63 before this commit was pushed.

PR #1035 holds the last picture while a source's video is stalled. A held picture decodes to the previous identity, so iso-pixel-verdict.py counted it as a repeat. A stalled source would therefore have turned a passing outputs drill into a failing one, even though no output identity was lost. This PR teaches the judge to recognise those holds, without tagging anything in the file.

  • Snapshot: every recording stream reports heldFrames, and each ISO also reports framesPlacedAtHold. Both are published through publishIsoTrack and the Program session, like framesWritten.
  • ISO judge: iso-pixel-verdict.py excuses a repeat only when all of these hold; any other repeat, or a count mismatch, fails:
    • it repeats the immediately preceding picture;
    • it is placed at least 1 s after it, minus one frame period (measured from sorted packet PTS);
    • the total number of excused repeats equals the writer's heldFrames.
  • Drill report: outputs-drill-judge.py passes heldFrames through, and a passing row reports held=N, source stalled (longest arrival gap ...), so the stall is never a silent pass.
  • Writer spacing: a hold now triggers when video is 1.5 s behind and is placed 0.5 s behind the audio, so every hold is at least 1 s after the frame before it.
  • Review nits:
    • The last video PTS and end now come from the sample's placed (possibly re-stamped) time.
    • videoFramesBehindHold is reported: behind_hold= on the drain line and framesPlacedAtHold in the snapshot.
  • Pinned behaviour: a source stall with no holds never counted as missing arrivals, because the trace only expects arrivals that were offered. It is documented in docs/qa/outputs-drill.md and pinned by test_iso_pixels.test_a_source_stall_without_holds_loses_no_arrival.

Tests:

  • Native suite (COREVIDEO_CAPTURE_TESTS=1, Windows dev build): 1888 passed, 0 failed.
  • test_iso_pixels and test_outputs_drill: 37 passed. The new cases are a healthy file with held=0, a stall matching the hold pattern that passes and reports held, an adjacent duplicate that fails, an earlier-identity repeat that fails, hold-count mismatches that fail, and untimed repeats that are never excused.
  • Full scripts/qa discovery: 130 tests. The one error is in test_monitor_evidence, which refuses to run under the packaged Microsoft Store Python on this machine; it fails the same way without this change.

Review round (0b752cb)

  • Close-time tail hold. reconcileTail's final repeat is now published per ISO as tailFrames. The judge excuses exactly one trailing repeat, and only when it is the file's last frame, it repeats the frame before it, and tailFrames == 1. Before this, a stall that ran through Stop failed with repeated=1, or with "writer reported N, file shows N+1". There is now a fixture for a stall that runs through Stop, with the tail closer than 1 s and further than 1 s after the last hold; without tailFrames the same file fails.

  • Tolerance clamp. The hold tolerance is the median packet interval clamped to 1/frameRate, using the snapshot frameRate (1/24 s when there is none). On a mostly-stalled file the median approached 1 s, which collapsed the threshold toward zero. There is now a fixture for a file that is mostly holds, and the first hold in the hold-pattern fixture now sits one frame period past the threshold instead of exactly on it.

  • Re-measurement with the 1.5 s hold trigger (30 s audio-only phase, 640x360 MF test file):

    Measure Result
    On-disk growth before Stop +490,182 bytes
    queued_bytes at Finalize 0
    Sink writer queue peak (stall_max_queued_bytes) 3,840 bytes
    Held frames 27–28

    iso-recording.md now carries these numbers.

  • Docs:

    • outputs-drill.md no longer says the pass rule is unchanged. It now states that the repeated= column excludes excused repeats by design, and names the accepted narrow hole: a stale-stamped upstream duplicate that lands in a hold's slot is pixel-identical to the hold and passes.
    • The drill rule string now says excused holds pass and are reported as held=N.
  • CI: .github/workflows/ci.yml now runs test_iso_pixels.py and test_outputs_drill.py.

Tests:

  • Judge tests: 39 passed.
  • MF recording tests (EncoderRecordingSession.*): 38 passed.
  • Native suite (COREVIDEO_CAPTURE_TESTS=1): 1888 passed, 0 failed.

Gate amendment (a92daf5)

The owner's ruling of 2026-10-23, 23:27 EDT, is now recorded as a dated amendment next to the 2026-10-22 outputs-only gate ruling, in CLAUDE.md and docs/qa/outputs-drill.md. The README's gate sentence links to it.

  • What passes: a held frame passes as a labelled, counted repeat caused by the source, when all three conditions hold:
    1. it repeats the immediately preceding picture;
    2. it is at least 1 s (minus one frame period) after that picture;
    3. the number of excused repeats equals the writer's heldFrames.
  • Tail hold: the close-time tail hold is excused only as the file's last frame, when tailFrames is 1.
  • What still fails: anything the pipeline itself loses or duplicates.
  • Reporting: a passing row with holds must read held=N, source stalled.

Not verified: the judge has not been run on a real drill with an actual source stall. The QA identity stamps were not available in the MF test files.

🤖 Generated with Claude Code

iamfatness and others added 3 commits October 23, 2026 22:35
Held pictures during a video stall would have turned a passing drill into
a failing one (iso-pixel-verdict counted them as repeats) although no
output identity was lost.

- Snapshot: every recording stream reports heldFrames (and ISOs
  framesPlacedAtHold), published through publishIsoTrack / the Program
  session like framesWritten.
- iso-pixel-verdict.py: a repeat is excused only when it repeats the
  immediately preceding picture >= 1 s (minus one frame period) after
  it, using sorted packet PTS, AND the excused count equals the writer's
  heldFrames; any other repeat, or a count mismatch, fails.
- outputs-drill-judge.py passes heldFrames through and reports
  "held=N, source stalled (longest arrival gap ...)" on a passing row.
- The writer now triggers a hold 1.5 s behind and places it 0.5 s behind
  the audio, so every hold is >= 1 s after the frame before it.
- Review nits: last video PTS/end come from the sample's placed time;
  videoFramesBehindHold is reported (drain line behind_hold=, snapshot
  framesPlacedAtHold).
- Pinned: a source stall without holds never counted as missing arrivals
  (the trace only expects offered arrivals); documented in
  docs/qa/outputs-drill.md.

Native suite (COREVIDEO_CAPTURE_TESTS=1): 1888 passed, 0 failed.
scripts/qa test_iso_pixels + test_outputs_drill: 37 passed.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
- The close-time tail hold (reconcileTail) is published per ISO as
  tailFrames; iso-pixel-verdict excuses exactly one trailing repeat when it
  is the file's last frame repeating the one before it and tailFrames==1.
  A stall that runs through Stop no longer fails as repeated=1 or as
  "writer reported N, file shows N+1".
- The hold tolerance is the median packet interval clamped to 1/frameRate
  (snapshot frameRate, 1/24 s without one): on a mostly-stalled file the
  median approached 1 s and collapsed the threshold.
- Fixtures: stall through Stop (tail closer and further than 1 s, and
  without tailFrames it fails), a mostly-holds file, and the first hold
  moved one frame period past the threshold.
- Docs: iso-recording.md carries the 1.5 s-trigger re-measurement
  (+490 KB, 3,840 B, 27-28 holds); outputs-drill.md no longer says the
  pass rule is unchanged, states the repeated column excludes excused
  repeats, and names the accepted stale-duplicate-in-a-hold-slot hole;
  the drill rule string says excused holds pass as held=N.
- CI runs test_iso_pixels and test_outputs_drill.

Judge tests: 39 passed. MF recording tests: 38 passed. Native suite
(COREVIDEO_CAPTURE_TESTS=1): 1888 passed, 0 failed.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…y gate (#1030)

Dated amendment beside the 2026-10-22 outputs-only gate ruling in
CLAUDE.md and docs/qa/outputs-drill.md, plus the README gate sentence:
a writer-reported held frame during a source stall passes as a labelled,
counted, source-caused repeat under the three #1038 conditions; zero
tolerance remains for anything the pipeline loses or duplicates; the row
must read "held=N, source stalled".

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@iamfatness
iamfatness merged commit 09b816d into main Oct 24, 2026
17 checks passed
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