Repository navigation
test(bundle): drive parseProwConfig's schema rejections through dist/index.js - #339
Conversation
…index.js Adds __tests__/bundle/configSchemaArms.test.ts: 27 malformed .github/prow.yaml documents (label sections, colors, require_matching_label, tide, blunderbuss, approve, lgtm) each fail /kind cleanup naming the source and field with no label write, plus the unknown-top-level-key debug arm. src/utils/config.ts e2e lines 68.78% -> 82.92% under npm run test:coverage:e2e. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: quality <quality@hive.kubestellar.io>
|
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 Hive will keep the |
|
Deferring until #294 closes (fix is #287); no retries or pushes for this failure. 🐝 Hive Agent: — hive: agent=quality backend=copilot model=claude-fable-5.1 |
jeefy
left a comment
There was a problem hiding this comment.
25 of the 27 rows add a config.ts line of their own. Two don't:
configSchemaArms.test.ts:46and:47both hit the samemalformedSectionthrow (config.ts:405→431) and the same branches. Keep one.- Drop
:59(tide.missing_labels: [1]).:58already reaches the same throw (config.ts:493), and:67reaches the sameisStringListbranch.
Signed-off-by: quality <quality@hive.kubestellar.io>
|
Addressed: dropped the duplicate 🐝 Hive Agent: — hive: agent=quality backend=copilot model=claude-fable-5.1 |
|
Addressed in 137b926: dropped the second CI is green on the new head. 🐝 Hive Agent: — hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
|
/kind cleanup |
Test Improvement
Adds
__tests__/bundle/configSchemaArms.test.ts(new file only; importscomment,repo,tokenfrom./helpers,startfrom./fakeGithub,runBundle) — 28 runs of/kind cleanupthrough the committeddist/index.jsagainstfakeGithub, each routing a different.github/prow.yamlso thatparseProwConfiginsrc/utils/config.tsrejects it. Arms reached:parseProwConfig/normalizeSection/normalizeValues(L327, 405, 421, 426): a scalar top level, a scalar legacy section, a{ exclusive }mapping withoutvalues, a numeric value, a color with a leading#normalizeRequireMatchingLabel(L433–468): not a list, non-mapping rule, non-stringregexp, non-compilingregexp, emptymissing_label, non-booleanprs, non-stringmissing_commentnormalizeTide(L488–506): not a mapping, empty label name inlabels, non-string inmissing_labels(also reachesisStringList/isLabelListat L692/696), unknownmerge_method, non-booleanmerge_on_events, unknownmerge_queuenormalizeBlunderbuss(L532–551): not a mapping,request_count0,max_request_countbelowrequest_count, non-booleanignore_drafts, non-string inignore_authorsnormalizeApprove(L567, 572) andnormalizeLgtm(L581, 585): not a mapping, non-boolean flagunknown_plugin:sits next to alabelsmapping,/kind cleanupstill appliesEvery rejection asserts exit 1, a
could not get labels from yaml: Error: Codertocat/Hello-World:.github/prow.yaml: <field> …error annotation (or the<section>: …message for label sections, whose errors do not carry the source), and noPOST /issues/1/labels.Measured with
npm run test:coverage:e2eonmain@ 3fc21f2:src/utils/config.tse2e lines 68.78 % → 82.92 %; all files 77.9 % → 79.21 % lines, 70.82 % → 73.98 % branches. The remap still lists L327, L377–379 and L431–433 as unhit although the asserted messages prove those statements ran — they are multi-line statements, and the tsc+webpack map credits only their first line; noted so nobody chases them.npx eslintandtsc --noEmitclean on the new file; the suite is 28 tests / ~8 s.Disjoint from the held PRs touching this file: #314 (
__tests__/bundle/explicitConfigSource.test.ts, source tiers L206–282), #293 (holdSweepSettings.test.ts,normalizeHold/normalizeSweepL519–527/592–612).fetchUrl(L288–301) is left out for the reason #314 gives.Related Issue
Closes #338
Filed by quality agent (hold-gated mode). Human review required.
— hive: agent=quality backend=copilot model=claude-fable-5.1