open-standards/.github/workflows/workflow-hygiene.yml
Transaction Science 77eb5cad0f
All checks were successful
lockfiles / every Cargo.lock is current (pull_request) Successful in 38s
no-vanity-metrics / Scan committed Markdown for vanity metrics (pull_request) Successful in 4s
no-vanity-metrics / WAI public text names no comparison (pull_request) Successful in 4s
no-vanity-metrics / WAI public text names no company or product (pull_request) Successful in 4s
no-vanity-metrics / No new orphan source files (pull_request) Successful in 6s
standards workspaces build + test / jouleclaw-rs (pull_request) Successful in 2m53s
standards workspaces build + test / joule-code-rs (pull_request) Successful in 1m26s
standards workspaces build + test / aac-rs (pull_request) Successful in 2m45s
standards workspaces build + test / joulecontract-rs (pull_request) Successful in 56s
standards workspaces build + test / map-rs (pull_request) Successful in 58s
standards workspaces build + test / mesh-rs (pull_request) Successful in 56s
tests in CI / every test file is run by a job or listed with its reason (pull_request) Successful in 5s
WAI section references / cited sections exist (pull_request) Successful in 25s
workflow hygiene / every workflow supersedes its own queue (pull_request) Successful in 4s
standards workspaces build + test / jouledesk-rs (pull_request) Successful in 48s
standards workspaces build + test / openpay (pull_request) Successful in 3m2s
standards workspaces build + test / macOS energy backends (pull_request) Successful in 4m40s
spec citations resolve / Code cites no section its SPEC lacks (pull_request) Successful in 4s
standards workspaces build + test / arl-rs (pull_request) Successful in 1m9s
standards workspaces build + test / eoc-rs (pull_request) Successful in 2m7s
standards workspaces build + test / jcp-rs (pull_request) Successful in 1m44s
standards workspaces build + test / joule-ui-rs (pull_request) Successful in 1m10s
standards workspaces build + test / joulehook-rs (pull_request) Successful in 1m11s
standards workspaces build + test / proof-rs (pull_request) Successful in 1m37s
standards workspaces build + test / sandbox-rs (pull_request) Successful in 2m29s
standards workspaces build + test / sense-rs (pull_request) Successful in 1m9s
standards workspaces build + test / smart-byte-rs (pull_request) Successful in 3m47s
ci: the script-only checks run on the arm64 runner
lockfiles, tests-in-ci, workflow-hygiene, no-vanity-metrics and
wai-section-refs read files and run scripts, so the CPU architecture does not
matter to them. They ran on the one x86_64 runner, which has every Rust
workspace's tests queued on it (90 jobs waiting when this was measured);
they move to linux-arm64.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-14 01:40:45 -04:00

67 lines
3 KiB
YAML

name: workflow hygiene
# Properties of the workflows themselves, checked rather than remembered.
#
# Two properties today. The first: every workflow declares a concurrency group
# that varies by ref. None of them did until 2026-10-05, and the consequence was not
# a slow build — it was that CI stopped being usable for anyone. A session
# pushing four versions of a branch queued four complete sets of runs, all of
# which had to drain; one PR's 21 contexts settled none in 70 minutes behind a
# backlog of 25, and two PRs were merged on locally-executed equivalents
# because the gate could not run. One omitted block reintroduces that for the
# whole repo, invisibly: the workflow still passes, it just queues forever
# under load.
#
# **The path gate.** `scripts/pr-touches-paths.py` decides whether a
# path-filtered workflow's jobs do any work, from the pull request's own diff —
# because Forgejo matches a `paths:` filter against the push delta, so a rebase
# fires every path-filtered workflow in the repo (measured: a jcp-only change
# ran 2 workflows pushed fresh and 15 force-pushed after a rebase). A gate that
# decides whether tests run is load-bearing in the dangerous direction: a wrong
# `false` silently skips a workflow. Its self-test pins both directions and that
# every way of failing fails *open*.
#
# This job runs on `linux`, which is jetson-hub — deliberately not the dev Mac,
# which already serves 13 of this repo's 21 contexts through two runners. It
# needs no toolchain and finishes in seconds.
on:
push:
branches: [main]
pull_request:
paths:
- '.github/workflows/**'
- 'scripts/check-workflow-concurrency.sh'
- 'scripts/check-workflow-concurrency-selftest.sh'
- 'scripts/pr-touches-paths.py'
- 'scripts/pr-touches-paths-selftest.sh'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# Runs on `linux-arm64`, not `linux`: these jobs read files and run scripts, so the CPU
# architecture does not matter to them, and the one `linux` (x86_64) runner is the
# fleet's bottleneck, with every Rust workspace's tests queued on it.
jobs:
concurrency-groups:
name: every workflow supersedes its own queue
runs-on: linux-arm64
steps:
- uses: actions/checkout@v4
# The check must be able to fail, or it is decoration. The self-test
# breaks the property both ways against a scratch copy and asserts the
# check rejects each. It lives in a script because embedding its Python
# in this `run:` block made the file invalid YAML, which would have meant
# no CI at all.
- name: The check fails closed (self-test)
run: ./scripts/check-workflow-concurrency-selftest.sh
- name: Every workflow is grouped per ref
run: ./scripts/check-workflow-concurrency.sh
# The path gate fails open in every failure mode, and still answers
# `false` for a diff that cannot affect the workflow.
- name: The path gate fails open (self-test)
run: ./scripts/pr-touches-paths-selftest.sh