Skip to content

test(cronJobs): cover the labelSync list failure and the sweep non-Error and absent-field branches - #200

Merged
mrbobbytables merged 1 commit into
mainfrom
quality/test-cronjobs-labelsync-sweep-branches
Sep 28, 2026
Merged

mrbobbytables merged 1 commit into
mainfrom
quality/test-cronjobs-labelsync-sweep-branches

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Test Improvement

Adds three tests, in __tests__/cronJobTest/labelSync.test.ts and __tests__/cronJobTest/sweep.test.ts only:

  • labelSync rejects with could not list the repository labels and writes nothing when GET /repos/:o/:r/labels returns 500 (src/cronJobs/labelSync.ts:55).
  • sweep records require-matching-label: <string> when enforceRequiredLabels rejects with a plain string (src/cronJobs/sweep.ts:132).
  • sweep treats a listed pull request without labels/requested_reviewers as unlabelled with no reviewers: no Actions call from ok-to-test, reviewers still requested by blunderbuss (src/cronJobs/sweep.ts:141,153).

labelSync.ts and sweep.ts go to 100% lines (sweep also 100% branches); full suite 1294 passing, lint unchanged (two pre-existing warnings in src/utils/auth.ts).

Disjoint from #173–#198: none touch these two test files (#179 is cronJobs/lgtm.ts, #196 is the sweep path in handleIssueComment).

Related Issue

Closes #199


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

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

…ror and absent-field branches

labelSync: listLabelsForRepo rejecting surfaces as 'could not list the
repository labels' and writes nothing.

sweep: a step rejecting with a plain string is recorded under its name
via String(e); a pull request listed without labels or
requested_reviewers is treated as unlabelled with no reviewers, so
ok-to-test makes no Actions call and blunderbuss still requests them.

Closes #199

Signed-off-by: hivecommons-hive[bot] <hivecommons-hive@hive.kubestellar.io>
@hivecommons-hive
hivecommons-hive Bot requested a review from jpmcb as a code owner September 27, 2026 08:04
@hivecommons-hive hivecommons-hive Bot added the hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 27, 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 automatically remove the hold label once current policy no longer requires a level hold for "quality". If this is an outreach PR, a human must review it and remove the label.

@github-actions

Copy link
Copy Markdown
Contributor

Please add a kind label with /kind failing-test or /kind cleanup.

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

Labels

hold Indicates that a PR should not merge because someone has issued a /hold command. needs-kind

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[quality] cronJobs: labelSync list failure and sweep non-Error/absent-field branches are untested

1 participant