Skip to content

fix(ci): give every workflow a recorded state and reconcile the issues it raises - #148

Merged
hyperpolymath merged 1 commit into
mainfrom
arena/108bf010-rpa-elysium
Oct 14, 2026
Merged

hyperpolymath merged 1 commit into
mainfrom
arena/108bf010-rpa-elysium

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Closes nothing on its own — it makes the two open issues' classes impossible to leave undetermined, and records a determination for every workflow in the repository. It is the foundational reply to #138 and #143: I did not want to close either one without a mechanism that stops the next one.

What the issues asked for, and what measurement found

#138 lists two reds, both named lint-workflows — one check rendered twice, the shape hyperpolymath/standards#994 records for this class. That check is green on main: workflow-linter run https://github.com/hyperpolymath/rpa-elysium/actions/runs/38608640962[38608640962] (2026-10-14T17:40:24Z). The repair was already in the repository (SPDX-before-marker ordering, structured lock verifier, governance pin) — #145 — so nothing needed fixing; it needed recording.

Measuring every workflow instead of the one check name found five more red/odd states, none of them triaged anywhere:

workflow state evidence determination
mirror.yml red run https://github.com/hyperpolymath/rpa-elysium/actions/runs/38608642035[38608642035] — mirror-gitea exit 1, mirror-disroot exit 128 #147 — declare-or-disable; preflight added here
cflite_batch.yml stale failure 2026-10-11 precedes the in-file harness repairs #147 — re-measure, then fix or retire
cflite_pr.yml stale failure 2026-09-20 precedes the in-file harness repairs #147 — re-measure on a **/*.rs PR
casket-pages.yml superseded cancelled since 2026-09-22, no successful Pages deploy #147 — enable Pages or retire
instant-sync.yml dormant disabled_manually, last run 2026-07-14 #147 — record the decision or delete
push-email-notify.yml dormant disabled_manually, last run 2026-07-14 #147 — record the decision or delete

13 of 19 workflows are green. #143's advisory, RUSTSEC-2026-0316, is fixed on main (wasmtime 36.0.16 / async-trait 0.1.92 from #145); cargo-audit run https://github.com/hyperpolymath/rpa-elysium/actions/runs/38606899195[38606899195] is green.

What the change does

A recorded state per workflow. docs/audits/ci-check-ledger.json holds the state, the run that proves it, and — for everything not green — a reason, the owner action that clears it, an issue and a review date. docs/CI-RED-DETERMINATIONS.adoc carries the narrative and the determinations.

A checker that cannot be satisfied by hand-waving. scripts/ci-check-ledger.sh:

  • --check (offline, in just ci-check and on every CI event): the ledger must cover exactly the workflow files on disk; green needs an actions-run URL from this repository; red needs reason + owner action + issue + review date; the light states need a reason, a review date and one concrete pointer; review dates more than 90 days out are rejected.
  • --verify (on pushes to the default branch): recorded states versus the latest completed runs. A workflow recorded as green that has gone red fails — an unrecorded red is the exact thing that hid here. Benign transitions are printed for recording, not failed. If the API cannot be read, the ledger reports not verified; it never reports verified on an unreadable observation set.
  • --write refreshes state/evidence from the API and never touches the human fields — a new red still has to be determined by hand.

A dependency-issue lifecycle instead of a duplicate generator. cargo-audit.yml keeps both audits blocking (--deny warnings, --deny unmaintained) and tees their output to scripts/reconcile-audit-issue.sh, which keeps exactly one issue carrying the findings, the run and acceptance criteria; adopts the old markerless issue (#143's shape) instead of duplicating it; comments a new failing run rather than opening a second issue; and closes it with a green run on the default branch. #143 will therefore close itself, with the run linked, on the next Cargo Audit run after this merges (Monday schedule at the latest).

A preflight for the mirror drift. mirror.yml gains a job (no new action refs; actions.lock gains only the checkout ref it uses) that runs scripts/check-mirror-config.sh before the fan-out: an enabled-but-undeclared forge and an enabled-but-unconfigured one are named, including the empty vars.GITEA_HOST that made ssh-keyscan exit 1. Five of the seven legs work and stay untouched; the owner decides declare-or-disable for the rest.

Local verification

  • scripts/tests/ci-check-ledger-test.sh — 21 controls, all passing (missing entry, unknown state, red without owner/issue/review date, expired and over-long review dates, green without evidence, evidence from another repository, exemption on a green workflow, unrecorded red fails verification, benign transition warns, unreadable observations report "not verified", --write preserves determinations).
  • scripts/tests/reconcile-audit-issue-test.sh — 10 controls against a stubbed gh (create, adopt, update, no duplicate comment, PRs untouched, --dry-run, missing report, and that the workflow still calls it and stays blocking).
  • scripts/tests/mirror-config-test.sh — 7 controls, including the configuration measured on this repository (gitea + disroot + sourcehut + radicle enabled and undeclared, no GITEA_HOST).
  • YAML parses for all 19 workflows; shellcheck -S warning clean on every script; the actions.lock rules (direct refs, orphan workflows, immutable commits, transitive closure, unreferenced dependencies) were re-implemented locally in Python and pass — the real gate needs mikefarah yq v4, which is not available here, so the Lock Sync Gate in CI is the authoritative run for that.
  • Not verified locally and not claimed: no Rust/Zig/Idris toolchain exists here, so nothing was compiled. scripts/check-repository-health.sh needs yq too.

Notes

@coderabbitai

coderabbitai Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 03fe665a-2ad6-41fa-a83d-99d780b286f7
📥 Commits

Reviewing files that changed from the base of the PR and between ac5946d and e80c331.

⛔ Files ignored due to path filters: 1
  • .github/workflows/actions.lock is excluded by !**/*.lock
📒 Files selected for processing: 14
  • .github/workflows/cargo-audit.yml
  • .github/workflows/mirror.yml
  • .github/workflows/workflow-linter.yml
  • Justfile
  • docs/AUDIT.adoc
  • docs/CI-CD-REPAIR.adoc
  • docs/CI-RED-DETERMINATIONS.adoc
  • docs/audits/ci-check-ledger.json
  • scripts/check-mirror-config.sh
  • scripts/ci-check-ledger.sh
  • scripts/reconcile-audit-issue.sh
  • scripts/tests/ci-check-ledger-test.sh
  • scripts/tests/mirror-config-test.sh
  • scripts/tests/reconcile-audit-issue-test.sh
 ______________________________________________
< Plot twist: The bug was a feature all along. >
 ----------------------------------------------
  \
   \   (\__/)
       (•ㅅ•)
       /   づ
✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • 🔴 Error committing to branch - (🔄 Check to retry)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Comment thread .github/workflows/mirror.yml Fixed
Comment thread scripts/check-mirror-config.sh Fixed
Comment thread scripts/check-mirror-config.sh Fixed
Comment thread scripts/check-mirror-config.sh Fixed
Comment thread scripts/check-mirror-config.sh Fixed
@hyperpolymath
hyperpolymath force-pushed the arena/108bf010-rpa-elysium branch from e80c331 to d03864a Compare October 14, 2026 18:31
…s it raises

Issue #138 tracked two "pre-existing reds" both named lint-workflows — one check
rendered twice. That check is green on main (workflow-linter run 38608640962),
but measuring the repository instead of the check name found five workflows that
are red, stale, superseded or dormant, none of them triaged anywhere:

  mirror.yml            red         mirror-gitea exit 1, mirror-disroot exit 128
  cflite_batch.yml      stale       run predates the in-file harness repairs
  cflite_pr.yml         stale       run predates the in-file harness repairs
  casket-pages.yml      superseded  cancelled since 2026-09-22, no successful deploy
  instant-sync.yml      dormant     disabled_manually, last run 2026-07-14
  push-email-notify.yml dormant     disabled_manually, last run 2026-07-14

No gate is weakened and no capability is hidden:

* docs/audits/ci-check-ledger.json records the state of all 19 workflows with the
  run that proves it, and for every non-green one a reason, the owner action that
  clears it, the issue (#147) and a review date.
* scripts/ci-check-ledger.sh validates that record offline — it must cover exactly
  the workflow files on disk, evidence must be an actions run from this
  repository, review dates must be live and inside 90 days — and verifies it
  online on pushes to the default branch: a workflow recorded as green that has
  gone red fails, while benign transitions are reported for recording. An
  unreadable API means "not verified", never "verified".
* cargo-audit.yml keeps both audits blocking and passes their output to
  scripts/reconcile-audit-issue.sh, which maintains exactly one issue carrying
  the findings and acceptance criteria and closes it with a green run on the
  default branch. The old publisher's "Run `cargo audit` locally for details"
  issue, never closed, is how #143 and #113 both exist.
* mirror.yml gains a preflight job that names an enabled-but-undeclared or
  enabled-but-unconfigured forge before the fan-out — including the empty
  vars.GITEA_HOST that made ssh-keyscan exit 1 — and actions.lock gains the
  checkout ref that job uses.

Each script has a fail-closed control suite (21, 10 and 7 controls), wired into
just ci-check; the determinations and the evidence for every entry are in
docs/CI-RED-DETERMINATIONS.adoc.

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
@hyperpolymath
hyperpolymath force-pushed the arena/108bf010-rpa-elysium branch from d03864a to 1f9a55f Compare October 14, 2026 18:31
@hyperpolymath
hyperpolymath merged commit 4a9fafb into main Oct 14, 2026
41 checks passed
@hyperpolymath
hyperpolymath deleted the arena/108bf010-rpa-elysium branch October 14, 2026 18:34
@coderabbitai

coderabbitai Bot commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

❌ Failed to create Coding Agent finishing-touch task. Please try again.

hyperpolymath added a commit that referenced this pull request Oct 14, 2026
## Why

#148 gave the dependency audit a lifecycle: one issue carrying the
findings, the run and acceptance criteria, closed by a green run on the
default branch (`scripts/reconcile-audit-issue.sh`). That reconciler has
only ever been exercised against a stubbed `gh` in
`scripts/tests/reconcile-audit-issue-test.sh` — it has not yet touched
the API from a runner.

The audit workflow runs on push to `Cargo.toml`/`Cargo.lock` and on the
Monday schedule, so the path that *closes* an issue could not be
exercised until a remediation landed or a week passed. This adds
`workflow_dispatch`, which makes the gate re-runnable:

* after a finding is remediated, the issue goes green and closes
immediately instead of waiting for the cron tick;
* the reconcile path can be proven on a real runner now, rather than
being trusted and discovered broken on Monday;
* when a run fails for a transient reason (an install failure), the
audit can be re-run without an empty commit.

## What it does not change

* the audits stay blocking and identical (`--deny warnings`, `--deny
unmaintained`, both outputs teed);
* the reconcile step's condition is unchanged — it already treats any
non-pull-request event the same way, so a manual run opens, comments or
closes exactly as a scheduled one does, and a manual run never touches
issues from a pull request;
* no new permissions, no new action references, no change to
`actions.lock`.

## Verification

* 10/10 reconciliation controls still pass (`bash
scripts/tests/reconcile-audit-issue-test.sh`).
* All 19 workflows still parse; the locked-ref emulation is unchanged.

---------

Signed-off-by: Jonathan D.A. Jewell <6759885+hyperpolymath@users.noreply.github.com>
Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants