A fetch that stalled had no deadline outside a worker: on the worker's
fallback, and on the main-thread run without workers, the row waited
forever and held the run. Inside a worker the pool's three-minute job
limit caught it, but only by killing the thread.
Now one episode's read — its fetches and the detector together — is
given three minutes everywhere: inside a worker, which then answers
with an error and lives on (the pool's own limit, a minute longer, is
for a thread that cannot even answer); on the fallback; and on the
default reader the page uses without workers. The row fails with "no
answer in 180 s" and the run goes on. The stalled request itself is not
cancelled — the browser keeps waiting on it in the background — but
nothing waits for it.
Tests, written red first: withTimeout passes work through, value or
error, rejects at the deadline, and waits with no limit; the reader
gives up after its limit; a stalled episode fails its row while the
other episodes complete; the fa…
Batch pool: a dead worker is terminated and, up to twice, replaced
Follow-up to review item 6. Marking a crashed or hung worker dead kept
the run going but left the thread alive: the pool held its reference,
so it kept its memory (the rig profile, the decoded parquet cache) and,
if hung, its core, until the page was left. The slot was never replaced
either, so every later run on the page had one worker fewer.
- onError terminates the worker (a no-op on one already gone) before
moving its jobs to the main thread.
- A dead slot with restarts left is given a fresh worker the next time
every live worker is busy; an idle live worker is always preferred.
The batch page allows two restarts per slot, so a passing failure
such as a stalled fetch costs one job's delay rather than a thread,
while a worker that keeps dying stays dead. The pool's default is no
restarts.
- Events from a replaced worker are ignored, and a job's timeout does
nothing once the job has moved, so a late crash or reply from the old
worker cannot kill its successor.
- The …
Review round 1 of PR #3: no file is overwritten on a Hub error, the detector's atoms are marked, the commit names its base version
Jingyi's review of 2026-09-15 (analysis/jingyi-review-2026-09-15.md),
worst first, each with a test:
1. fetchAnnotationsFromHub: only a 404 means "no file"; any other status
throws, so the episode's row fails and nothing is staged — a 429 or a
5xx can no longer read as an empty file that Commit then overwrites.
2. The detector marks its own subtask atoms (origin: "auto"); isAutoAtom
requires the mark, so a hand-added subtask or a dragged detector atom
(same role, same label) survives every run. autoAtomsToAdd: a detector
subtask whose label a kept atom already carries is not added — a
person's atom, or an unmarked one from a file written before the mark
existed, wins at its own time, so no legacy file gets a second set.
The panel's single run goes through the same rule.
3. The run records the dataset's commit on main at its start
(report.baseSha, fetchBranchSha); Commit sends it as parentCommit; a
412 reads "the dataset moved since this run started — reru…
Batch auto-annotation: a dataset-level page runs the detector over every episode on worker threads, stages the proposals for review, commits in one go
The batch from the review of PR #1: "Run the detector over every episode
of a dataset and save all annotations to the Hub in one commit, with a
progress view and a list of episodes that failed or raised flags so the
reviewer knows where to look first." Starts from main (e3714c1).
- app/[org]/[dataset]/batch/: the page (a fixed route segment, so it wins
over [episode]); "Batch" at the right of the viewer's tab bar and a line
under the Auto-label panel lead to it. Range, raw-stream toggle, worker
count, Run / Stop, progress with an estimate, counters, a per-flag
histogram, the triage table (failed first, then the heaviest flags;
sort by episode; filter to flagged / failed / changed); every row opens
its episode on the Annotations tab. Stop leaves a resumable run: Resume
does only the episodes still owed, Rerun starts the range over.
- lib/annotateEpisode.ts: the single-episode pipeline as a plain function
(table series or raw sidecar series clipped to the episode, the
…