Skip to content

test(bundle): drive the OWNERS filters-ignored arm (owners.ts parseOwners) through dist/index.js - #365

Merged
github-actions[bot] merged 3 commits into
mainfrom
quality/test-owners-filters-ignored
Oct 9, 2026
Merged

github-actions[bot] merged 3 commits into
mainfrom
quality/test-owners-filters-ignored

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Test Improvement

Adds __tests__/bundle/ownersFilters.test.ts (one new file; no change to helpers.ts, fakeGithub.ts, runBundle.ts or any existing test). It routes one OWNERS blob — approvers: [alice] plus a filters: { '.*': { approvers: [bob] } } section — and drives /approve through the committed dist/index.js twice:

  • alice (top-level approver): exit 0, approved label written, stdout carries OWNERS at OWNERS: filters are not supported; ignoring — the arm at src/utils/owners.ts:46 the bundle suite never reached.
  • bob (listed only inside the filter): exit 1, refused with Cannot approve the pull request: Error: bob is not an approver for any changed file, no label write — the filter grants nothing, as docs/prow-for-your-org.md:41 / docs/commands.md:321 promise.

Evidence: npm run test:coverage:e2e on main @ 3fc21f2 merged with all 44 open held PR heads (#230..#363) left owners.ts:46 at 0 e2e hits; with this file it reports DA:46,2. Unit coverage of the line was already 100 % (__tests__/utils/owners.test.ts). Both tests pass locally (Node v26.10.0, vitest 5.0.3); npx eslint clean.

Cluster claimed: src/utils/owners.ts parseOwners filters arm, via /approve on an issue_comment. Disjoint from the held OWNERS PRs (#283 root-OWNERS authorization, #320 truncated-tree probes, #328/#331 pullRequestOwners and issue-side fallback).

Related Issue

Closes #364


Filed by quality agent (hold-gated mode). Human review required.

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

…ners) through dist/index.js

__tests__/bundle/ownersFilters.test.ts serves one OWNERS blob with a top-level
approver and a filters section naming another, and drives /approve through the
bundle: the top-level approver still gets approved and the debug log notes the
ignored filters; the filter-only login is refused with no label write.

Closes #364

Signed-off-by: quality <quality@hive.kubestellar.io>
@hivecommons-hive
hivecommons-hive Bot requested a review from jpmcb as a code owner October 7, 2026 15:50
@hivecommons-hive hivecommons-hive Bot added the hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 7, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

Important

Held for human review by the hive's ACMM level gate.

This PR was opened by the "quality" agent while Hive policy required a human checkpoint for that agent. Non-outreach agents are held at ACMM L3–L5; the outreach agent is always held because it publishes project-facing communication.

Hive will keep the hold label until a human removes it. Operators can make a deliberate one-off release during an ACMM level change with release_level_holds=true, but level changes never release this hold automatically.

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

L49 alone reaches owners.ts:46. L61 reaches nothing new.

  • Drop ownersFilters.test.ts:61–74. The non-approver refusal is already covered at bundle.test.ts:629. Dropping it also removes the full comment-body pin at L73.

quality added 2 commits October 7, 2026 21:50
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

Addressed: dropped the filter-only approver refusal case (and its full comment-body pin). Merged main too (it brings #287's meow network fix, which is what build-test was failing on).


🐝 Hive Agent: quality | Instance: hosted-available-lke648397-260827-5q9t | SHA: unknown

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

@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

Addressed in 845a7a3: dropped the filter-only approver refusal case (and its full comment-body pin).

CI is green on the new head.


🐝 Hive Agent: quality | Instance: hosted-available-lke648397-260827-5q9t | SHA: 1f7d33c

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

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

Asks addressed; verified on current main (aa6a0f8) together with the other approved PRs.

@jeefy

jeefy commented Oct 9, 2026

Copy link
Copy Markdown
Member

/kind cleanup
/lgtm
/approve
/hold cancel

@github-actions github-actions Bot added kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. and removed hold Indicates that a PR should not merge because someone has issued a /hold command. labels Oct 9, 2026
@github-actions
github-actions Bot merged commit ae2650a into main Oct 9, 2026
10 checks passed
@mrbobbytables
mrbobbytables deleted the quality/test-owners-filters-ignored branch October 9, 2026 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[quality] the OWNERS filters accepted-but-ignored arm (owners.ts parseOwners) is never driven through dist/index.js

1 participant