Skip to content

test(bundle): drive tide's draft/files folds and sweep's labels fold through dist/index.js - #498

Open
hivecommons-hive[bot] wants to merge 1 commit into
mainfrom
quality/test-tide-optional-fields
Open

hivecommons-hive[bot] wants to merge 1 commit into
mainfrom
quality/test-tide-optional-fields

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Test Improvement

Files/functions claimed: __tests__/bundle/tideOptionalFields.test.ts (new, test-only). Targets src/plugins/tide.ts explainForkWorkflows (line 258, compared.data.files ?? []), src/plugins/tide.ts getPull (line 426, data.draft ?? false) and src/cronJobs/sweep.ts approveIfTrusted (line 141, pr.labels ?? []). No production code changes. Disjoint from #497 (approve.ts / meow.ts).

Three bundle cases, each serving the optional REST field absent and driving dist/index.js:

  • pull_request labeled lgtm whose GET /pulls/1 has no draft: treated as ready, squash-merged, no not mergeable (draft).
  • schedule lgtm job, fork 403, whose compare response has no files: nothing counted behind, the warning and comment name only the pull request's own workflow file, full request sequence asserted.
  • schedule sweep whose listing item has no labels: ::debug::sweep: #1 does not carry ok-to-test, no actions/runs read or approval, the rest of the sweep (blunderbuss review request) still runs.

Verification (local, this branch, main @ 1062ce7)

  • npx eslint __tests__/bundle/tideOptionalFields.test.ts clean
  • npm run test:coverage:e2e: 79 files / 490 tests pass (was 78 / 487); Branches 97.96% → 98.14% (1633 → 1636 / 1667); coverage-e2e/lcov.info no longer lists BRDA:258 or BRDA:426 under SF:src/plugins/tide.ts nor BRDA:141 under SF:src/cronJobs/sweep.ts
  • Unit suite untouched (npm run test:coverage already covered all three)

Related Issue

Refs #466 — this lands the folded tide/sweep optional-field finding (comment hive-finding-folded on #466); the remaining #466 items (approve.ts 228/230/415, meow.ts 88 dead arms) ship in #497, which closes it.


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

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

…through dist/index.js

tide.ts:258 (compare without files), tide.ts:426 (pull without draft) and
sweep.ts:141 (listing without labels) were only reached by the unit suite;
one bundle file now serves each optional field absent and asserts the fold.

Signed-off-by: quality <quality@hive.kubestellar.io>
@hivecommons-hive
hivecommons-hive Bot requested a review from jpmcb as a code owner October 17, 2026 04:28
@hivecommons-hive hivecommons-hive Bot added the hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 17, 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. Agent PRs are held at ACMM L3–L5; an outreach PR that targets a repository this hive does not manage is held at every level because it publishes project-facing communication into someone else's project.

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.

@github-actions

Copy link
Copy Markdown
Contributor

Please add a kind label with /kind feature, /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.

0 participants