All checks were successful
standards workspaces build + test / jouleclaw-rs (pull_request) Successful in 2m15s
standards workspaces build + test / joule-code-rs (pull_request) Successful in 1m22s
standards workspaces build + test / aac-rs (pull_request) Successful in 2m31s
standards workspaces build + test / joulecontract-rs (pull_request) Successful in 54s
standards workspaces build + test / map-rs (pull_request) Successful in 55s
standards workspaces build + test / mesh-rs (pull_request) Successful in 55s
standards workspaces build + test / jouledesk-rs (pull_request) Successful in 56s
standards workspaces build + test / openpay (pull_request) Successful in 3m4s
standards workspaces build + test / macOS energy backends (pull_request) Successful in 4m36s
lockfiles / every Cargo.lock is current (pull_request) Successful in 40s
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 1m10s
standards workspaces build + test / eoc-rs (pull_request) Successful in 2m0s
standards workspaces build + test / joule-ui-rs (pull_request) Successful in 1m12s
standards workspaces build + test / jcp-rs (pull_request) Successful in 1m31s
standards workspaces build + test / joulehook-rs (pull_request) Successful in 1m11s
standards workspaces build + test / proof-rs (pull_request) Successful in 1m19s
standards workspaces build + test / sense-rs (pull_request) Successful in 1m12s
standards workspaces build + test / sandbox-rs (pull_request) Successful in 2m22s
workflow hygiene / every workflow supersedes its own queue (pull_request) Successful in 4s
standards workspaces build + test / smart-byte-rs (pull_request) Successful in 3m46s
The commit before this fixed five of them. They were written long before anyone read them, and the one in #190 — `jcp-runtime` citing `SPEC §4.10` in six places, with no §4.10 — survived a gate-enforcing, tested mechanism for months. Reading the tree once finds these; reading it every time is a check. `scripts/check-spec-refs.py` resolves every `SPEC §N` in a standard's `*.rs` against the numbered headings of the `SPEC.md` beside it. 1454 citations across 15 standards resolve today. Three decisions worth stating, because each is a way the check could have been written to find nothing: - Parents are not synthesised. A cited `§4` needs its own `§4` heading; a `§4.10` heading does not satisfy it. Otherwise a standard citing a section it never wrote is excused by a child it happens to have. - A citation resolves against the SPEC.md of its own directory. Every cross-standard citation in the tree today is a self-reference that names its standard for the reader ("JouleClaw SPEC §1.3", inside jouleclaw/), so this is right for all of them; the header says what to do instead if that ever stops being true, rather than loosening the check. - Sections of a `spec/*.md` subfile are not sections of `SPEC.md`. The self-test asserts the check can fail, in the four ways that matter: an unresolvable citation fails, both heading spellings (`## 4.` and `## §4`) are accepted, a child heading does not satisfy its parent, and one standard's section does not excuse another's citation. A regex that quietly stops matching would otherwise find nothing and exit 0 — the failure mode this repo has already met in gated and skipped tests. The workflow carries no `paths:` filter, deliberately. The check is a second of Python with no toolchain, and a correct filter would have to name every standard's `**/*.rs` and every `SPEC.md`; `standards-build.yml` records that `**`-prefixed globs do not match on this forge and that a gate which quietly fails to fire is worse than none, since it reports nothing and that reads as green. This is `check-wai-section-refs.py`'s complement, not a duplicate: that one checks WAI markdown against WAI markdown, this one checks every standard's code against its spec. Co-Authored-By: Claude Opus 5 <[email protected]>
45 lines
1.6 KiB
YAML
45 lines
1.6 KiB
YAML
name: spec citations resolve
|
|
|
|
# Every `SPEC §N` a standard's code cites is a section that standard's SPEC.md
|
|
# has. See the header of scripts/check-spec-refs.py for why: a citation to a
|
|
# section that does not exist reads as authority it does not have, and the three
|
|
# instances found so far were each discovered by reading, long after they were
|
|
# written.
|
|
#
|
|
# Deliberately NO `paths:` filter, for two reasons.
|
|
#
|
|
# The check is one Python pass over the tree — about a second, no toolchain, no
|
|
# cargo — so running it on every change costs less than describing when to run
|
|
# it. And a correct filter here would have to name every standard's `**/*.rs`
|
|
# plus every `SPEC.md`; `standards-build.yml` records that `**`-prefixed globs
|
|
# do not match on this forge the way they do elsewhere, and that a gate which
|
|
# quietly fails to fire is worse than no gate, because it reports nothing and
|
|
# everyone reads that as green. An unfiltered cheap check cannot fail that way.
|
|
#
|
|
# The self-test runs first and on its own line. A check that cannot fail is
|
|
# decoration, and this one would be easy to break into permanent silence — a
|
|
# regex that stops matching finds nothing and exits 0.
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
spec-refs:
|
|
name: Code cites no section its SPEC lacks
|
|
runs-on: linux
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: The check can fail (self-test)
|
|
run: bash scripts/check-spec-refs-selftest.sh
|
|
|
|
- name: Every SPEC citation resolves
|
|
run: python3 scripts/check-spec-refs.py
|