Skip to content

test(ci): make lint-readme-parity bidirectional#205

Merged
devantler merged 1 commit into
mainfrom
claude/readme-parity-bidirectional
Jun 1, 2026
Merged

test(ci): make lint-readme-parity bidirectional#205
devantler merged 1 commit into
mainfrom
claude/readme-parity-bidirectional

Conversation

@devantler
Copy link
Copy Markdown
Contributor

🤖 Generated by the Daily AI Assistant

Fixes #204.

What

Makes the lint-readme-parity CI job bidirectional. It already failed when a declared input/output was missing from a README (forward); this adds the reverse direction — every name in a README's ## Inputs / ## Outputs table first column must be a declared input/output in action.yaml.

Why

The forward-only check is blind to the drift a rename/removal leaves behind: dropping or renaming an input in action.yaml keeps the forward check green (nothing newly undocumented) while the README retains a now-phantom row. This repo has done exactly those changes — require-checks → aggregate-job-checks (v3), setup-copilot-skills → setup-agent-skills (v5), Codecov input/secret removal (v5) — so stale rows are a real, recurring risk. This finishes epic #181's goal of a library "mechanically inspectable for correctness, not just by social convention."

How

  • New table_names awk helper reads only the table's first column (skips the header and |---| separator rows; strips backticks) — so prose code-spans don't false-positive (the naive whole-section scan does, verified and rejected).
  • Forward logic preserved unchanged.

Validation (local, against this branch's tree)

  • actionlint 1.7.12no new findings (only the two pre-existing code-quality permission-scope warnings, unrelated).
  • yamllint 1.38.0 — clean.
  • Extracted the exact embedded script and ran it against all 14 actions:
    • clean tree → pass (exit 0);
    • injected a phantom README row → caught ('ghost' is documented in ## Inputs but not declared in …, exit 1);
    • injected an undocumented declared input → caught (forward still works, exit 1);
    • restored → pass.
  • The current tree has no reverse drift, so this lands green and only guards future changes.

Opened as a draft per the maintenance contract; promote to signal go.

Catch README rows that document an input/output no longer declared in
action.yaml (rename/removal drift) in addition to the existing
declared->documented check. Reads only the table's first column.

Fixes #204
Copilot AI review requested due to automatic review settings June 1, 2026 02:20
@github-project-automation github-project-automation Bot moved this to 🫴 Ready in 🌊 Project Board Jun 1, 2026
@github-code-quality
Copy link
Copy Markdown

github-code-quality Bot commented Jun 1, 2026

Code Coverage Overview

Languages: Go, C#

Go / code-coverage/test

The overall coverage remains at 50%, unchanged from the branch.

C# / code-coverage/dotnet

The overall coverage remains at 100%, unchanged from the branch.


Updated June 01, 2026 02:20 UTC
Code Coverage is in Public Preview. Learn more and provide us with your feedback.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Extends the existing lint-readme-parity CI job in .github/workflows/ci.yaml with a reverse direction check: every name appearing in a README's ## Inputs / ## Outputs markdown table first column must correspond to a declared input/output in the action's action.yaml. This catches stale README rows left behind by renames/removals, which the prior forward-only check missed. Per issue #204 / epic #181, this hardens the library so README↔action.yaml parity is mechanically enforced in both directions.

Changes:

  • Add section and table_names awk helpers; table_names reads only the markdown table's first column (skipping header and |---| separator rows, stripping backticks) to avoid false positives from prose code spans.
  • Refactor the forward check to consume cached declared_in / declared_out lists and add symmetric reverse-direction loops that emit ::error file=$readme::… annotations.
  • Update the success message to reflect the bidirectional guarantee.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@devantler devantler marked this pull request as ready for review June 1, 2026 05:58
@devantler devantler merged commit a91f6f1 into main Jun 1, 2026
46 checks passed
@devantler devantler deleted the claude/readme-parity-bidirectional branch June 1, 2026 06:15
@github-project-automation github-project-automation Bot moved this from 🫴 Ready to ✅ Done in 🌊 Project Board Jun 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

test(ci): make lint-readme-parity bidirectional (catch stale README rows)

2 participants