|
| 1 | +name: Recorded figures |
| 2 | + |
| 3 | +# DEBT E3. `python -m evals.sweep --check` re-measures every recorded dev-split figure from the |
| 4 | +# committed gold set. It is load-bearing -- it is what catches a figure that has silently stopped |
| 5 | +# reproducing, and three review cycles were lost to exactly that -- and it is also the slowest |
| 6 | +# thing in CI by a wide margin: about nine and a quarter minutes of CPU on an arm64 developer |
| 7 | +# machine (two measurements, 9m09s and 9m19s of CPU time; this is compute, not I/O). Wall-clock |
| 8 | +# on the runner, over all 33 non-zero runs of this step in the repository's Actions history, |
| 9 | +# read 2026-08-24: 4m54s to 7m42s, median 6m59s. An earlier note gave 6m23s-7m41s "as read from |
| 10 | +# step timings", which was one pair of runs written as though it were the survey. Background estimation dominates it, about |
| 11 | +# 1.4 s per image once per distinct background parameter set swept, and the QC/normalization |
| 12 | +# records add one further pipeline pass, about 43 s of that total. |
| 13 | +# |
| 14 | +# So it is scoped rather than removed. A recorded figure is a function of six things: the gold set |
| 15 | +# the sweep actually reads (data/ -- evals/sweep.py's DATA_DIR is Path("data"), so the images and |
| 16 | +# truth records live there, NOT in synth/), the generator that writes it (synth/), the parameters |
| 17 | +# swept (configs/), the measurement code (pipeline/), the sweep and its record (evals/), and the |
| 18 | +# dependency versions everything above runs on (requirements.txt). A commit that touches none of |
| 19 | +# those six cannot move a figure, and running the sweep against it is the waste E3 describes. |
| 20 | +# |
| 21 | +# The count has been wrong twice, so it is worth saying how to check rather than trusting it: |
| 22 | +# the list below is the authority, and this sentence is a description of it. If they disagree, |
| 23 | +# the list is right. |
| 24 | +# |
| 25 | +# data/ is in the list because leaving it out was a live hole rather than a tidiness point: a |
| 26 | +# commit that regenerates the gold set, or edits one image or one truth record, touches no other |
| 27 | +# pattern, so the check would not run and a recorded figure could silently stop reproducing -- |
| 28 | +# the exact failure this step exists to catch, reachable through the change that scoped it. |
| 29 | +# requirements.txt is the sixth for a reason one step removed from the other five: a numpy or |
| 30 | +# OpenCV version can move a figure without a line of this repository's own code changing. |
| 31 | +# |
| 32 | +# This lives in its own workflow file rather than as an `if:` on a step, because `paths:` is a |
| 33 | +# native trigger filter and an `if:` would need the changed-file list computed by hand -- a shell |
| 34 | +# diff against a base ref that is wrong on a branch's first push and on a force-push. The native |
| 35 | +# filter has no such edge, and no third-party action is introduced to get it. |
| 36 | +# |
| 37 | +# THE TRADE-OFF, stated rather than discovered later: a workflow skipped by `paths:` reports no |
| 38 | +# status at all, not a passing one. If this job is ever made a required status check on `main`, |
| 39 | +# a documentation-only PR will wait forever for a check that will never run. It is not required |
| 40 | +# today. Making it required means replacing the `paths:` filter with an always-running job that |
| 41 | +# decides internally whether to do the work -- which is the shell-diff design this file avoids, |
| 42 | +# and it should be taken deliberately, not as a side effect of turning on branch protection. |
| 43 | +# |
| 44 | +# `.gitignore`, docs, and every workflow file EXCEPT this one are deliberately not in the list: |
| 45 | +# none of them can change a measurement. This file is in the list, because a change to the filter |
| 46 | +# itself must run the job it just re-scoped -- otherwise a filter edited to exclude something |
| 47 | +# would take effect without the sweep ever running under the new rule. |
| 48 | +on: |
| 49 | + push: |
| 50 | + paths: |
| 51 | + - "evals/**" |
| 52 | + - "configs/**" |
| 53 | + - "pipeline/**" |
| 54 | + - "synth/**" |
| 55 | + - "data/**" |
| 56 | + - "requirements.txt" |
| 57 | + - ".github/workflows/figures.yml" |
| 58 | + pull_request: |
| 59 | + paths: |
| 60 | + - "evals/**" |
| 61 | + - "configs/**" |
| 62 | + - "pipeline/**" |
| 63 | + - "synth/**" |
| 64 | + - "data/**" |
| 65 | + - "requirements.txt" |
| 66 | + - ".github/workflows/figures.yml" |
| 67 | + |
| 68 | +jobs: |
| 69 | + recorded-figures: |
| 70 | + # The same de-duplication as ci.yml, and for the same reason: without it a same-repository |
| 71 | + # PR runs this nine-minute job twice for one commit. Push covers same-repo work; |
| 72 | + # pull_request covers forks, whose pushes never reach this repository. |
| 73 | + # The same merge-commit trade-off ci.yml records applies here; see the note there. |
| 74 | + if: >- |
| 75 | + github.event_name != 'pull_request' |
| 76 | + || github.event.pull_request.head.repo.full_name != github.repository |
| 77 | + runs-on: ubuntu-latest |
| 78 | + steps: |
| 79 | + - uses: actions/checkout@v4 |
| 80 | + |
| 81 | + - uses: actions/setup-python@v5 |
| 82 | + with: |
| 83 | + python-version: "3.11" |
| 84 | + |
| 85 | + # No `if [ -f requirements.txt ]` guard and no pytest: this job runs one command, that |
| 86 | + # command needs the runtime dependencies and nothing else, and a missing requirements.txt |
| 87 | + # must fail here rather than be skipped into a run against whatever the image ships. |
| 88 | + # ci.yml's install carries the guard for historical reasons; this file is new and does not. |
| 89 | + - name: Install dependencies |
| 90 | + run: | |
| 91 | + python -m pip install --upgrade pip |
| 92 | + pip install -r requirements.txt |
| 93 | +
|
| 94 | + # Every dev-split figure quoted in NOTES.md and configs/*.yaml is transcribed from |
| 95 | + # evals/dev_sweeps.json, and tests/test_recorded_figures.py checks the transcription on |
| 96 | + # every pytest run -- which still happens on every push, in ci.yml. This step checks the |
| 97 | + # other half: that the record itself still reproduces from the committed gold set. |
| 98 | + - name: Recorded dev-split figures still reproduce |
| 99 | + run: python -m evals.sweep --check |
0 commit comments