Skip to content

fix(receipt): a set reports the completion of the run that could stop short - #1309

Draft
frapercan wants to merge 1 commit into
developfrom
fix/receipt-reads-the-run-that-could-stop-short
Draft

frapercan wants to merge 1 commit into
developfrom
fix/receipt-reads-the-run-that-could-stop-short

Conversation

@frapercan

Copy link
Copy Markdown
Owner

What the author saw

On the public 211->227 window, the strata of every scored set of the ablation said:

This run did not finish. The job ended succeeded after 0 of ? batches

That is English inside /es/, and it contradicts itself. The production node flagged it during its review of the site.

Why

_finished read a missing batch total as unfinished. The job a scored set names in its meta.job_id is the scorer, score_prediction_set, which never splits into batches.

The change

  • A scored set answers for the run behind its candidates: meta.scored_from, then that set's meta.job_id. Scoring a remnant succeeds, so the scorer's own success says nothing about the candidates. The guard the receipt exists for still holds: the night a 1,024-protein remnant was measured as a whole.
  • A job whose operation never splits (scoring, an ingest, the own annotations) is finished when it succeeds. A batched one (predict_go_terms, compute_embeddings) still needs its total and a matching count. An unknown operation is treated as batched, so the existing test that two missing counts do not agree still holds.
  • _CAMPAIGN selects the job's operation.

Checked on the public store

Run against the serving database with this branch's router:

  • the ablation's Ankh base k=2 set reads finished: true, SUCCEEDED, 37 of 37 batches;
  • the own non-experimental set, whose meta names no job, reads finished: null. That is unattributed, not a red warning.

Tests

  • New tests pin three things: a never-splitting job is done when it succeeds; a batched run still needs its count; a scored set answers for the run of its candidates.
  • tests/test_receipts_router.py passes locally, and lint-gates.sh was green before the two pre-existing lines were put back as develop has them.

… short

The public window's strata showed "This run did not finish. The job ended
succeeded after 0 of ? batches" on every scored set of the ablation, in
English inside /es/, contradicting itself. _finished read a missing batch
total as unfinished, and the job a scored set names is the scorer, which
never splits into batches.

- A scored set now answers for the run behind its candidates (meta
  scored_from, then that set's job): scoring a remnant succeeds, so the
  scorer's success says nothing about the candidates. The guard this
  receipt exists for, the night a 1,024-protein remnant was measured as
  a whole, still holds.
- A job whose operation never splits (scoring, an ingest, the own
  annotations) is finished when it succeeds. A batched one still needs
  its total and the count to match, and an unknown operation is treated
  as batched.

On the public store, the ablation's Ankh base k=2 set now reads finished,
SUCCEEDED, 37 of 37 batches.
@codecov

codecov Bot commented Nov 25, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 71.42857% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.65%. Comparing base (8035fb7) to head (47c83e0).
⚠️ Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
protea/api/routers/receipts.py 71.42% 6 Missing ⚠️

❌ Your project check has failed because the head coverage (83.92%) is below the target coverage (85.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #1309      +/-   ##
===========================================
- Coverage    85.66%   85.65%   -0.01%     
===========================================
  Files          472      472              
  Lines        37463    37480      +17     
===========================================
+ Hits         32091    32103      +12     
- Misses        5372     5377       +5     
Files with missing lines Coverage Δ
protea/api/routers/receipts.py 74.19% <71.42%> (-1.37%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

This branch has not been deployed

No deployments
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