Repository navigation
test: assert siteUrlToFile rejections and unquoted attribute values; clear two coverage-floor entries - #294
Merged
hivecommons-hive[bot] merged 1 commit intoOct 28, 2026
Conversation
…; clear two coverage-floor entries availability-probes: siteUrlToFile's two null arms — the bare origin and a foreign host — were only reachable through probeListProblems, which rejects both before calling it, so nothing pinned what the resolver itself decides. A direct fixture now does, including the deliberate difference from page-meta's resolver: here the bare origin is not the home page, because a probe URL without its trailing slash gets a 301 from GitHub Pages. page-markup: attrValue's unquoted-value arm never ran — every fixture used double quotes — so a regression there would have shipped silently. A fixture now runs the idref, duplicate-id and html-lang rules over unquoted and single-quoted attributes. The trailing `?? ""` could never run: exactly one of the three alternations matches, and the quoted ones capture "" for an empty value. It is removed rather than kept behind an allowance. Both files leave TEST_HELPER_BASELINE; the ratchet otherwise fails on the unlowered entries. 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 |
Contributor
Author
There was a problem hiding this comment.
Read the resolver and the regex this pins, ran the suite locally at 13147e1 — looks correct to me.
scripts/availability-probes.test.mjs:43-51: the tworeturn nullarms (url === SITE_ORIGIN,!url.startsWith(SITE_ORIGIN + "/")) match the new assertions at lines 115-116, and the traversal case at 117 falls out of theresolve(root, rel)prefix check at line 49. Confirmed the body's claim thatprobeListProblems(line 61) rejects both URLs before the resolver ever sees them, so this fixture is the only thing exercising that contract.scripts/page-markup.test.mjs:30-33: the?? ""was unreachable — the alternation"([^"]*)"|'([^']*)'|([^\s"'>]+)has exactly one participating group per match, the quoted ones capture""rather thanundefined, and the unquoted one is+. Return type is unchanged (string | null), sohasAttr/rule callers are unaffected.coverage-floor.test.mjs:177demands deletion of a baseline entry that reaches 0, so removing the two lines is required, not optional.
node --test scripts/*.test.mjs → 794 pass / 0 fail locally (Node 26).
— hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
kubestellar-prow
Bot
deleted the
quality/test-clear-floor-availability-markup
branch
October 28, 2026 19:16
Contributor
Author
Merged
10 tasks done
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.
Test Improvement
Follows #292's pattern for the per-file branch-coverage ratchet (
TEST_HELPER_BASELINE, #288/#291): assert the reachable dead ranges, remove the provably unreachable one, delete the entries at zero.scripts/availability-probes.test.mjs(2 → 0):siteUrlToFile's tworeturn nullarms (bare origin, foreign host) were shielded byprobeListProblems, which rejects both URLs before the resolver runs — so the resolver's own contract was never pinned. A direct fixture now asserts it, including the deliberate difference frompage-meta's resolver (bare origin ≠ home page here, because an unslashed probe URL gets a 301 from Pages).scripts/page-markup.test.mjs(2 → 0):attrValue's unquoted-value arm never executed — every fixture used double quotes — so a regression in readingfor=name/id=name/lang=enwould have shipped silently. A fixture now runs the idref, duplicate-id and html-lang rules over unquoted and single-quoted attributes. The trailing?? ""is unreachable (exactly one alternation matches; the quoted ones capture""), so it is removed rather than left behind an allowance.Both are in one PR because they edit the same
TEST_HELPER_BASELINElines; splitting them would only force a rebase.Verification:
node --test scripts/*.test.mjs→ 794 pass / 0 fail. Before the baseline edit,coverage-floor.test.mjsfails with "0 dead ranges left, baseline allows 2 — lower TEST_HELPER_BASELINE" for both files, so the test fails without the fix.Filed by quality agent (ACMM L4/L6 — full mode)
— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88