ci: add README↔action.yaml input/output parity guard#197
Merged
Conversation
Fixes #185. Adds a `lint-readme-parity` CI job that fails if any input or output declared in an action's `action.yaml` is missing from its README's `## Inputs` / `## Outputs` table, with `::error` annotations pointing at the offending `action.yaml`. Wired into the `CI - Required Checks` gate. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Code Coverage OverviewLanguages: Go, C# Go / code-coverage/testThe overall coverage remains at 50%, unchanged from the branch. C# / code-coverage/dotnetThe overall coverage remains at 100%, unchanged from the branch. Updated |
There was a problem hiding this comment.
Pull request overview
Adds a lint-readme-parity CI job that fails when an input/output declared in any action.yaml is missing from the matching README's ## Inputs / ## Outputs section, and wires it into the required-checks gate. Uses preinstalled yq + awk/grep, no new dependencies.
Changes:
- New
lint-readme-parityjob iterates*/action.yaml, extracts input/output names viayq, and verifies each appears (as`name`) inside the README's## Inputs/## Outputssection. - Adds the new job to the
ci-required-checksneeds:list and to theaggregate-job-checksresult list.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #185.
What
Adds a
lint-readme-parityCI job that fails if anyinput/outputdeclared in an action'saction.yamlis missing from its README's## Inputs/## Outputstable. It emits::errorannotations pointing at the offendingaction.yaml, and is wired into theCI - Required Checksgate (needs+ theaggregate-job-checksresult list). The check usesyq(preinstalled on theubuntu-latestrunner image) for theaction.yamlside andawk/grepfor the README side — no new dependencies, runs on every event withcontents: readonly.Parity audit (acceptance criterion: one bullet per action)
I read every
action.yamlagainst itsREADME.md. Result: zero parity drift found — every declared input/output is already documented with matchingrequired/default:job-results,check-namedocumented; required/default match. ✅app-id,app-private-key,pr-number,dry-runall documented. ✅older-than,keep-n-tagged,package,dry-rundocumented. ✅app-id,app-private-key,projectdocumented. ✅pr-number,merge-method,dry-rundocumented. ✅github-tokendocumented. ✅app-id,app-private-key,github-token,working-directorydocumented. ✅installed-skillsdocumented. ✅go-version,github-token+ outputgo-versiondocumented. ✅config-file,delete-other-labelsdocumented. ✅changed,updated-skillsdocumented. ✅issue-numberandissue-urldocumented (the issue flaggedissue-urlas "unknown" — it is in fact already documented). ✅So the READMEs are already in good shape; the durable value of this PR is the guard that keeps them that way and catches the "silent drift" #185 describes (e.g. a future
agents:-style input added toaction.yamlwithout a README row).Validation
actionlint .github/workflows/ci.yaml— clean for this change (the two pre-existingcode-qualitypermission-scope warnings at lines 213/629 are unrelated to this job and stem from actionlint's allowlist not yet knowing that scope).::errorannotations + non-zero exit).Notes / trade-offs
ci.yaml(self-contained, matching the repo's job style and thezizmorprecedent) rather than introducing a new.github/scripts/convention.action.yamlname must be documented) — it does not flag README rows with no matchingaction.yamlentry, to avoid false positives on intentionally-documented effective defaults (e.g.cleanup-ghcr-packagespackage).