gunk-dev/the-valley
the-valley:ida-2e274bfideaadopted

Required checks have a latency budget

State
question or idea
Created
2026-10-28 by contributor

Body

A project's required checks have a latency budget, and adding a check means paying for it within that budget.

Today the set of checks only grows. Of the 25 changes landed on this project between 2026-10-21 and 2026-10-27, the required set ran from 1 to 49 checks, with a median of 14. The fan-out comes from the policy's rule that a check is required by every class whose paths it consumes. An end-to-end check consumes the CLI, the schemas and the packaging, so nearly every core change requires nearly every end-to-end check. Each new feature adds one, and the cost of a core change grows with their count. Evidence also goes stale whenever main changes any file a wide check reads, so changes in flight re-run each other's checks.

The worker already builds pure checks side by side (`attest/check.go`, `buildSlots`), and `attest run --timings` already logs each check's duration. What is missing is a limit:
- Each check declares its measured cost in the policy, kept honest against the timings.
- `own-policy` refuses a policy whose worst-case required set exceeds the budget the policy states. A new check fits by narrowing what requires it, merging it with another, or retiring one.
- Narrower requirements: a wide end-to-end check is required by the classes it is about, and the paths it merely consumes require a smaller contract check.

Related: oc-90b6f14 (evaluate a tree's checks once), oc-c5b42f9 (a binary cache), oc-13c6bd6 (overflow workers), bd-5cad397 (failures visible only on the worker's host).

Source: 2026-10-28, the operator: "CI latency … is also 'just additive' and without a budget it seems to grow linearly."

Comments

No comments.