Skip to content

Force the image version from the release tag, and gate accessibility in CI - #23

Merged
Robbie1977 merged 1 commit into
mainfrom
ci/workflows-version-and-a11y
Aug 11, 2026
Merged

Force the image version from the release tag, and gate accessibility in CI#23
Robbie1977 merged 1 commit into
mainfrom
ci/workflows-version-and-a11y

Conversation

@Robbie1977

Copy link
Copy Markdown
Contributor

Two workflow files that could not ride along in #22: a push touching .github/workflows/ is rejected wholesale unless the token carries the workflow scope, so they were carried on their own branch.

docker.yml — the image is told its own version. v4.2.3 shipped with package.json still reading 4.2.2, so /api/version reported 4.2.2 while the release was entirely correct and correctly deployed — a symptom indistinguishable from a failed rollout. Two complementary guards: Resolve app version passes the resolved tag into the build as APP_VERSION (empty on a branch push, where metadata-action reports the branch name and "main" is not a version, so package.json stays the fallback and existing behaviour is unchanged); and Release tag must match package.json fails a v* build outright when the two disagree. The first alone would hide the symptom without fixing the cause — anything reading the repository would still get the wrong number. APP_VERSION also feeds APP_USER_AGENT, so a missed bump mislabels this service in the MCP server's logs and in every fetched site's access log.

a11y-audit.yml — the conformance claim gets a control behind it. /accessibility makes a public claim under the Public Sector Bodies Accessibility Regulations 2018, and until now scripts/a11y-audit.mjs was a script someone had to remember to run. Builds, serves on 3210, runs the audit, gates on any violation, retains the JSON report 90 days as the statement's evidence trail. No working API key is needed because the audit only loads pages. GA variables are pinned empty deliberately — a CI run must not emit telemetry that pollutes the usage counts the DPIA relies on. Every job summary states that a clean run is a floor and not a certificate: axe-core sees roughly a third to a half of WCAG issues, and focus order, error identification and most of the 2.2 additions still need a person.

First run: WCAG audit green in 1m 59s. Checked against the pending v4.2.5 — package.json on #22's branch already reads 4.2.5, so the new assertion passes.

…in CI

Two workflow changes that could not ride along in PR #22, because a push
touching .github/workflows/ is rejected wholesale without a token carrying
the workflow scope.

docker.yml — v4.2.3 shipped with package.json still reading 4.2.2 and so
reported itself as 4.2.2 at /api/version while being entirely correct and
correctly deployed. The symptom is indistinguishable from a failed rollout.
Two complementary guards: resolve the version from the tag and pass it to
the build as APP_VERSION (empty on a branch push, so package.json remains
the fallback), and fail a v* build outright when package.json disagrees
with the tag. APP_VERSION also feeds APP_USER_AGENT, so a missed bump
mislabels this service in other people's logs.

a11y-audit.yml — /accessibility makes a public conformance claim under the
Public Sector Bodies Accessibility Regulations 2018, and until now
scripts/a11y-audit.mjs was a script someone had to remember to run. Builds,
serves on 3210 with no working key (the audit only loads pages), runs the
audit, keeps the JSON report for 90 days as the statement's evidence trail.
GA variables are pinned empty so a CI run cannot pollute the usage counts
the DPIA relies on. Every job summary states that a clean run is a floor,
not a certificate: axe-core sees roughly a third to a half of WCAG issues.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@Robbie1977
Robbie1977 merged commit 0374cb3 into main Aug 11, 2026
3 of 4 checks passed
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.

1 participant