Skip to content

ci(ratchet): let the baseline be re-measured where it is used - #729

Open
gHashTag wants to merge 2 commits into
mainfrom
feat/ratchet-rebaseline-on-the-runner
Open

ci(ratchet): let the baseline be re-measured where it is used#729
gHashTag wants to merge 2 commits into
mainfrom
feat/ratchet-rebaseline-on-the-runner

Conversation

@gHashTag

Copy link
Copy Markdown
Owner

Six gates sit at TIMEOUT in gate_status_baseline.json. Timed individually on a ten-core machine:

gate seconds exit
audit_selftest_sensitivity.py >400 still running
audit_yosys_reads.py 212.8 1 — findings
audit_dsp_inference.py 185.2 1 — findings
audit_ci_health.py 169.1 0 — clean
verify_intrinsic_invariants.py 154.3 0 — clean
audit_pack_layouts.py 99.6 0 — clean

Five of six finish, three are clean, and audit_pack_layouts fits inside the recorded 120 s here while missing it there. At least one entry in that column is a fact about the runner, not the script.

What I did not do

Add a per-gate timeout. This module refuses it in its own words: the timeout is 'part of the MEASUREMENT, not a convenience knob', and 'a script that is TIMEOUT at 90s and clean at 300s has not changed'. Handing slow gates more seconds turns three green without anything being repaired — moving the ruler until the board fits. There is already a broken-ruler guard here for the same reason: TIMEOUT-involving degradations are re-run serially.

What was missing

A way to re-measure where the number is used. --update on a laptop writes a laptop's baseline over the runner's, which is the substitution half this repository's audits exist for.

This adds a manual rebaseline input (with explicit timeout) that runs --update on the runner, prints every gate whose status moved into the step summary, uploads the result as an artifact, and restores the committed file. The workflow commits nothing.

Raising the timeout does not repair a gate; it changes what the status means. That is a decision for a person — who now has the measurement to make it with, taken on the machine the number describes.

Six gates are TIMEOUT at the recorded 120 s. Timed on a ten-core machine, five
of the six finish -- audit_pack_layouts 99.6 s, verify_intrinsic_invariants
154.3 s, audit_ci_health 169.1 s (all three exit clean), audit_dsp_inference
185.2 s and audit_yosys_reads 212.8 s (findings). Only audit_selftest_sensitivity
still exceeds 400 s. So half the TIMEOUT column is a property of the runner, and
audit_pack_layouts fits inside 120 s here while missing it there.

The obvious move is a per-gate timeout, and this module argues against it in its
own words: the timeout is "part of the MEASUREMENT, not a convenience knob", and
a script "TIMEOUT at 90s and clean at 300s has not changed". Handing slow gates
more seconds would report fixes that did not happen -- moving the ruler until
the board fits. There is already a broken-ruler guard here for the same reason:
any TIMEOUT-involving degradation is re-run serially.

What was actually missing is the ability to re-measure *where the number is
used*. `--update` on a laptop writes a laptop's baseline over the runner's, and
this repository has spent a good deal of effort on exactly that class of bug.

So: a manual `rebaseline` input that runs `--update` on the runner, prints the
gates that moved into the step summary, uploads the result as an artifact, and
restores the committed file. Nothing is committed by the workflow. Raising the
timeout does not repair a gate, it changes what its status means, and that is a
decision for a person -- who now has the measurement to make it with.
… with

audit_gf64_chain.py and audit_hardware_rows.py shell out to `gh`. Without a
token `gh` exits non-zero, both scripts report "needs input" (exit 2), and the
ratchet reads that as clean -> needs input against a baseline measured where a
token existed. Every open PR shows it, including one that changes no gate, so it
is the environment and not the tree.

GITHUB_TOKEN is the built-in per-run token: no secret to add, scoped to this
repository, and it expires with the job. The gates then either pass or find
something -- either way they are looking, which is what a gate that cannot see
its subject was never doing.
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