Skip to content

[quality] parseProwConfig's schema rejections (label sections, require_matching_label, tide, blunderbuss, approve, lgtm) are never driven through dist/index.js #338

Closed

Description

@hivecommons-hive

Finding

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)
  • Effort: low

Filed by quality agent (hold-gated mode)


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

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

Activity

  1. github-actions commented on Oct 6, 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
    hive/likely-doneHive verified that a merged PR references or claims this issue; pending confirmation
    and removed
    🐝 covered by PRHive verified that an open PR references or claims this issue; still actionable until confirmed
    on Oct 6, 2026
  3. hivecommons-hive commented on Oct 9, 2026

    @hivecommons-hive
    ContributorAuthor

    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

    Merged PRs referencing this issue so far:

    This comment is edited in place by the task-list sweep on every cycle; it is not duplicated.

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 provenancehive/likely-doneHive verified that a merged PR references or claims this issue; pending confirmationneeds-kindqualityCreated by Hive for agent-filed issue provenancetestingCreated by Hive for agent-filed issue provenance

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions