livery.workshop._speed_tasks¶
livery.workshop._speed_tasks ¶
fm speed.judge and fm speed.accept: the test speed marks' verbs.
speed.judge runs in the gate job after the timing rows are
collected: it judges every check leg's summed test time per package
against the marks (livery.workshop._speed), records the first marks
and the ratchets, warns on a run over the mark, and is red on the
second run over in a row on a reference leg. speed.accept is the
person's raise of a mark, with the reason on the record. Both verbs
do nothing until the contract declares [ci] speed-marks = true,
and speed.judge runs on a CI leg alone.
Functions:
| Name | Description |
|---|---|
judge_flow |
Judge the run's legs, record what moves, and return the red lines. |
speed_judge |
Judge the run's test times against the speed marks; red on the second run over. |
speed_accept |
Raise a package's speed mark deliberately, with the reason on the record. |
Attributes:
| Name | Type | Description |
|---|---|---|
speed |
|
judge_flow ¶
judge_flow(root: Path, run: RunContext) -> list[str]
Judge the run's legs, record what moves, and return the red lines.
Prints every verdict and every write. Fails open: a store that cannot be read prints its reason and reddens nothing.
Source code in packages/workshop/src/livery/workshop/_speed_tasks.py
speed_judge ¶
Judge the run's test times against the speed marks; red on the second run over.
Runs in the gate job after the timing rows are collected. Off
until the contract declares [ci] speed-marks = true: it says
so, and drops any marks left from before the switch, so a later
opt-in starts from the timings alone. A CI verb: outside CI it is
listed as unavailable with the reason and refused, since a
machine's clock is not a leg the marks are taken on.
Source code in packages/workshop/src/livery/workshop/_speed_tasks.py
speed_accept ¶
speed_accept(package: Annotated[str, doc('the package path, as packages/forge')], seconds: Annotated[float, doc("the new mark: the suite's summed test time")], reason: Annotated[str, doc('why the suite may take longer; goes on the record')] = '', leg: Annotated[str, doc('the check leg; the reference leg when empty')] = '') -> None
Raise a package's speed mark deliberately, with the reason on the record.
The mark comes down on its own when the runs beat it; raising it is a person's act, so this writes a dated row naming who and why, and the next gated run judges from it. Refuses while the marks are off, without a reason, for an unknown package, at or below the current mark, or when the marks cannot be read.