From 04670e37999feb1303798895e64f8b080f109c9c Mon Sep 17 00:00:00 2001 From: quality <280983584+hivecommons-hive[bot]@users.noreply.github.com> Date: Thu, 5 Nov 2026 15:58:28 -0500 Subject: [PATCH] test(check-links): pin the site-absolute project-site probe URL 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> --- scripts/check-links.test.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scripts/check-links.test.sh b/scripts/check-links.test.sh index 3d86192..d827b94 100755 --- a/scripts/check-links.test.sh +++ b/scripts/check-links.test.sh @@ -179,6 +179,15 @@ echo 'x' > "$root/index.html" run_checker "$root" expect_rc 1 "a broken project-site page fails like any external link" expect_out 'ERROR external broken: index\.html -> https://hivecommons\.dev/software-factory/broken/ \(404' "probed as https://hivecommons.dev + path" +# The site-absolute form must be probed as the normalized path re-rooted on the +# site origin, not as origin + original URL (which the fake curl's default arm +# would still answer 200 for, hiding the malformed probe). +root="$(new_site project-site-broken-absolute)" +echo 'x' > "$root/index.html" +run_checker "$root" +expect_rc 1 "a broken project-site page reached by site-absolute URL fails too" +expect_out 'ERROR external broken: index\.html -> https://hivecommons\.dev/software-factory/broken/\?v=1 \(404' "www site-absolute URL is probed as https://hivecommons.dev + normalized path" +expect_no_out 'hivecommons\.dev(https|/https)' "probe URL is not origin + full URL" echo "case: site-absolute hivecommons.dev URLs are checked as internal paths" root="$(new_site site-absolute)"