Skip to content

Say what a run produced — 'done' with no moments is currently unanswerable - #11

Merged
ralyodio merged 1 commit into
masterfrom
surface-worker-diagnostics
Aug 9, 2026
Merged

ralyodio merged 1 commit into
masterfrom
surface-worker-diagnostics

Conversation

@ralyodio

@ralyodio ralyodio commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

The problem

"It says it's done but there's no suggestions."

That question cannot be answered right now, because the two numbers that distinguish the possible causes are computed and thrown away.

analyzeProject returns tracksCreated, momentsGenerated and warnings. The web action calls it as void analyzeProject(...), so all three are discarded. A run that found nothing reports "completed" and nothing else.

Zero moments from zero tracks and zero moments from tracks that scored too low need entirely different fixes — one is a detection problem, the other is a scoring/athlete problem. Right now they look identical.

What the log will say

done: 14 track(s), 0 suggested moment(s)
Tracks were found but none scored above the 0.35 threshold for soccer.
Marking an athlete to follow gives scoring an anchor and usually raises scores.

or

done: 0 track(s), 0 suggested moment(s)
No tracks were produced, so there was nothing to score.
The detector found nothing it recognised in this footage.

The worker's own diagnostics, too

Besides progress, the worker reports which thread pool it chose, that it overrode a requested input size, and a closing summary of frames, detections and tracks. run() collects all of it into a string that is only read when the run fails — so on a successful run none of it reached anyone.

Including the threads: line added in #10 specifically to be read. I asked for it from the production logs earlier and it was never going to be there. Those lines now become job log entries.

Progress lines still drive the bar rather than the log; a note: becomes a warning.

Verification

386 tests pass (6 new, covering the progress/diagnostic split against the worker's real output format), eslint and typecheck clean.

What this does not do

It does not create any moments. It makes the next run say which problem you have. Given detection completed in ~1 minute on fast and produced some tracks or none, the log will point at either the detector or the scoring threshold — and if it is scoring, marking an athlete to follow is the first thing to try, since focalTrackId is currently null and the focal signals contribute nothing.

…oducing it

"It says it's done but there's no suggestions." That is unanswerable at the
moment, because the two numbers that distinguish the possible causes are
computed and then thrown away.

analyzeProject returns tracksCreated, momentsGenerated and warnings. The web
action calls it as `void analyzeProject(...)`, so all three are discarded. A
run that found nothing reported "completed" and nothing else — and zero
moments from zero tracks needs an entirely different fix from zero moments
from tracks that scored too low.

The run now logs what it produced, and when that is nothing, which of the
two it was:

  done: 14 track(s), 0 suggested moment(s)
  Tracks were found but none scored above the 0.35 threshold for soccer.
  Marking an athlete to follow gives scoring an anchor and usually raises
  scores.

or

  done: 0 track(s), 0 suggested moment(s)
  No tracks were produced, so there was nothing to score.

The same applies to the worker's own stderr. Besides progress it reports
which thread pool it chose, that it overrode a requested input size, and a
closing summary of frames, detections and tracks. run() collects all of it
into a string that is only read when the run *fails*, so on a successful run
none of it reached anyone — including the threads diagnostic added in #10
specifically to be read. Those lines now become job log entries, where the
person watching already is.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@ralyodio
ralyodio merged commit 3b651be into master Aug 9, 2026
4 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