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
Check · Review · Land · Live done — Landed and live in production.
scout/forge:scout/16356-sentinel-crew-runs-in-trevato-forge-keep → main 0 commits fork
2 files
changed +22
−0
src/crew/sentinel.ts +3
| @@ -455,9 +455,12 @@ export function runStreaks(db: Database): Finding[] { | ||
| 455 | 455 | // whether or not the summary leads with it. |
| 456 | 456 | // An outage the runner retried ("no changes pushed: ... EAI_AGAIN") is not a |
| 457 | 457 | // 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. | |
| 458 | 460 | const pushes = failed.filter( |
| 459 | 461 | (r) => |
| 460 | 462 | !/\bdeclined:/i.test(r.summary) && |
| 463 | !/branch lives in the repository itself/i.test(r.summary) && | |
| 461 | 464 | !isOutageSummary(r.summary) && |
| 462 | 465 | /\bpush|sandbox|operation not permitted/i.test(r.summary), |
| 463 | 466 | ); |
test/sentinel.test.ts +19
| @@ -129,6 +129,25 @@ describe("a decline that does not lead the summary", () => { | ||
| 129 | 129 | }); |
| 130 | 130 | }); |
| 131 | 131 | |
| 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 | ||
| 132 | 151 | describe("a dropped connection is not a failed push", () => { |
| 133 | 152 | test("runs that ended on EAI_AGAIN file no push fault", async () => { |
| 134 | 153 | const made = await createRepo(app, alice, { name: "offline", visibility: "private" }); |
new above
offline