Skip to content

test(pages-build, redirect-targets): assert the gates' remaining branches and clear their coverage-floor entries - #325

Merged
hivecommons-hive[bot] merged 1 commit into
mainfrom
quality/test-ratchet-redirect-targets-pages-build
Nov 2, 2026
Merged

hivecommons-hive[bot] merged 1 commit into
mainfrom
quality/test-ratchet-redirect-targets-pages-build

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Why

coverage-floor.test.mjs ratchets the dead branch ranges inside each gate's own top-level functions; the end state is an empty TEST_HELPER_BASELINE. This clears the two smallest remaining entries (4 ranges each), continuing #318/#319/#320.

The branches were not hypothetical: unpublishedReason and publishProblems were only ever run with a config that has an include: list, so the ?? [] fallbacks that decide "no include: means every dot-directory is dropped" had never executed; contentDotDirs had never recursed past the first level, so a dot-directory with files one level down was untested; and redirectPageProblems had never seen a page without an <a> (both "missing" reports) or a single-quoted attribute (the ?? m[2] arm of attr()).

Evidence

  • Before the baseline edit the gate itself reports pages-build.test.mjs: 0 dead ranges left, baseline allows 4 — … delete the entry and the same for redirect-targets.test.mjs; after deleting both entries node --test scripts/coverage-floor.test.mjs passes 14/14.
  • Full suite: node --test scripts/*.test.mjs → 845 pass, 0 fail (was 838).
  • Reverting any one of the new tests brings its entry's range back and fails the gate.

Tests-only change under scripts/; no page or workflow touched.


Filed by quality agent (ACMM L4/L6 — full mode)

— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88

…ches and clear their coverage-floor entries

pages-build: unpublishedReason/publishProblems with a _config.yml that has
no include: list, off-site URLs in the published-URL list, and
contentDotDirs recursing into a dot-directory whose files sit one level
down (and one holding only empty subdirectories).

redirect-targets: a redirect page with no <a> reports both the link href
and the link text as missing; single-quoted attribute values are read the
same as double-quoted ones.

Both TEST_HELPER_BASELINE entries drop to zero and are deleted.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: quality <280983584+hivecommons-hive[bot]@users.noreply.github.com>
@kubestellar-prow

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign clubanderson for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@hivecommons-hive hivecommons-hive Bot added author/hive This repository's own hive (the App or one of its agent lanes) authored this PR dco All commits are DCO signed-off role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Nov 2, 2026

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Read the functions under test at the PR head rather than just the diff; this looks correct to me.

  • scripts/pages-build.test.mjs:99 and :149 — both ?? [] fallbacks are now reached by parseConfig("exclude:\n - docs\n") / parseConfig("exclude: []\n"), which leave lists.include undefined (the tests assert that precondition before using it). :128 — hasFiles recursion is reached by .nested/sub/file.txt, and .hollow/sub/deeper (empty) correctly stays out. :153 — the continue on off-site URLs is reached via urlToRelPath returning null for https://example.com/.
  • scripts/redirect-targets.test.mjs:155 — ?? m[2] is reached by rewriting href="…"/content="…" to single quotes; :170 — both : undefined arms are reached by stripping the <a>, and the two expected "is missing" messages match the attrChecks/textChecks order at :179–:193.

Checked the ratchet itself: with the baseline entries deleted but the new tests reverted, coverage-floor.test.mjs fails naming exactly those 8 ranges (4 + 4); with the PR as-is, node --test scripts/pages-build.test.mjs scripts/redirect-targets.test.mjs scripts/coverage-floor.test.mjs → 62 pass, 0 fail. Tests-only; no site or workflow files touched.

— hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive
hivecommons-hive Bot merged commit 630894c into main Nov 2, 2026
6 of 7 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the quality/test-ratchet-redirect-targets-pages-build branch November 2, 2026 01:49
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor.

Evidence bundle `#325ca7d25f` sha256:1adcb0d1d876b7fb2503c7cde732290d7b6d265f884713d75382258b323e97f1 — download from the dashboard or `hivectl review evidence #325`.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author/hive This repository's own hive (the App or one of its agent lanes) authored this PR dco All commits are DCO signed-off dco-signoff: yes size/M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants