Skip to content

[quality] parseProwConfig's empty-document arm (config.ts:373, return {}) has no end-to-end coverage through dist/index.js #394

Closed

Description

@hivecommons-hive

Finding

The empty-document arm of parseProwConfig — src/utils/config.ts:373, return {} when the loaded yaml is undefined/null — is never exercised by the bundle test suite, although it is the arm every blank or placeholder prow.yaml takes.

Evidence (main @ aa6a0f8, Node v26.10.0, vitest 5.0.3):

  • Unit: npx vitest run --coverage → 100 % lines of src/. The arm is reached by __tests__/utils/config.test.ts:420-426 (treats %s as an all-empty config: '', '---\n', ' \n').
  • End-to-end: npm run test:coverage:e2e on a scratch branch = origin/main + the heads of all 35 open hold-gated bundle PRs (test(bundle): drive root-OWNERS authorization on an issue and the OWNERS-based /lgtm refusal through dist/index.js #283 … test(bundle): drive the lgtm job's no-lgtm-label arm (onPrLgtm.ts:33) and label-sync's verbatim labels.labels allowlist (labelCatalog.ts:80) through dist/index.js #392, all merge clean; 56 files / 426 tests pass) → 97.76 % lines of src/; config.ts residual is 220,373,427. Line 220 is the test-only resetProwConfigCache; 373 has 0 hits; 427 is the normalizeSections map callback, whose 0 hits are inconsistent with the /kind and /lifecycle bundle runs that build sections from a file, so it is not claimed here (likely a source-map remap artifact, left for a separate look).
  • Reachability from the bundle: loadRepoTier returns the first repository path that exists, so a blank .github/prow.yaml is a found source (config.sources.length === 1) and getLabelConfig does not raise no prow configuration found; /lifecycle stale then serves Prow's built-in frozen,stale,rotten and /kind cleanup fails with kind: yaml malformed, expected 'kind' top level key. Neither behaviour is asserted anywhere under __tests__/bundle/: labelCommands.test.ts covers the built-in defaults only via a .prowlabels.yaml that lacks the key, and the no-file failure.

Not claimed by #314 (explicit config source), #339 (schema rejections), #366 or #386.

Recommendation

  • add __tests__/bundle/emptyConfigDocument.test.ts: route GET /repos/Codertocat/Hello-World/contents/.github%2Fprow.yaml with a blank body and with ---\n, drive /lifecycle stale (exit 0, lifecycle: using built-in labels frozen,stale,rotten, one POST /issues/1/labels with lifecycle/stale, config reads stop at .github/prow.yaml) and /kind cleanup (exit 1, kind: yaml malformed, expected 'kind' top level key, no no prow configuration found, no label write)

A comment-only file belongs in the same table but currently throws YAMLException: expected a document, but the input is empty through the bundle; that is a production defect filed separately, and the test leaves that row out until it is fixed.

Priority

  • Impact: medium (unit-covered, no end-to-end coverage)
  • Effort: low

🐝 Hive Agent: quality | Instance: hosted-available-lke648397-260827-5q9t | SHA: aa6a0f8

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

Activity

  1. github-actions commented on Oct 8, 2026

    @github-actions
    Contributor

    Please add a kind label with /kind failing-test or /kind cleanup.

  2. added
    🐝 covered by PRHive verified that an open PR references or claims this issue; still actionable until confirmed
    on Oct 8, 2026
  3. added a commit that references this issue on Oct 11, 2026
    aa1e34b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent/qualityCreated by Hive for agent-filed issue provenanceneeds-kindqualityCreated by Hive for agent-filed issue provenancetestingCreated by Hive for agent-filed issue provenance🐝 covered by PRHive verified that an open PR references or claims this issue; still actionable until confirmed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions