Skip to content

test(bundle): drive loadTide's configured tide.labels arm (tide.ts:542) through dist/index.js - #473

Merged
mrbobbytables merged 1 commit into
mainfrom
quality/test-tide-labels-configured
Oct 15, 2026
Merged

mrbobbytables merged 1 commit into
mainfrom
quality/test-tide-labels-configured

Conversation

@hivecommons-hive

@hivecommons-hive hivecommons-hive Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Test Improvement

Adds one scenario to __tests__/bundle/mergeGateLabels.test.ts driving loadTide's configured-tide.labels arm (src/plugins/tide.ts:542, config.tide.labels === undefined false) through the compiled dist/index.js, on a pull_request labeled event with tide:\n labels: [lgtm] in prow.yaml:

  • [lgtm] on a base whose tree carries a root OWNERS → merged pr #1 (squash) and the tree is never read — the configured list replaces the [lgtm, approved] default

This is the "replaces the default list" / "skipped entirely when tide.labels is configured" promise in docs/automatic-merging.md:317-340 that was previously unit-only. The missing approved verdict is already covered by bundle.test.ts, and wildcard / case-insensitive matching goes through matchesLabelPattern, already driven by the missing_labels case in the same file.

Test-only change; no src/ or dist/ edits.

Related Issue

Refs #466

@hivecommons-hive
hivecommons-hive Bot requested a review from jpmcb as a code owner October 13, 2026 23:33
@hivecommons-hive hivecommons-hive Bot added the hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 13, 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.

@github-actions

Copy link
Copy Markdown
Contributor

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

jeefy
jeefy previously requested changes Oct 14, 2026

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

All four cases reach only tide.ts:542's configured-tide.labels arm (genuinely new: mergeGateLabels.test.ts only configures missing_labels).

  • Keep tideLabelsConfigured.test.ts:71–84 (a configured [lgtm] replaces the OWNERS default and the tree is never read). Drop :57–69 (missing approved is covered by bundle.test.ts:561) and :86–97/:99–110 (wildcard and case-insensitive matching go through matchesLabelPattern, driven by mergeGateLabels.test.ts:50).
  • :1–55 copy mergeGateLabels.test.ts:1–48 almost line for line. Add the kept case to that file instead.

…2) through dist/index.js

No bundle scenario configured a valid tide.labels list, so loadTide's
probe-skip arm sat at 0 in the e2e coverage run (coverage-e2e/lcov.info
BRDA:542,83,1,0) and every 'missing <pattern>' verdict came from the
default lists. Add one scenario to mergeGateLabels.test.ts, which already
carries the pull_request labeled scaffold:

- [lgtm] on an OWNERS-bearing base: merges without reading the tree
  (the configured list replaces the [lgtm, approved] default)

The 'missing approved' verdict is covered by bundle.test.ts, and wildcard
and case-insensitive matching go through matchesLabelPattern, already
driven by the missing_labels case in the same file.

Refs #466

Co-authored-by: quality <quality@hive.kubestellar.io>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Bob Killen <bkillen@linuxfoundation.org>
@mrbobbytables
mrbobbytables force-pushed the quality/test-tide-labels-configured branch from 7473883 to 1a4eb49 Compare October 14, 2026 00:56
@mrbobbytables

Copy link
Copy Markdown
Member

Addressed review: dropped the missing approved, wildcard and case-insensitive cases and the new file; the kept [lgtm]-replaces-default case now lives in mergeGateLabels.test.ts alongside the missing_labels case. Rebased on main.

@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

🔒 Hold-gate integrity: branch changed while hold-gated — fresh review required

This PR's branch moved while it sat hold-gated: the head recorded when the hold was applied was 7473883b8609, but the branch now sits at 1a4eb49e4a36. The diff a reviewer saw under the hold is no longer the diff that would merge, so auto-merge is blocked and the hold label has been re-applied.

Commits not present in the hold-time snapshot (1):

  • 1a4eb49e4a36 by mrbobbytables — test(bundle): drive loadTide's configured tide.labels arm (tide.ts:542) through dist/index.js

Authors not in the hold-time author set: mrbobbytables

A human should review the FULL diff at the current head — a rebase or force-push renames every commit, so everything above needs eyes even if it looks familiar. Removing the hold label after that review is the fresh approval: the guard has re-pinned its snapshot to the current head, so a clean lift re-opens the merge lanes.

@mrbobbytables
mrbobbytables dismissed jeefy’s stale review October 15, 2026 14:48

Dismissing stale review: the PR was revised after this review (commit post-dates it) and now implements the requested restructuring (single case, folded into the existing test file, fixture adjusted). Stack of #467–#482 verified locally: 78 bundle files / 481 tests pass, eslint clean.

@mrbobbytables
mrbobbytables merged commit d51aeb3 into main Oct 15, 2026
13 checks passed
@mrbobbytables
mrbobbytables deleted the quality/test-tide-labels-configured branch October 15, 2026 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants