Repository navigation
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
Conversation
…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>
|
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 Hive will keep the |
|
Please add a kind label with |
mrbobbytables
left a comment
There was a problem hiding this comment.
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.
Test Improvement
Files / functions claimed:
__tests__/utils/config.test.ts(parseProwConfig› label values and unknown-key logging;mergeProwConfig). Tests only; nosrc/,dist/or docs change. Disjoint from every open held PR (#510–#533): none touches__tests__/utils/config.test.tsorsrc/utils/config.ts.A single-operator mutation probe over
src/utils/config.tsonmain@ 88241f4 (258 mutants, details on #534) left two non-equivalent mutants alive against the fullnpx vitest related src/utils/config.ts --runset (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 inconfig.test.tsitself: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 themsweep: { ...base.sweep, ...over.sweep }→{ ...over.sweep, ...over.sweep }section.exclusive === undefined→=== nulllabel values› accepts an object value without a color, in a list and in a values mapping without exclusivevalue.color === undefined→!== undefinedvalue.color !== undefined→!== nullunknown.length > 0→>= 0parseProwConfig› does not log when every top level key is knownThe first two matter most: an organization-wide
lgtm.bind_to_commitorsweep.lookbackwould have been silently dropped for every repository that ships its ownprow.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)src/utils/config.ts,npx vitest run __tests__/utils/config.test.ts: all six fail the runnpx eslint __tests__/utils/config.test.ts: cleanRelated 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