Join 11: gitea reads the step event's fingerprint by the seat's name
The seat mesh-pipeline-runner's step event carries `fingerprint`; gitea read `fp`, which no event carries, and which the type-check refuses once the Node fetch places the runner's contracts (design 47 G A-285). Builds: design 47 G A-285 Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h
This commit is contained in:
@@ -89,7 +89,7 @@ export class FailedSteps {
|
|||||||
|
|
||||||
private record(ev: StepEndedEvent): Promise<void> {
|
private record(ev: StepEndedEvent): Promise<void> {
|
||||||
const r = ev?.result;
|
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();
|
if (!r || !SHA.test(String(ev.commit ?? "")) || !fingerprint || !ev.module) return Promise.resolve();
|
||||||
return this.turn(async () => {
|
return this.turn(async () => {
|
||||||
const at = ev.at ?? new Date().toISOString();
|
const at = ev.at ?? new Date().toISOString();
|
||||||
|
|||||||
@@ -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 f.stepEnded(ended(C3, "failed", { step: "lint", status: "optional", fingerprint: "fp-2" }));
|
||||||
await judged("a failed optional step", C3, "run-on-request nats unit");
|
await judged("a failed optional step", C3, "run-on-request nats unit");
|
||||||
assert.equal(kv.has(failedStepKey("nats", "fp-2", "lint")), false);
|
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.
|
// A plain pass clears nothing; a rerun that passes clears it.
|
||||||
await f.stepEnded(ended(C2, "passed"));
|
await f.stepEnded(ended(C2, "passed"));
|
||||||
await judged("a plain pass", C2, "run-on-request nats unit");
|
await judged("a plain pass", C2, "run-on-request nats unit");
|
||||||
|
|||||||
Reference in New Issue
Block a user