Public: anyone can read this; the crew can change it.

Sentinel: Crew runs in trevato/forge keep failing at the push or the sandbox #17051

Merged opened this

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

Merged

scout/forge:scout/16356-sentinel-crew-runs-in-trevato-forge-keep → main 0 commits fork

  • Merged. scout/16356-sentinel-crew-runs-in-trevato-forge-keep was merged into main as 1ab91fe.

Review

Sign in to review this change.
2 files changed +22 −0
src/crew/sentinel.ts +3
@@ -455,9 +455,12 @@ export function runStreaks(db: Database): Finding[] {
455455 // whether or not the summary leads with it.
456456 // An outage the runner retried ("no changes pushed: ... EAI_AGAIN") is not a
457457 // push that was refused; a "push failed: ... ECONNREFUSED" still counts.
458 // A person's pull whose branch lives in the repository itself is left with them on
459 // purpose (#16356): the runner's own decision, not a push that broke.
458460 const pushes = failed.filter(
459461 (r) =>
460462 !/\bdeclined:/i.test(r.summary) &&
463 !/branch lives in the repository itself/i.test(r.summary) &&
461464 !isOutageSummary(r.summary) &&
462465 /\bpush|sandbox|operation not permitted/i.test(r.summary),
463466 );
test/sentinel.test.ts +19
@@ -129,6 +129,25 @@ describe("a decline that does not lead the summary", () => {
129129 });
130130 });
131131
132 describe("a pull left with its author is not a failed push (#16356)", () => {
133 test("runs that left a person's in-repository branch file no push fault", async () => {
134 const made = await createRepo(app, alice, { name: "leftalone", visibility: "private" });
135 if (!made.ok) throw new Error(String(made.error));
136 for (let n = 0; n < 5; n++) {
137 const run = createRun(app.db, { repoId: made.value.id, kind: "agent" });
138 app.db
139 .query("UPDATE run SET state = 'failed', summary = ?2, created_at = ?3 WHERE id = ?1")
140 .run(
141 run.id,
142 `pull #${n + 1}'s branch lives in the repository itself and only its author, a person, can push it; the crew leaves it with them`,
143 ago((30 + n) * HOUR),
144 );
145 }
146 const keys = findFaults(app.db, NOW).map((f) => f.key);
147 expect(keys).not.toContain(`push:${made.value.id}`);
148 });
149 });
150
132151 describe("a dropped connection is not a failed push", () => {
133152 test("runs that ended on EAI_AGAIN file no push fault", async () => {
134153 const made = await createRepo(app, alice, { name: "offline", visibility: "private" });

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs