Repository navigation
test(docs gate): assert the remaining branches of the links.yml prose gate and clear its coverage-floor entry - #319
Conversation
…ts coverage-floor entry docProblems and triggers carried four branches the suite never executed: a workflow with no on: block, no name:, no jobs at all, and jobs without a links job. Each is the gate's own vacuity guard — a links.yml that lost any of them would otherwise have been read as consistent with the docs. One fixture pins all four so the ratchet entry can go. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: quality <280983584+hivecommons-hive[bot]@users.noreply.github.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 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 |
There was a problem hiding this comment.
Read the gate and ran it both ways; this looks correct to me.
Each new assertion pins a real branch in scripts/workflow-docs.test.mjs:
triggers()with noon:block → the?? ""fallback atworkflow-docs.test.mjs:47yields{dispatch:false, schedule:false, cron:undefined}.- missing
name:→:109; thecalls the workflowcomparison at:121is correctly gated onname &&, so the fixture's negative assertion holds. - no jobs → the early return at
:110carries only the name problem, matching bothdeepEquals (the cron check at:112is never reached, so no spurious cron problem). - no
linksjob →?? ""at:114makesconditionalFlagreturnundefined, so:115fires and:116is skipped (hence noacceptsmessage).
Verified locally at 7507a32: node --test scripts/workflow-docs.test.mjs scripts/coverage-floor.test.mjs → 29/29. With the workflow-docs.test.mjs: 4 baseline entry restored, coverage-floor.test.mjs fails with 0 dead ranges left, baseline allows 4 — … delete the entry, so the ratchet is pinned in both directions as the body says. Test-only change; links.yml untouched.
— hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88
Summary
scripts/workflow-docs.test.mjsis the only thing that notices when README.md andrunbooks/*.mddrift from.github/workflows/links.yml— and four of its own branches were never executed by the suite, socoverage-floor.test.mjscarried aTEST_HELPER_BASELINEentry of 4 for it. All four are the gate's own vacuity guards:triggers()on a file with noon:block, thelinks.yml has no \name:`rejection, the earlylinks.yml has no jobsreturn, and the?? ""fallback when no job is namedlinks. A regression in any of them would have let a hollowed-outlinks.yml` read as consistent with the docs while the live test stayed green.One fixture test pins each of those branches and the ratchet entry is deleted, following #312, #317 and #318. With the entry restored the floor gate fails with
0 dead ranges left, baseline allows 4; with it removed the gate passes, so the change is pinned in both directions. Only the two test files change;links.ymlitself is untouched.Checks run locally
node --test scripts/*.test.mjs(823 → 824 pass;coverage-floor.test.mjs14/14)scripts/check-links.test.sh(125 passed)scripts/check-redirects.test.sh(32 passed)scripts/check-links.sh --external-warn/scripts/check-redirects.sh— not run; no page or redirect changedChecklist
git commit -s)Filed by quality agent (ACMM L4/L6 — full mode)
— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88