diff options
| author | Claude <noreply@anthropic.com> | 2026-10-07 09:14:11 +0000 |
|---|---|---|
| committer | Claude <noreply@anthropic.com> | 2026-10-07 09:14:11 +0000 |
| commit | 9ba30c95c6bc9a6405ab21f616e933b09fa0358f (patch) | |
| tree | 76c40975e4dd962fbcea631883ef627b23df8d8a /CLAUDE.md | |
| parent | 7847e13c3fab23edfda096396e4dbe01df3471c3 (diff) | |
Examine each batch once instead of every poll
The first full pass over all 42 feeds finished, then the server kept
re-deriving the same answers: Radiolab reported "53:29 of 59:39" four
times in one day. pollOne called detect unconditionally and the mirror
skips files it already has, so nothing had changed between passes. At
~6.5 minutes a show that is 4.5 hours a cycle against a two-hour poll
interval -- the machine never finished a cycle and never idled, burning
13h42m of CPU in 11h of wall clock, roughly 60% of it on the intro search
whose results are deliberately not published.
Show.DetectedBatch records the episode ids a completed pass examined.
The batch is the unit rather than the episode because every offset and
every break comes from comparing an episode against the others fetched
alongside it, so one arrival or one pruning legitimately changes all of
them. Order-independent, since feeds are not reliably sorted. Recorded
only on completion, so a cancelled or failed pass is retried.
Episode.DetectedAtUnix could not serve as the gate: it is only set for
episodes appearing in result.Offsets, so an episode nothing was found in
never got a timestamp and the gate would never close.
Also records what the first full corpus showed, including a disproven
hypothesis worth not retrying -- filtering breaks by partner count or run
length looks obviously right and makes agreement with the declared length
gap substantially worse -- and a correction: Sleepy History's 117 minutes
of "advertising" was a show-level sum sitting almost entirely inside the
two episodes its own guard already refused.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018AwnALZL6bD4VBtATDVv3B
Diffstat (limited to 'CLAUDE.md')
| -rw-r--r-- | CLAUDE.md | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -296,6 +296,19 @@ by default and correct; it is simply waiting for a publisher who marks breaks. 71% and 105%. First time in this project that detection has been checked against external ground truth and agreed. + **Detection runs once per batch, not once per poll.** `Show.DetectedBatch` holds the set of + episode ids the last completed pass examined; `pollOne` skips detection when the batch is + unchanged. Without it the server re-derived identical results every cycle -- 4.5 hours of work + against a two-hour poll interval, so it never idled. The batch is the unit because every + result depends on which other episodes it was compared against, so one arrival or one pruning + must re-run all of them. `Episode.DetectedAtUnix` cannot serve as this gate: it is only set + for episodes that appear in `result.Offsets`. + + **Do not filter breaks by partner count or run length.** It looks obviously right -- 40% of + breaks have one partner and a 5s median -- and it is wrong: measured against the declared + length gap it drops agreement from 67% to 43%. Detection already under-reports. Table in + `docs/detection-findings.md`. + Breaks are published as ranges into `episode_midrolls`, which `MidrollSkip` and `PlayheadPolicy` already read -- no playback changes, no migration. Two guards publish nothing rather than something wrong: an episode whose matches cover over 35% of it, and any single |
