Skip to content

feat: add fleet run-ledger reconcile gate - #266

Merged
joshua-temple merged 2 commits into
mainfrom
feat/fleet-reconcile-gate
Jun 24, 2026
Merged

joshua-temple merged 2 commits into
mainfrom
feat/fleet-reconcile-gate

Conversation

@joshua-temple

Copy link
Copy Markdown
Collaborator

Problem

A scenario suite only verifies the runs it remembers to wait on, so a secondary run it causes (a PR-close hotfix Finalize, a seed-PR preview, an incidental push-orchestrate) can fail while the suite stays green. A coverage audit found exactly this in 3env, 2env, and primary.

Fix

A shared run-ledger reconcile gate that makes hard-100% coverage a structural invariant:

  • register-run composite action records every gated run's id + expected conclusion into a ledger (workspace file for single-job suites, uploaded artifact for multi-job).
  • fleet-reconcile reusable workflow enumerates every run the repo produced since the scenario window opened and fails if any is unaccounted for.
  • The decision core lives in internal/fleetreconcile and is unit-tested against synthetic run lists, so the guarantee (an unregistered failing run reds the gate) is proven, not asserted. Cancelled runs are excused only when provably superseded within the same lane by a later registered run; a failure is never excused; the gate excludes its own run and out-of-scope workflows.

Verification

go build/test ./..., golangci-lint, and actionlint on the new YAML all clean. Reconcile table tests cover pass, unregistered-failure-fails, expected-negatives (both directions), superseded-cancel, and self/scope exclusion. Fleet infra only; no generated-workflow or schema change.

Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
@joshua-temple
joshua-temple enabled auto-merge (squash) June 24, 2026 00:21
@joshua-temple
joshua-temple merged commit de471c9 into main Jun 24, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant