Skip to content

Subtitle resolution: state the post-seek coverage crossing when it happens (#318) - #319

Merged
superuser404notfound merged 1 commit into
mainfrom
feat/issue-318-coverage-statement
Aug 7, 2026
Merged

superuser404notfound merged 1 commit into
mainfrom
feat/issue-318-coverage-statement

Conversation

@superuser404notfound

Copy link
Copy Markdown
Owner

Closes #318.

The gap

The #250 statement marks transitions of the frontier's SOURCE, and a frontier climbing past the rendered position is not one of those. After a far seek the sequence was:

  1. the reconstruction tick, via=pump by construction (the reanchor is requested after the drain loop, so the side reader has not been asked to move yet), whose resolvedThrough is the drain cursor and therefore a lower bound
  2. one line when the reader's position first passes the fence, which in the reporter's battery still read 639.30 against a rendered 640.00
  3. silence, because via never changes again while the frontier climbs past the playhead about a second later
  4. the 30 s cadence tick

A gate admitting only fenced coverage therefore adjudicated at ~29.25 s, clustered that tightly across three different seek targets, while the reporter's own instrumentation had the rendered subtitle state matching extracted truth after 1.33 to 1.39 s. Emission cadence, not determination latency.

The change

A fifth emission point, reason=coverage, on the first drain tick whose span actually contains the playhead. Once per decoded run, re-armed by every reset.

  • No new claim. It prints the statement the tick already builds every decoding tick since subtitle-resolution: expose the retained contiguous determination span (or a first-successor proof) under the active seek generation #276, so via=pump still cannot state coverage and the strength of the number is unchanged.
  • The span has to CONTAIN the playhead: resolvedThrough >= playhead and coveredFrom <= playhead. A run that ends above the playhead but starts above it too does not determine the position being rendered.
  • Its absence stays informative. On a link that cannot carry both readers (Seek starvation by superseded readers + cold far-seek latency #240) the frontier never catches the playhead, and then nothing claims that it did.
  • transitionReason holds the whole emission decision, so the decoding path and the idle path cannot drift apart on it. The idle path builds a statement now, which costs the same two telemetry reads its frontier check already made.
  • The playhead is threaded into the statement build instead of being re-read per call, so the crossing decision and the latch that records it cannot disagree by however long a tick ran.

Harness note: coverage is a new value of the reason field. Field set and field order are unchanged.

Tests

14 in Issue318CoverageCrossingTests, one per way the crossing could be announced wrongly (pump bound, short frontier, span above the playhead, non-finite playhead, reset precedence, crossing outranking a coincident frontier change, no repeat at 2 Hz), plus the reporter's post-seek sequence tick by tick. Full suite green locally, 1525 tests.

🤖 Generated with Claude Code

https://claude.ai/code/session_01HX5zV3Fcf7Nzq4DYGdXvQE

#318)

The #250 statement marks transitions of the frontier's SOURCE. A frontier
climbing past the rendered position is a transition too, and it had no line.

After a far seek the sequence was: the reconstruction tick, `via=pump` by
construction because the reanchor is requested after the drain loop; then one
line when the side reader's position passes the fence, which in the reporter's
battery still read 639.30 against a rendered 640.00; then silence, because
`via` never changes again while the frontier climbs past the playhead a second
later; then the 30 s cadence tick. A gate admitting only fenced coverage
therefore adjudicated at ~29.25 s, clustered that tightly across three seek
targets, while their own instrumentation had the rendered state matching
extracted truth after 1.33 to 1.39 s.

The drain tick now emits `reason=coverage` on the first tick whose span
actually contains the playhead, once per decoded run, re-armed by every reset.
Nothing about the claim changed: it prints the statement the tick already built
since #276, so `via=pump` still cannot state coverage (its bound is the drain
cursor, a lower bound), and the span has to contain the playhead rather than
merely end above it. Its absence stays informative: on a link that cannot carry
both readers (#240) the frontier never catches the playhead, and then no line
claims that it did.

`transitionReason` holds the whole emission decision so the decoding and idle
paths cannot drift apart on it, and the playhead is now threaded into the
statement build instead of being re-read per call, so the decision and the
latch cannot disagree by however long a tick ran.

14 tests in Issue318CoverageCrossingTests, one per way the crossing could be
announced wrongly, including the reporter's tick-by-tick sequence.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01HX5zV3Fcf7Nzq4DYGdXvQE
@superuser404notfound
superuser404notfound merged commit e93d9bc into main Aug 7, 2026
3 checks passed
@superuser404notfound
superuser404notfound deleted the feat/issue-318-coverage-statement branch August 7, 2026 04:50
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.

Post-seek subtitle coverage is only observable at the next cadence tick, not when determination first crosses the playhead

1 participant