open-standards/.github/workflows/workflow-hygiene.yml
Transaction Science 8257233ced
All checks were successful
standards workspaces build + test / jouleclaw-rs (pull_request) Successful in 47m48s
standards workspaces build + test / arl-rs (pull_request) Successful in 1m13s
standards workspaces build + test / eoc-rs (pull_request) Successful in 2m4s
standards workspaces build + test / aac-rs (pull_request) Successful in 15m30s
standards workspaces build + test / jcp-rs (pull_request) Successful in 1m45s
standards workspaces build + test / joule-ui-rs (pull_request) Successful in 1m14s
standards workspaces build + test / joulehook-rs (pull_request) Successful in 1m16s
standards workspaces build + test / proof-rs (pull_request) Successful in 1m17s
standards workspaces build + test / sandbox-rs (pull_request) Successful in 2m19s
standards workspaces build + test / sense-rs (pull_request) Successful in 1m9s
standards workspaces build + test / joule-code-rs (pull_request) Successful in 7m44s
standards workspaces build + test / smart-byte-rs (pull_request) Successful in 3m50s
workflow hygiene / every workflow supersedes its own queue (pull_request) Successful in 5s
standards workspaces build + test / joulecontract-rs (pull_request) Successful in 5m52s
standards workspaces build + test / map-rs (pull_request) Successful in 9m39s
standards workspaces build + test / mesh-rs (pull_request) Successful in 4m50s
standards workspaces build + test / openpay (pull_request) Successful in 13m34s
standards workspaces build + test / jouledesk-rs (pull_request) Successful in 3m21s
standards workspaces build + test / macOS energy backends (pull_request) Successful in 7m58s
ci: workflow hygiene — restore the comment marker on the header's first prose line
The line had lost its '#', so it parsed as an extra top-level key. The
workflow still ran; the header now reads as the comment it was written as.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-09 16:29:23 -04:00

64 lines
2.8 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
jobs:
concurrency-groups:
name: every workflow supersedes its own queue
runs-on: linux
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