[quality] scripts: add regression suite for netlify-ignore.sh - #6844
[quality] scripts: add regression suite for netlify-ignore.sh#6844kubestellar-hive[bot] wants to merge 1 commit into
Conversation
netlify-ignore.sh is called by Netlify (netlify.toml line 8) on every deploy-preview build and decides skip (exit 0) vs proceed (exit 1). It had no tests — a regex regression silently either burns build minutes on hive snapshot branches or, worse, skips real PR builds. Adds scripts/test_netlify-ignore.sh, a self-contained bash harness (env -i to isolate each case) with 10 assertions covering: hive snapshot BRANCH, hive snapshot HEAD, both set, bare chore/hive-snapshot, regular feature branch, main, empty env, middle-substring guard against a well-meaning branch name, and preamble-present pins on both outcomes. Refs #6842 (partial fix: covers 1 of the 8 untested scripts identified in that issue — netlify-ignore.sh only; remaining 7 scripts still uncovered). Signed-off-by: kubestellar-hive[bot] <223556219+Copilot@users.noreply.github.com>
|
Important Held for human sign-off on the direction, not on the code. This PR's only tracked rationale is #6842, which the hive filed itself — issue #6842 was filed by kubestellar-hive[bot] and no human has acknowledged it. An agent-filed issue does not, on its own, establish that anyone agreed to the direction (hivecommons/hive#5117). The change may well be right; nothing here is a review of it. To release the hold, acknowledge the direction on that issue — comment on it, assign yourself, or add the |
|
[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 |
✅ Deploy Preview for kubestellar-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Hi @kubestellar-hive[bot]. Thanks for your PR. I'm waiting for a kubestellar member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
PR needs rebase. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Test Improvement
Adds
scripts/test_netlify-ignore.sh— a self-contained bash regression suite forscripts/netlify-ignore.sh.Why
netlify-ignore.shis wired intonetlify.toml:and runs on every Netlify build. It exits
0to SKIP a build (forchore/hive-snapshot*branches) and1to proceed. The script had zero test coverage — a regex regression silently burns Netlify build minutes on snapshot branches or, worse, skips real PR builds. This is the highest-risk of the 8 untestedscripts/shell scripts flagged in #6842 because it directly gates CI resource consumption.Coverage added
10 assertions, stdlib-only bash + coreutils (no framework, no network), each isolated with
env -i:Skip cases (exit 0):
chore/hive-snapshot-2026-09-09chore/hive-snapshotProceed cases (exit 1):
feat/add-a-page)maindocs/hive-snapshot-notesproceeds (pins that the glob is prefix-anchored)Diagnostic contract:
[netlify-ignore] BRANCH=…present on both proceed and skipRuns locally
Wired-into-CI is deliberately out of scope (see workflows note below).
Scope
Refs #6842 — partial fix (1 of 8 untested
scripts/covered —netlify-ignore.shonly). The remaining 7 scripts (update-version.js,generate-shared-config.ts,add-repo-breakdown.mjs,create-version-branches.sh,migrate-version.sh,verify-site-health.sh, and the leaderboard.mjsset) are still uncovered and #6842 remains open to track them. Not adding a workflow to run this file yet — that's a follow-up.Filed by quality agent (ACMM L4/L6 — full mode)
— hive: agent=quality backend=copilot model=claude-opus-4.7