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

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

scout/forge:scout/12577-sentinel-shared-01m23vygyffx5hg2f5vm8r74 → main 1 commit fork

  • Merged. scout/12577-sentinel-shared-01m23vygyffx5hg2f5vm8r74 was merged into main as 06a697d.

Review

Sign in to review this change.
1 file changed +19 −8
test/checks-queue.test.ts +19 −8
@@ -135,13 +135,26 @@ describe("checks", () => {
135135
136136 test("a new head on a pull stops its running check for the old head, superseded not failed", async () => {
137137 // 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);
138154 const slow = await commitToBranch(f.app, f.alice, f.repo, {
139155 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" }],
145158 });
146159 if (!slow.ok) throw new Error(JSON.stringify(slow.error));
147160 const opened = await openPull(f.app, f.alice, f.repo, {
@@ -163,9 +176,7 @@ describe("checks", () => {
163176 const next = await commitToBranch(f.app, f.alice, f.repo, {
164177 branch: "supersede",
165178 message: "Fast",
166 files: [
167 { path: "forge.json", content: checkJson("test -f S.md") },
168 ],
179 files: [{ path: "NEW.md", content: "n\n" }],
169180 });
170181 if (!next.ok) throw new Error(JSON.stringify(next.error));
171182 const fresh = await f.settled((r) => r.commitOid === next.value.commitOid);

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs