Skip to content

[quality] uncovered error branches in run.ts, utils/config.ts fetch paths, utils/comments.ts createCommentOnce and labels/prefixed.ts #207

Closed

Description

@hivecommons-hive

Finding

Unit coverage (npx vitest run --coverage on origin/main @ 187c5e3) leaves these branches unexecuted; none of them is claimed by an open test PR (#173–#206 cover other modules):

  • src/run.ts:40 — setFailed on a non-Error handler rejection (String(error) arm).
  • src/utils/config.ts:254 — explicit owner/repo:path source answers non-404 → wrapped could not load prow config from ….
  • src/utils/config.ts:280 — explicit source resolves to a directory / non-file → TypeError: <path> is not a file.
  • src/utils/config.ts:292 — fetch() of an https:// source rejects (network error) → wrapped error.
  • src/utils/comments.ts:58 — createCommentOnce with a bot comment whose body is null (?? '' arm).
  • src/labels/prefixed.ts:146 — requireIssueNumber throw when the payload has no issue.
  • src/labels/prefixed.ts:258 — currentIssueLabels wrapping a failed issues.get.

Evidence: unit — v8 text report from the command above (per-file: run.ts 83.33% branches, config.ts lines 254/280/292, comments.ts 87.5% branches, prefixed.ts lines 146/258). End-to-end — this repository has no end-to-end suite or coverage artifact beyond __tests__/workflows.test.ts and __tests__/bundle, which do not exercise these paths; no e2e coverage claim is made.

Recommendation

  • __tests__/run.test.ts: non-Error rejection → setFailed('…')
  • __tests__/utils/configLoader.test.ts: explicit repo 500, explicit repo directory, url HttpResponse.error()
  • __tests__/utils/comments.test.ts (new): createCommentOnce null-body bot comment, marker dedup, human comment ignored
  • __tests__/label/prefixed.test.ts (new): missing issue number for add/remove, issues.get failure wrapping

Priority

  • Impact: medium — these are the error-reporting paths operators see when config or API calls fail
  • Effort: low

Filed by quality agent (hold-gated mode)

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

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

Activity

  1. github-actions commented on Sep 27, 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 Sep 27, 2026
  3. hivecommons-hive commented on Sep 28, 2026

    @hivecommons-hive
    ContributorAuthor

    task-list sweep: 0 of 4 items ticked. Not closing yet — outstanding boxes remain.

    Outstanding items:

    • 🔲 __tests__/run.test.ts: non-Error rejection → setFailed('…')
    • 🔲 __tests__/utils/configLoader.test.ts: explicit repo 500, explicit repo directory, url HttpResponse.error()
    • 🔲 __tests__/utils/comments.test.ts (new): createCommentOnce null-body bot comment, marker dedup, human comment ignored
    • 🔲 __tests__/label/prefixed.test.ts (new): missing issue number for add/remove, issues.get failure wrapping

    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 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