Skip to content

test(check-links): pin the site-absolute project-site probe URL - #363

Merged
hivecommons-hive[bot] merged 1 commit into
mainfrom
quality/test-project-site-absolute-probe
Nov 5, 2026
Merged

hivecommons-hive[bot] merged 1 commit into
mainfrom
quality/test-project-site-absolute-probe

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Test Improvement

Adds one fixture case to scripts/check-links.test.sh so the project-site arm's site-absolute form is pinned, not just the root-relative one.

Why: the existing project-site case only checks that https://hivecommons.dev/software-factory/ is not reported as an internal miss and that the run ends with External failures: 0. The fake curl answers 200 fine for any URL it does not recognise, so the composition of the probe URL for that form was never asserted — a regression that re-roots origin + original URL (yielding https://hivecommons.devhttps://hivecommons.dev/…) kept the self-test at 132/132. The new case links https://www.hivecommons.dev/software-factory/broken/?v=1 and requires the error line to name https://hivecommons.dev/software-factory/broken/?v=1 exactly; under that mutant it fails (134 passed, 1 failed), unmutated it passes (135/0). It also covers the www. prefix that normalize_internal_path strips and keeps the query string through is_project_site_path.

No change to check-links.sh itself.

Fixes #362


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

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

The project-site case asserted the probe URL only for the root-relative
form; the site-absolute form was checked only for the absence of an
internal miss, which the fake curl's default 200 arm satisfies for any
URL. Re-rooting origin + original URL instead of origin + normalized
path kept the self-test at 132/132; this case fails under that mutant.

Fixes #362

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: quality <280983584+hivecommons-hive[bot]@users.noreply.github.com>
Co-authored-by: clubanderson <407614+clubanderson@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 kellyaa 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 5, 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.

Looks correct to me, and the test does what the body says.

  • Applied the PR and ran bash scripts/check-links.test.sh: 135 passed, 0 failed.
  • Mutated scripts/check-links.sh:225 from url="https://hivecommons.dev${local_path}" to url="https://hivecommons.dev${url}" (the origin + original-URL regression the body describes): the two pre-existing project-site cases still pass — the fake curl's *broken* arm (check-links.test.sh:35) answers 404 regardless of the host prefix — and only the two new assertions fail (133/2). So the new case is the only thing pinning the probe URL's composition.
  • is_project_site_path strips ?… before the prefix match (check-links.sh:28) and normalize_internal_path strips the https://www.hivecommons.dev origin (:76), so the www. + query-string path in the new fixture exercises both as claimed.

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

@hivecommons-hive

hivecommons-hive Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor Author

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

Review findings from reviewer (folded here because this head already carries its hive review):

Read scripts/check-links.sh at the reviewed head, not just the diff. The probe for a project-site link is composed at check-links.sh:223-225 (normalize_internal_path → is_project_site_path → url="https://hivecommons.dev${local_path}"), and normalize_internal_path strips the www. host at check-links.sh:75-76, so the new fixture exercises exactly the branch the body describes.

Reproduced the discrimination claim locally: with line 225 mutated to ${url} (origin + original URL) the self-test ends 133 passed, 2 failed, both failures being the two new assertions; unmutated it is 135 passed, 0 failed. expect_no_out already exists (check-links.test.sh:73), so no new helper was needed.

Test-only change, no edit to the checker. Looks correct to me.

Evidence bundle `#36304670e3` sha256:05f43c87bfb17b1bc345d15d7ba61d5f354b327cbea75c9d64e94cd2c3b666a6 — download from the dashboard or `hivectl review evidence #363`.

@hivecommons-hive
hivecommons-hive Bot merged commit 2bf277a into main Nov 5, 2026
6 of 7 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the quality/test-project-site-absolute-probe branch November 5, 2026 21:13
@hivecommons-hive hivecommons-hive Bot removed 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 5, 2026
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/XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[quality] check-links.sh: site-absolute project-site probe URL is never asserted by the self-test

0 participants