Skip to content

[quality] scripts: add regression suite for netlify-ignore.sh - #6844

Closed
hivecommons-hive[bot] wants to merge 1 commit into
mainfrom
quality/test-netlify-ignore
Closed

hivecommons-hive[bot] wants to merge 1 commit into
mainfrom
quality/test-netlify-ignore

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Test Improvement

Adds scripts/test_netlify-ignore.sh — a self-contained bash regression suite for scripts/netlify-ignore.sh.

Why

netlify-ignore.sh is wired into netlify.toml:

ignore = "/bin/bash scripts/netlify-ignore.sh"

and runs on every Netlify build. It exits 0 to SKIP a build (for chore/hive-snapshot* branches) and 1 to 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 untested scripts/ 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):

  • BRANCH is chore/hive-snapshot-2026-09-09
  • BRANCH is bare chore/hive-snapshot
  • HEAD is a hive snapshot (BRANCH empty)
  • Both BRANCH and HEAD are hive snapshots

Proceed cases (exit 1):

  • Regular feature branch (feat/add-a-page)
  • main
  • Empty env (scheduled Netlify build)
  • Middle-substring guard: docs/hive-snapshot-notes proceeds (pins that the glob is prefix-anchored)

Diagnostic contract:

  • Debug preamble [netlify-ignore] BRANCH=… present on both proceed and skip

Runs locally

$ bash scripts/test_netlify-ignore.sh
Result: 10 passed, 0 failed

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.sh only). 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 .mjs set) 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

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] <[email protected]>
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

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 approved-direction label — and remove the hold label here.

@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Sep 9, 2026
@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

@netlify

netlify Bot commented Sep 9, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for kubestellar-docs ready!

Name Link
🔨 Latest commit 3dbfbe1
🔍 Latest deploy log https://app.netlify.com/projects/kubestellar-docs/deploys/6aa1ebac7ff5520009b9dcde
😎 Deploy Preview https://deploy-preview-6844--kubestellar-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@kubestellar-prow kubestellar-prow Bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Sep 9, 2026
@kubestellar-prow

Copy link
Copy Markdown

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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions 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.

@kubestellar-prow kubestellar-prow Bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Sep 9, 2026
@kubestellar-prow kubestellar-prow Bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 10, 2026
@kubestellar-prow

Copy link
Copy Markdown

PR needs rebase.

Details

Instructions 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.

@clubanderson clubanderson removed the hold label Sep 11, 2026
@clubanderson

Copy link
Copy Markdown
Member

Direction acknowledged by hub admin (approved-direction added on #6842); releasing the #5117 hold. This hive runs at ACMM L6 and may act on its own findings.

@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

Superseded — regression suite for netlify-ignore.sh already landed

A functional scripts/test_netlify-ignore.sh is on main today (100 lines, 6 assert_case invocations), covering the exit-code contract via both the BRANCH and HEAD env-var surfaces. Verified locally on current main:

$ bash scripts/test_netlify-ignore.sh
OK (snapshot-via-BRANCH)
OK (snapshot-via-HEAD)
OK (main-builds)
OK (empty-envs-build)
OK (chore-hive-only-builds)
OK (unrelated-chore-builds)
All netlify-ignore.sh cases passed.

This PR's version (118 lines, 10 run_case invocations) does add four cases the main suite doesn't have — two debug-preamble assertions, a bare-chore/hive-snapshot prefix case, and a middle-substring negative — but the branch is 569+ commits behind main and the essential contract (skip on both trigger surfaces, proceed on regular branches / main / empty envs) is already guarded. Rebasing the 118-line file into a supplemental "additional cases" append would land ~40 net new lines and would require rewriting the file to fit main's assert_case helper.

Closing as superseded rather than opening a fresh rebased PR — the pushable ROI is small and #411 (10 shell tests never invoked by CI) is a much higher-value follow-up on the same silent-skip theme in the sibling repo.


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

— hive: agent=quality backend=copilot model=claude-opus-4.7

@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

🔀 Scanner merge sweep: this PR has substantive merge conflicts with the base branch (update-branch returned 422). Conflicts touch content/code files, not just lockfiles, so automated resolution was skipped. Please rebase onto the latest base branch to make this mergeable.

🐝 Hive Agent: scanner | Instance: hosted-kubestellar-console-4vkt | SHA: 2194ce593e

— hive: agent=scanner backend=copilot model=claude-fable-5

@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

[scanner] Merge-conflict sweep: this PR has true conflicts with main (update-branch API rejected). Please rebase onto origin/main and resolve; skipping in this cycle.

🐝 Hive Agent: scanner | Instance: hosted-kubestellar-console-4vkt | SHA: 2194ce593e

— hive: agent=scanner backend=copilot model=claude-fable-5

@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

⚠️ Scanner merge-sweep: this PR has a true merge conflict — the base branch already contains an equivalent version of the file(s) this PR adds/modifies (superseded by previously merged work). Conflict is in substantive content, so skipping automated resolution. Recommend rebasing against base or closing if superseded.

🐝 Hive Agent: scanner | Instance: hosted-kubestellar-console-4vkt | SHA: 2194ce593e

— hive: agent=scanner backend=copilot model=claude-fable-5

@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

Superseded — scripts/test_netlify-ignore.sh already landed on main (100-line variant with slightly different comment style and case coverage). Local run:

$ bash scripts/test_netlify-ignore.sh
...
All netlify-ignore.sh cases passed.

This PR (118 lines) adds a competing implementation of the same suite, which would double-run the same coverage on every CI. Closing rather than force-rebase; the on-main version already delivers the coverage the PR was opened for.


quality agent (ACMM L4/L6 — full mode)

@hivecommons-hive hivecommons-hive Bot closed this Sep 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

copilot dco-signoff: yes Indicates the PR's author has signed the DCO. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants