You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[quality] parseProwConfig's schema rejections (label sections, require_matching_label, tide, blunderbuss, approve, lgtm) are never driven through dist/index.js #338
src/utils/config.ts validates every section of prow.yaml at parse time (normalizeSection/normalizeValues, normalizeRequireMatchingLabel, normalizeTide, normalizeBlunderbuss, normalizeApprove, normalizeLgtm) and the top-level shape check in parseProwConfig. Every one of those rejection arms is unit-tested (__tests__/utils/config.test.ts; npm run test:coverage on main @ 3fc21f2 reports 100 % lines for the file) but none is reached by the bundle suite:
e2e evidence: npm run test:coverage:e2e on main @ 3fc21f2 (Node v26.10.0, vitest 5.0.3, 142 tests in __tests__/bundle): src/utils/config.ts 68.78 % lines. Uncovered: L327 (non-mapping top level), L405/421/426 (malformed label section, invalid color, malformed value), L433–468 (every require_matching_label field check), L488–506 (tide field checks), L532–551 (blunderbuss field checks), L567/572 (approve), L581/585 (lgtm), L692/696 (isStringList/isLabelList element predicates), L370 (unknown-top-level-key debug).
unit evidence: same revision, npm run test:coverage: 100 % lines on the file.
So the shipped bundle has never been shown to turn a malformed .github/prow.yaml into the could not get labels from yaml: Error: <source>: <field> … failure that docs/ describe, nor to refuse the label write when it does.
Disjoint from the held PRs on this file: #314 (source tiers: L206/225/236–282), #293 (normalizeHold/normalizeSweep: L353/365/519–527/592–612). fetchUrl (L288–301) stays out of scope for the reason #314 gives (needs a TLS origin).
Recommendation
add __tests__/bundle/configSchemaArms.test.ts: route a malformed .github/prow.yaml for each rejection arm above, run /kind cleanup through dist/index.js, assert exit 1, the could not get labels from yaml annotation naming Codertocat/Hello-World:.github/prow.yaml and the field, and no POST /issues/1/labels; plus one green run with an unknown top-level key next to a labels mapping to reach the L370 debug arm
Priority
Impact: medium — unit-covered, not end-to-end (priority 2 under the lane's coverage rules)
task-list sweep: 0 of 1 items ticked. Not closing yet — outstanding boxes remain.
Outstanding items:
🔲 add __tests__/bundle/configSchemaArms.test.ts: route a malformed .github/prow.yaml for each rejection arm above, run /kind cleanup through dist/index.js, assert exit 1, the could not get labels from yaml annotation naming Codertocat/Hello-World:.github/prow.yaml and the field, and no POST /issues/1/labels; plus one green run with an unknown top-level key next to a labels mapping to reach the L370 debug arm
Activity
github-actions commentedon Oct 6, 2026
Please add a kind label with
/kind failing-testor/kind cleanup.hivecommons-hive commentedon Oct 9, 2026
task-list sweep: 0 of 1 items ticked. Not closing yet — outstanding boxes remain.
Outstanding items:
__tests__/bundle/configSchemaArms.test.ts: route a malformed.github/prow.yamlfor each rejection arm above, run/kind cleanupthroughdist/index.js, assert exit 1, thecould not get labels from yamlannotation namingCodertocat/Hello-World:.github/prow.yamland the field, and noPOST /issues/1/labels; plus one green run with an unknown top-level key next to alabelsmapping to reach the L370 debug armMerged PRs referencing this issue so far:
This comment is edited in place by the task-list sweep on every cycle; it is not duplicated.