Skip to content

fix: delegate coverage alias to shared test runner - #269

Merged
clubanderson merged 4 commits into
hivecommons:mainfrom
mendezr:fix/268-coverage-alias
Oct 19, 2026
Merged

clubanderson merged 4 commits into
hivecommons:mainfrom
mendezr:fix/268-coverage-alias

Conversation

@mendezr

@mendezr mendezr commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Route test:coverage through scripts/run-tests.mjs, sharing the 99/96/98 thresholds and test/** exclusion with npm test.
  • Add a regression guard requiring the shared runner without inline coverage flags.

Fixes #268

Validation

  • Confirmed the regression test fails against the old alias.
  • npm test: 347 passed on Node 24.22.0.
  • npm run test:coverage: 347 passed; all coverage thresholds met.
  • git diff --check passed.
  • Podman is not installed in this environment; validation ran locally.

— hive: backend=pi model=openai-codex/gpt-6.1-sol


🐝 Hive Agent: contributor | SHA: 3ff980d

Guard the coverage alias against inline flag drift so it uses the same thresholds and test exclusions as npm test.

Hive-Run: hivecommons#268
Hive-Plan: coverage-alias-single-source-of-truth
Hive-Spec: hivecommons#268#recommendation
Signed-off-by: mendezr <mendezr@users.noreply.github.com>
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Oct 17, 2026
@github-actions

Copy link
Copy Markdown

Welcome to the Hive Commons community!

Thanks for opening your first PR here! We're excited to have you contributing.

Before merge, please ensure:

  • DCO Sign-off — All commits signed with git commit -s (DCO)
  • PR Title — Starts with an emoji: ✨ feature | 🐛 bug fix | 📖 docs | 🌱 infra/tests | ⚠️ breaking

A maintainer will review your PR soon. Hope you have a great time here!

@kubestellar-prow kubestellar-prow Bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Oct 17, 2026
@hivecommons-hive hivecommons-hive Bot added author/clanker A contributor's own hive authored this PR under their login 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 sentinel-alert and removed dco-signoff: yes Indicates the PR's author has signed the DCO. labels Oct 17, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor
3ff980d

⚠️ Sentinel alert — maintainer review required

Hive flagged this PR (author @mendezr, head 3ff980d95084) because it matches behaviors that can override security controls, escalate privileges or damage the codebase. This is a heuristic, not an accusation — a maintainer should confirm the change is intended before it merges.

  • sensitive_path — changes 1 sensitive path(s) (Touches a sensitive path (OWNERS, workflows, policies, hive config, security docs, …))
    • package.json

Hive added the sentinel-alert label. While it is present, Hive will not approve this PR, apply LGTM/approval labels, or merge it through any auto-merge lane. Remove the label once reviewed; Hive will not re-apply it unless new commits are pushed. Tune paths and behaviors under sentinel in hive.yaml or the dashboard Security tab.

@hivecommons-hive hivecommons-hive Bot removed the role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) label Oct 17, 2026
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Oct 17, 2026
@hivecommons-hive hivecommons-hive Bot removed the dco-signoff: yes Indicates the PR's author has signed the DCO. label Oct 17, 2026

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — no findings from this perspective.

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

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — no findings from this perspective.

— hive: agent=ci-maintainer backend=copilot model=claude-fable-5.1

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — no findings from this perspective.

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

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — no findings from this perspective.

— hive: agent=ci-maintainer backend=copilot model=claude-fable-5.1

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — no findings from this perspective.

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

@hivecommons-hive hivecommons-hive Bot added stage/085-needs-decision A human decision is owed: sentinel alert, hold/needs-decision label, human-only rule or parked issue and removed stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 18, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor

Needs a decision, not a merge:

  • the reviewer swarm returned requires_human @e7a3a1f
  • reviewer question: @hivecommons/pluk OWNERS should confirm the package.json script change is intended (it moves test:coverage onto the stricter shared runner) and clear the sentinel-alert.
  • a sentinel alert is open on this PR
  • the automerge lane will not merge this unattended

Head: verdict requires_human @e7a3a1f, 4/4 checks green, DCO yes, sentinel alert, soak 30m0s elapsed.

Clear the cause and the hive re-evaluates on its next pass; the stage moves to stage/090-ready-for-human-merge or the merge queue on its own.

@clubanderson clubanderson left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maintainer review of the sentinel flag: the package.json change only delegates test:coverage to the existing shared runner (scripts/run-tests.mjs) and adds a test for it — intended. Clearing sentinel-alert.

@kubestellar-prow kubestellar-prow Bot added the lgtm Indicates that a PR is ready to be merged. label Oct 18, 2026
@kubestellar-prow

Copy link
Copy Markdown

LGTM label has been added.

DetailsGit tree hash: 154770b4bbabe716233e617d2f0a2e9d13d0b1d8

@hivecommons-hive hivecommons-hive Bot added 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 sentinel-alert and removed dco-signoff: yes Indicates the PR's author has signed the DCO. stage/085-needs-decision A human decision is owed: sentinel alert, hold/needs-decision label, human-only rule or parked issue labels Oct 18, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor
4c1b359

⚠️ Sentinel alert — maintainer review required

Hive flagged this PR (author @mendezr, head 4c1b359e0ed1) because it matches behaviors that can override security controls, escalate privileges or damage the codebase. This is a heuristic, not an accusation — a maintainer should confirm the change is intended before it merges.

  • sensitive_path — changes 1 sensitive path(s) (Touches a sensitive path (OWNERS, workflows, policies, hive config, security docs, …))
    • package.json

Hive added the sentinel-alert label. While it is present, Hive will not approve this PR, apply LGTM/approval labels, or merge it through any auto-merge lane. Remove the label once reviewed; Hive will not re-apply it unless new commits are pushed. Tune paths and behaviors under sentinel in hive.yaml or the dashboard Security tab.

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Routing only — the change is unchanged since the maintainer approval.

Head 4c1b359 and e7a3a1f are both Merge branch 'main' into fix/268-coverage-alias; git diff main...4c1b359 is byte-identical to the diff at the approved head 3ff980d (only package.json + test/run-tests-runner.test.js, same hunks). The sentinel re-fired on the merge commit, not on new content.

Re-verified against the tree: the new alias npm run build && node scripts/run-tests.mjs matches what CONTRIBUTING.md:23 already documents (“npm run test:coverage is an explicit alias for the same check”), and scripts/run-tests.mjs:17-23 applies the 99/96/98 thresholds with test/** excluded; engines.node >=22 means the Node-20 no-coverage fallback is never reached. Looks correct to me.

@clubanderson: the only action needed is clearing sentinel-alert again. I have not changed any labels.

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

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — no findings from this perspective.

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

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — no findings from this perspective.

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

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — no findings from this perspective.

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

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — no findings from this perspective.

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

@hivecommons-hive hivecommons-hive Bot added stage/085-needs-decision A human decision is owed: sentinel alert, hold/needs-decision label, human-only rule or parked issue and 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 Oct 18, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor

Needs a decision, not a merge:

  • the reviewer swarm returned requires_human @4c1b359
  • reviewer summary: correctness requires human: package.json test:coverage now runs the same command as test (node scripts/run-tests.mjs). The shared runner (scripts/run-tests.mjs:17-28) applies stricter thresholds (99/96/98 vs the removed 98/93/97) on Node >= 22 but drops all coverage flags on Node < 22, so on Node 20 test:coverage silently runs without any coverage gate where it previously failed on unknown flags. New test asserts the script string. Not a defect in the diff, but a maintainer should confirm the Node<22 fallthrough is acceptable for a script named test:coverage.
  • reviewer summary: security requires human: PR carries the sentinel-alert label and two hive-sentinel comments (heads 3ff980d and 4c1b359) because it edits a package.json script. The change removes inline coverage flags and delegates to the in-repo runner; no new commands, network, or permissions. Routed to a human per sentinel policy; the open needs-decision comment already names @hivecommons/pluk OWNERS.
  • a sentinel alert is open on this PR
  • the automerge lane will not merge this unattended

Head: verdict requires_human @4c1b359, 4/4 checks green, DCO yes, sentinel alert, soak 30m0s elapsed.

Clear the cause and the hive re-evaluates on its next pass; the stage moves to stage/090-ready-for-human-merge or the merge queue on its own.

@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Oct 19, 2026
@clubanderson

Copy link
Copy Markdown
Member

Hub-admin review: the reviewer's only concern (Node < 22 would run test:coverage without a coverage gate) is moot — package.json declares "engines": { "node": ">=22" } and CI runs 22/24/26, so Node 20 is outside the supported range. On every supported Node the alias now enforces the stricter shared 99/96/98 thresholds with the test/** exclusion, which is exactly what #268 asked for. Pure test plumbing, no policy change; sentinel-alert is just the package.json sensitive-path heuristic. Branch was BEHIND — updated from main; merging once CI re-runs green.

/lgtm
/approve

@kubestellar-prow kubestellar-prow Bot added the lgtm Indicates that a PR is ready to be merged. label Oct 19, 2026
@kubestellar-prow

Copy link
Copy Markdown

LGTM label has been added.

DetailsGit tree hash: 4a1d71e3e0072393fac7bcb03b88a9cc940f22b2

@kubestellar-prow

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: clubanderson

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 stage/050-review-pending Review swarm requested; awaiting a verdict for the current head and removed dco-signoff: yes Indicates the PR's author has signed the DCO. stage/085-needs-decision A human decision is owed: sentinel alert, hold/needs-decision label, human-only rule or parked issue labels Oct 19, 2026

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — no findings from this perspective.

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

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — no findings from this perspective.

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

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — no findings from this perspective.

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

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — no findings from this perspective.

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

@clubanderson
clubanderson merged commit b7a36e8 into hivecommons:main Oct 19, 2026
9 of 10 checks passed

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — no findings from this perspective.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author/clanker A contributor's own hive authored this PR under their login dco All commits are DCO signed-off lgtm Indicates that a PR is ready to be merged. sentinel-alert size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. stage/050-review-pending Review swarm requested; awaiting a verdict for the current head

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[quality] test-infrastructure: package.json test:coverage alias still gates 98/93/97 without test/** exclude (drifted from run-tests.mjs after #262)

2 participants