diff --git a/modules/gitea/failedsteps.ts b/modules/gitea/failedsteps.ts index c7edd8eea..2177579eb 100644 --- a/modules/gitea/failedsteps.ts +++ b/modules/gitea/failedsteps.ts @@ -89,7 +89,7 @@ export class FailedSteps { private record(ev: StepEndedEvent): Promise { const r = ev?.result; - const fingerprint = r?.fingerprint || ev?.fp || ""; + const fingerprint = r?.fingerprint || ev?.fingerprint || ""; if (!r || !SHA.test(String(ev.commit ?? "")) || !fingerprint || !ev.module) return Promise.resolve(); return this.turn(async () => { const at = ev.at ?? new Date().toISOString(); diff --git a/modules/gitea/test/failedsteps.test.ts b/modules/gitea/test/failedsteps.test.ts index e6e499887..8ad58bc9c 100644 --- a/modules/gitea/test/failedsteps.test.ts +++ b/modules/gitea/test/failedsteps.test.ts @@ -48,6 +48,9 @@ test("a head is refused by a required step that failed at its fingerprint in any await f.stepEnded(ended(C3, "failed", { step: "lint", status: "optional", fingerprint: "fp-2" })); await judged("a failed optional step", C3, "run-on-request nats unit"); assert.equal(kv.has(failedStepKey("nats", "fp-2", "lint")), false); + // A result that names no fingerprint is kept at the one the seat's step event carries (`fingerprint`). + await f.stepEnded(ended(C3, "failed", { step: "lint", fingerprint: undefined }, { fingerprint: "fp-3" })); + assert.ok(kv.has(failedStepKey("nats", "fp-3", "lint")), "the event's fingerprint is kept"); // A plain pass clears nothing; a rerun that passes clears it. await f.stepEnded(ended(C2, "passed")); await judged("a plain pass", C2, "run-on-request nats unit");