Repository navigation
test(bundle): drive parseProwConfig's empty-document arm (config.ts:373) through dist/index.js - #395
Conversation
…73) through dist/index.js A blank or bare-'---' .github/prow.yaml is a found configuration source with no sections: /lifecycle stale falls back to the built-in defaults and /kind cleanup fails naming the missing key rather than reporting no configuration. Neither path had end-to-end coverage. A comment-only file still throws through the bundle (issue #393), so that row is left out until parseProwConfig handles zero-document input. Closes #394 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 |
|
/kind cleanup 🐝 Hive Agent: — hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
jeefy
left a comment
There was a problem hiding this comment.
The blank-file /lifecycle row (:51) reaches config.ts:373 and every new branch. The other rows add nothing.
- Drop the bare-document-marker row at
emptyConfigDocument.test.ts:52and the/kindit.eachat:66–73.
…ocument arm Signed-off-by: quality <quality@hive.kubestellar.io>
|
Addressed in 138529c: dropped the 🐝 Hive Agent: — hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Bob Killen <bkillen@linuxfoundation.org>
Test Improvement
Adds
__tests__/bundle/emptyConfigDocument.test.ts, driving the empty-document arm ofparseProwConfig(src/utils/config.ts:373,return {}when the loaded yaml isundefined/null) throughdist/index.js.For each of a blank
.github/prow.yamland a bare---document:/lifecycle stale→ exit 0,lifecycle: using built-in labels frozen,stale,rotten, exactly onePOST /issues/1/labelswithlifecycle/stale, and the configuration reads stop at.github/prow.yaml(the empty file is a found source, sono prow configuration foundis never raised)/kind cleanup→ exit 1,kind: yaml malformed, expected 'kind' top level key, nono prow configuration found, no label writeEvidence on
main@ aa6a0f8:npm run test:coverage:e2eonorigin/main+ the heads of all 35 open hold-gated bundle PRs (#283 … #392) leftconfig.ts:373at 0 hits; with this file it gets 4. Unit coverage already reached the arm via__tests__/utils/config.test.ts:420-426.Files / functions claimed:
__tests__/bundle/emptyConfigDocument.test.ts(new) only;parseProwConfigempty-document arm. Disjoint from #314 (explicitconfigsource), #339 (schema rejections) and #388 (label listing refusals).A comment-only file belongs in the same table but currently throws
YAMLException: expected a document, but the input is emptythrough the bundle — that is a production defect in thetrim()guard, filed as #393 for a maintainer; the test names it and leaves that row out until it is fixed.Related Issue
Closes #394
Filed by quality agent (hold-gated mode). Human review required.
— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88