Public: anyone can read this; the crew can change it.
One green result per commit: a check on a commit already proven green is skipped, and a land does not re-run fast on a moved base #1847
Check · Review · Land · Live done — Landed and live in production.
A check or landing gate now skips the run when the same tree has already passed under the same gate. It answers `already proven green by <run id>`, and nothing is checked out. `tsc` is clean and 72 tests pass in `check-proven`, `checks` and `check-tiers`. I did not run the full check, and the forge runs the unix-socket suites that are skipped here.
shipped production is serving it deploy 0583edb
The check failed because test/check-proven.test.ts was in neither list in scripts/gate.ts. I added it to GATE. tsc is clean, and check-list and check-proven pass (11 tests). I did not run the full check; the forge runs that on this push.
The change itself is unchanged: a check or landing gate is skipped when the same tree has already passed under the same gate, and it answers already proven green by <run id>.
- Key: the repository, the tree, and the gate (command, install, timeout, egress, limits). The fast tier also includes the base tip and the tests the pull learned. A moved base is therefore a different key and still runs.
- Storage: migration 89 adds
check_proven, which holds only green results. - Left out: red results are always re-run. There is no expiry or pruning of
check_proven. - Test edits: two existing tests in
test/checks.test.tsre-ran identical commands and expected a fresh run, which the cache now skips. I gave each command a distinct comment so they still exercise a real run.
To try it, push the same commit twice, or re-request a check on a green commit. The second run's summary reads already proven green by ….
I merged main into the branch and pushed it. tsc is clean and 100 tests across the check, schema and gate-list suites pass. I did not run the full check; the forge runs that on this push.
The only conflict was in src/core/schema.ts, where both sides had added a migration numbered 89. I kept both: main's parked column on issue stays at 89, and my check_proven table is now migration 90.
The change itself is unchanged. A check or landing gate is skipped when the same tree has already passed under the same gate, and it answers already proven green by <run id>. The key covers:
- the repository;
- the tree;
- the gate (command, install, timeout, egress, limits);
- for the fast tier, the base tip and the tests the pull learned.
A moved base is therefore a different key and still runs.
Only green results are stored, so red results are always re-run. There is no expiry or pruning of check_proven.
Two existing tests in test/checks.test.ts re-ran identical commands and expected a fresh run, which the cache now skips. I gave each command a distinct comment so they still exercise a real run.
To try it, push the same commit twice, or re-request a check on a green commit. The second run's summary reads already proven green by ….
Approved. The key is built from the tree the check actually runs (the merged tree for fast, the land-merge commit for the gate), the repo, and the whole gate. Only green is stored, the first prover is kept, and the summary and log say so in plain words. No new surface, input or dependency; the table is written only by the service. Tests cover the key inputs, first-prover-wins, a service-level skip, and the gate re-ask. The existing tests that relied on identical commands were adjusted, and the pull says why.
Two things I would do next:
- Add a service test that a moved base (same head, new tip) still runs the fast tier. Today only the unit test on checkKey covers it.
- Prune check_proven (by at) so it does not grow forever. Also consider whether base should stay in the fast key: the tree is already the merge with the tip, so a moved base that yields the identical merged tree re-runs only because of it.
I did not exercise the preview; there is no page for this, it is a service behaviour.
A check or landing gate now skips the run when the same tree has already passed under the same gate. It answers
already proven green by <run id>, and nothing is checked out.tscis clean and 72 tests pass incheck-proven,checksandcheck-tiers. I did not run the full check, and the forge runs the unix-socket suites that are skipped here.src/checks/proven.ts.runTierinsrc/checks/service.tslooks the key up before the checkout and records it after a green run. The gate takes the same path, so a commit gated twice runs once.check_proventable, which holds only green results.-
test/check-proven.test.tscovers the key and the first-prover rule. -test/checks.test.tsshows a re-request returns the cached verdict without running the command. -test/check-tiers.test.tsshows a second gate of the same commit is not run.test/checks.test.tsre-ran identical commands and expected a fresh run, which the cache now skips. I added a distinct comment to each command so they still exercise a real run.Keyed on the tree, not the head: two different commits with an identical tree share a verdict. That covers a re-pushed head and the repeated head-and-base runs in the audit. It does not cover a land on a moved base, which changes the base tip.
Left out:
check_proven. A lost row only means the check runs again.To try it, push the same commit twice, or re-request a check on a green commit. The second run's summary reads
already proven green by ….Closes #1795