/** * Detects check runs that are `CANCELLED` because a newer run of the *same workflow* * superseded them on the same commit (concurrency-group eviction), rather than a genuine * cancellation. Split out of classify.mts to stay under the file-length cap. */ import type { CheckRun } from "../types.mts"; /** * Grouping key is `workflowId ?? workflowName` — the numeric GitHub Actions workflow database * ID when available, falling back to the display name. Checks with neither a workflow identity * nor a numeric `runId` (status contexts, startup-failure synthetics) never participate: they * can neither be marked superseded nor count as evidence of a newer run. * * A check is superseded iff its own conclusion is `CANCELLED` and some other check sharing its * workflow key has a strictly greater `runId`. The newest run for a workflow is therefore never * superseded, even if it is itself cancelled — that case stays "failing" so the agent can decide * whether to rerun it. * * @returns Indices into `checks` (not object identities, since check-run objects are not * deduplicated by reference elsewhere) that should be reclassified as "superseded". */ export declare function buildSupersededIndices(checks: CheckRun[]): Set;