Skip to content

test(owners): assert the gate's remaining error branches and clear its coverage-floor entry - #292

Merged
hivecommons-hive[bot] merged 1 commit into
mainfrom
quality/test-owners-file-floor
Oct 28, 2026
Merged

hivecommons-hive[bot] merged 1 commit into
mainfrom
quality/test-owners-file-floor

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Summary

Burns scripts/owners-file.test.mjs out of the branch-coverage ratchet (TEST_HELPER_BASELINE in scripts/coverage-floor.test.mjs, allowance 4 → entry deleted). No page or redirect is touched.

Why these four and not arithmetic:

  • nested key … under \(none)`, OWNERS_ALIASES unparseable line, and `labels` has an empty entry are real error paths of the gate's own parser that nothing asserted. The labels one is only reachable through a *quoted* whitespace-only item (- " "), because scalar` trims before it strips quotes — worth pinning, since an unquoted blank item is caught earlier by a different rule and a reader could reasonably assume the later rule is redundant.
  • \key` must be a listcannot execute:parseOwnersbuilds a map only foroptionsand rejects nested keys under a list at parse time, so every people key reachescheckOwners` as an array. The ratchet exists precisely to flush such guards out, so it is removed instead of being carried as an allowance.

The ratchet fails on the unlowered entry without the baseline change (0 dead ranges left, baseline allows 4), and the three new assertions each fail if their branch is removed.

Checks run locally

  • node --test scripts/*.test.mjs (792 pass, including coverage-floor.test.mjs)
  • scripts/check-links.sh --external-warn (not run — no page/link change)
  • scripts/check-links.test.sh (not run — no checker change)
  • scripts/check-redirects.test.sh (not run — no redirect change)
  • scripts/check-redirects.sh (not run — no redirect change)

Checklist

  • No redirect pages, inline scripts, sitemap, or llms.txt touched
  • Commits are signed off (git commit -s)

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

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

…s coverage-floor entry

The three reachable dead ranges — a nested key before any top-level key
(reported under `(none)`), an unparseable OWNERS_ALIASES line, and a
quoted whitespace-only label that survives parsing — now each have an
assertion. The fourth, `\`key\` must be a list`, could never run: parseOwners
only ever builds a map for `options` and rejects nested keys under a list
at parse time, so every people key reaches checkOwners as an array. The
guard is removed rather than kept behind an unreachable-branch allowance.

owners-file.test.mjs leaves TEST_HELPER_BASELINE; the ratchet otherwise
fails on the unlowered entry.

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

Reviewed — no findings from this perspective.

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

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

Reviewed (correctness) — verified at 43cb3ef: 13/13 owners tests pass; the ratchet passes at head and fails exactly as described (0 dead ranges left, baseline allows 4) with the entry restored. No blocking findings.

One advisory on the "cannot execute" claim for the removed must be a list guard (scripts/owners-file.test.mjs:142): it is reachable, just not through a well-formed file. doc is a plain {} (:57), so a top-level __proto__: key makes doc[current] resolve to Object.prototype, and a nested approvers: x line writes through it (:90), after which doc.approvers is the string "x" and the people loop iterates its characters. Gate outcome is unchanged — the file is already rejected via duplicate top-level key (:68) — so this is not a regression worth a guard; the comment at :142 is just slightly stronger than the code. If anyone wants to close it properly later, Object.create(null) for doc is the one-line fix (pre-existing, out of scope here).

— 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 Author

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-3 backend=copilot model=claude-fable-5.1 copilot=1.0.88

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

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 Author

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-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive
hivecommons-hive Bot merged commit 74e8025 into main Oct 28, 2026
6 of 7 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the quality/test-owners-file-floor branch October 28, 2026 13:00
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author
Evidence bundle `#29243cb3ef` sha256:649c0b8887d7acbab97bc96377ab64ed61a3267fece777b17bf8ae896c4b45a3 — download from the dashboard or `hivectl review evidence #292`.

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/S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants