Repository navigation
ci: run markdownlint via npm script to exercise overridden re2js - #518
Conversation
The Markdown Lint workflow used DavidAnson/markdownlint-cli2-action which
bundles its own copy of markdownlint/re2js, completely bypassing the
`"re2js": ">=2.8.7"` override in package.json (overrides). As a result,
the CI job never validated that the locally installed markdownlint-cli2
works correctly with the pinned re2js version.
Replace the GitHub Action with:
1. actions/setup-node (same version used by typecheck.yml and build.yml)
2. npm ci — installs the exact locked tree including the overridden re2js
3. npm run lint:md — the repo's own lint:md script, already defined in
package.json and exercised locally
This makes CI exercise the same markdownlint-cli2 + re2js combination that
developers run locally, closing the gap identified in issue hivecommons#517.
Closes hivecommons#517
Hive-Run: hivecommons#517
Hive-Plan: correctness/ci-gate
Hive-Spec: review-backlog#correctness
Signed-off-by: SACHIN NAIK <[email protected]>
👷 Deploy request for hivecommons-docs pending review.Visit the deploys page to approve it
|
b2b4df7
|
There was a problem hiding this comment.
Decision needed: @clubanderson should decide whether to accept this workflow change as-is (the lint job still only triggers on README/CONTRIBUTING/docs/** path changes, so a re2js/package-lock bump never runs it) or require the paths: filter to also include package.json, package-lock.json and the workflow file itself.
Routing to a human: this edits .github/workflows/ and carries sentinel-alert. Workflow trust decisions belong to a CODEOWNER (.github/CODEOWNERS names @clubanderson / @KPRoche for /.github/workflows/).
The steps themselves look correct, but the change does not fully close #517 as filed:
- The lint job did not run on this PR.
.github/workflows/markdownlint-cli2.yml:3-9(unchanged) restrictspull_requesttopaths: README.md, CONTRIBUTING.md, docs/**/*.md, docs/**/*.mdx. This PR touches only the workflow file, so nomarkdownlintcheck-run exists on headb2b4df7(check-runs list: TypeScript & ESLint, Audit, unit tests, Lint and build, DCO). The newnpm ci+npm run lint:mdsteps are therefore still unexercised by CI — the same "local-only" condition #517 complains about. - A re2js bump still won't trigger it. #517's trigger was PR #516 (a
package.jsonoverride bump). With thepaths:filter unchanged, a futurepackage.json/package-lock.jsonchange does not run this job either, so CI still never validates the overridden re2js against the locked tree on the PR that changes it. Addingpackage.json,package-lock.jsonand.github/workflows/markdownlint-cli2.ymltopaths:would close that gap. - Scope note, not a defect:
package.json:15lint:mdalso globssrc/**/*.{md,mdx}, which the old action did not lint. There are currently no.md/.mdxfiles undersrc/onmain, so this is a no-op today, but it widens what the job will lint in future.
Verified: the actions/setup-node@949feb2… pin and node-version: "22" / cache: "npm" match typecheck.yml:26-30 exactly; npm ci + the repo's own script mirrors that workflow's pattern.
I have not approved or changed anything.
— hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88
There was a problem hiding this comment.
Decision needed: @clubanderson should decide whether this CODEOWNERS-protected workflow change (replacing the pinned markdownlint-cli2 action with setup-node + npm ci + npm run lint:md) is acceptable from a fork contributor; note the modified workflow did not run on this PR.
Change does what #517 asks, verified locally; routing because it edits .github/workflows/ from a fork and carries sentinel-alert.
What I checked at b2b4df7:
package.json:15defineslint:mdandpackage.json:85carries there2js >=2.8.7override, sonpm ci+npm run lint:mdreally does exercise the overridden re2js, which is the gap #517 names.actions/setup-node@949feb2…is the same pin used bybuild.yml:28,typecheck.yml:27,vitest.yml:27, etc. — consistent with repo convention.- Ran
npm ci && npm run lint:mdon a clean clone of this head:Linting: 85 files / Summary: 0 issues in 0 files. - The
lint:mdglob also includessrc/**/*.{md,mdx}, which the old action globs did not; there are currently no markdown files undersrc/, so no scope change in practice.
One thing a maintainer should know before merging: this PR's checks did not run the workflow it changes. markdownlint-cli2.yml:4-10 triggers only on paths: README.md, CONTRIBUTING.md, docs/**, and this PR touches only the workflow file — the markdownlint job is absent from the status rollup. The green checks here are the other workflows. The local run above is the only evidence the new job passes; if you want CI to self-validate, adding .github/workflows/markdownlint-cli2.yml to the paths: list would do it (optional).
I have not approved or merged anything.
— hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
Needs a decision, not a merge:
Head: verdict requires_human @b2b4df7, 4/4 checks green, DCO yes, sentinel alert, soak 30m0s elapsed. How to release it:
Clear the cause and the hive re-evaluates on its next pass; the stage moves to |
|
/lgtm Posted by @clubanderson from the Hive dashboard; the merge gate decides from here. |
|
@hivecommons-hive[bot]: changing LGTM is restricted to collaborators DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
/approve Posted by @clubanderson from the Hive dashboard; the merge gate decides from here. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: hivecommons-hive[bot] The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
@clubanderson approved head |
|
Merged by hive contributor-lane auto-merge: CI green for ≥30m, reviewer verdict not required, @clubanderson approved this head as the owner decision ( |
📌 Fixes
Fixes #517
📝 Summary of Changes
The Markdown Lint CI workflow used
DavidAnson/markdownlint-cli2-actionwhich bundles its own copy ofmarkdownlint/re2js, completely bypassing the"re2js": ">=2.8.7"override inpackage.json. This meant the CI job never validated the locally installedmarkdownlint-cli2against the pinned re2js version — the 'lints cleanly on re2js 2.9.1' claim in PR #516 was local-only.This PR replaces the GitHub Action with:
actions/setup-node(node 22, same astypecheck.yml/build.yml)npm ci— installs the exact locked tree including the overridden re2jsnpm run lint:md— the repo's own script, already defined inpackage.jsonThis makes CI exercise the same
markdownlint-cli2+re2jscombination that developers run locally, closing the correctness gap filed in #517.Changes Made
DavidAnson/markdownlint-cli2-actionwithsetup-node+npm ci+npm run lint:mdin.github/workflows/markdownlint-cli2.ymlChecklist
Security Considerations
— hive: backend=bob model=premium