Public: anyone can read this; the crew can change it.
Sentinel: shared:01m23vygyffx5hg2f5vm8r74sr:2rc0ga4bk6 is past its budget: trevato/forge: "checks > a new head on a pull stops its running check for the old head, superseded not failed" failed o… #12578
Check · Review · Land · Live done — Landed and live in production.
scout/forge:scout/12577-sentinel-shared-01m23vygyffx5hg2f5vm8r74 → main 1 commit fork
1 file
changed +19
−8
test/checks-queue.test.ts +19 −8
| @@ -135,13 +135,26 @@ describe("checks", () => { | ||
| 135 | 135 | |
| 136 | 136 | test("a new head on a pull stops its running check for the old head, superseded not failed", async () => { |
| 137 | 137 | // Invariant: a pull's new head cuts off the running check of its old head, which ends cancelled as superseded. |
| 138 | // A pull's check runs the base branch's gate, not its own forge.json, so the | |
| 139 | // gate lives on main: it holds only a head that has S.md and not yet NEW.md. | |
| 140 | // Main itself, and the new head, pass at once; nothing here races the clock. | |
| 141 | const gate = await commitToBranch(f.app, f.alice, f.repo, { | |
| 142 | message: "A gate that holds the old head only", | |
| 143 | files: [ | |
| 144 | { | |
| 145 | path: "forge.json", | |
| 146 | content: checkJson( | |
| 147 | `if [ -f S.md ] && [ ! -f NEW.md ]; then ${f.held("never")}; fi; test -f OK.md`, | |
| 148 | ), | |
| 149 | }, | |
| 150 | ], | |
| 151 | }); | |
| 152 | if (!gate.ok) throw new Error(JSON.stringify(gate.error)); | |
| 153 | await f.settled((r) => r.commitOid === gate.value.commitOid); | |
| 138 | 154 | const slow = await commitToBranch(f.app, f.alice, f.repo, { |
| 139 | 155 | branch: "supersede", |
| 140 | message: "A check that never ends on its own", | |
| 141 | files: [ | |
| 142 | { path: "forge.json", content: checkJson(f.held("never")) }, | |
| 143 | { path: "S.md", content: "s\n" }, | |
| 144 | ], | |
| 156 | message: "A head the gate never lets go", | |
| 157 | files: [{ path: "S.md", content: "s\n" }], | |
| 145 | 158 | }); |
| 146 | 159 | if (!slow.ok) throw new Error(JSON.stringify(slow.error)); |
| 147 | 160 | const opened = await openPull(f.app, f.alice, f.repo, { |
| @@ -163,9 +176,7 @@ describe("checks", () => { | ||
| 163 | 176 | const next = await commitToBranch(f.app, f.alice, f.repo, { |
| 164 | 177 | branch: "supersede", |
| 165 | 178 | message: "Fast", |
| 166 | files: [ | |
| 167 | { path: "forge.json", content: checkJson("test -f S.md") }, | |
| 168 | ], | |
| 179 | files: [{ path: "NEW.md", content: "n\n" }], | |
| 169 | 180 | }); |
| 170 | 181 | if (!next.ok) throw new Error(JSON.stringify(next.error)); |
| 171 | 182 | const fresh = await f.settled((r) => r.commitOid === next.value.commitOid); |
new above
offline