Skip to content

test(config): pin org-tier lgtm/sweep survival in mergeProwConfig, object values without color, values without exclusive, and the no-unknown-keys debug silence - #535

Merged
mrbobbytables merged 1 commit into
mainfrom
quality/test-config-merge-tiers
Oct 21, 2026
Merged

mrbobbytables merged 1 commit into
mainfrom
quality/test-config-merge-tiers

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Test Improvement

Files / functions claimed: __tests__/utils/config.test.ts (parseProwConfig › label values and unknown-key logging; mergeProwConfig). Tests only; no src/, dist/ or docs change. Disjoint from every open held PR (#510–#533): none touches __tests__/utils/config.test.ts or src/utils/config.ts.

A single-operator mutation probe over src/utils/config.ts on main @ 88241f4 (258 mutants, details on #534) left two non-equivalent mutants alive against the full npx vitest related src/utils/config.ts --run set (70 files / 1498 tests) and three more that only __tests__/utils/labelCatalog.test.ts › "de-duplicates case-insensitively" happened to kill. This adds three tests that kill all six in config.test.ts itself:

line mutant test
740 lgtm: { ...base.lgtm, ...over.lgtm } → { ...over.lgtm, ...over.lgtm } mergeProwConfig › keeps the organization lgtm and sweep sections when the repository names neither, and lets the repository override them
741 sweep: { ...base.sweep, ...over.sweep } → { ...over.sweep, ...over.sweep } same
451 section.exclusive === undefined → === null label values › accepts an object value without a color, in a list and in a values mapping without exclusive
469 value.color === undefined → !== undefined same
472 value.color !== undefined → !== null same
421 unknown.length > 0 → >= 0 parseProwConfig › does not log when every top level key is known

The first two matter most: an organization-wide lgtm.bind_to_commit or sweep.lookback would have been silently dropped for every repository that ships its own prow.yaml, and nothing in the suite would have noticed.

Verification (this branch, local)

  • npx vitest run __tests__/utils/config.test.ts: 103 passed (100 before)
  • each of the six mutants applied in turn to src/utils/config.ts, npx vitest run __tests__/utils/config.test.ts: all six fail the run
  • npx eslint __tests__/utils/config.test.ts: clean

Related Issue

Fixes #534


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

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

…ject values without color, values without exclusive, and the no-unknown-keys debug silence

Three tests in __tests__/utils/config.test.ts, each killing a mutant of
src/utils/config.ts that the whole 'vitest related' set left alive or
that only labelCatalog.test.ts happened to catch:

- mergeProwConfig: an organization lgtm.bind_to_commit / sweep.lookback
  must survive a repository prow.yaml with no such section, and must be
  overridden when the repository names one (lines 740, 741)
- label values: { name } and { name, description } without a color
  parse, in a list and in a values: mapping that omits exclusive
  (lines 451, 469, 472)
- parseProwConfig: core.debug is not called when every top level key
  is known (line 421)

Fixes #534

Signed-off-by: quality <280983584+hivecommons-hive[bot]@users.noreply.github.com>
@hivecommons-hive
hivecommons-hive Bot requested a review from jpmcb as a code owner October 20, 2026 08:40
@hivecommons-hive hivecommons-hive Bot added the hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 20, 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.

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

Copilot review performed under the maintainer's explicit authorization to update, review, release reviewed holds, and merge eligible PRs in this cleanup.

Organization lgtm/sweep inheritance and repository overrides are both asserted. Optional label color/exclusive fields parse as intended. This is a regression-test change, not a production config fix.

Verified successful build-test, e2e-coverage and DCO results on head 15b904f. Any folded issue findings remain assigned to the canonical destinations in the updated scope tables.

@mrbobbytables mrbobbytables added kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. and removed hold Indicates that a PR should not merge because someone has issued a /hold command. needs-kind labels Oct 21, 2026
@mrbobbytables
mrbobbytables merged commit 57d84b3 into main Oct 21, 2026
17 checks passed
@mrbobbytables
mrbobbytables deleted the quality/test-config-merge-tiers branch October 26, 2026 20:19
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[quality] Pin organization lgtm/sweep inheritance and optional label-value parsing against regressions

1 participant