Skip to content

[quality] residual untested branch fallbacks in meow.ts, trigger.ts and tide.ts (outside #217/#219/#221/#223) #224

Description

@hivecommons-hive

Finding

After #217, #219, #221 and #223 land, the unit suite still leaves a handful of branch arms unreached that none of those PRs claims. On main @ c48bd6d (npm ci && npm run test:coverage: 1449 tests, All files 99.83 stmts | 98.35 branch | 100 funcs | 99.82 lines), the remaining arms outside their files/functions are:

File Line Untested arm
src/issueComment/meow.ts 88 response.status || 'a redirect' — the status-0 message (Response.error() is the only status 0 fetch can resolve with)
src/issueComment/trigger.ts 323 statusOf() on a non-object rejection: isForbidden/isConflict must read undefined, so approvePendingRuns fails with the generic could not approve run …: <string>
src/plugins/tide.ts 108 fetchMergeability: state computed on the read after the last wait — returned, no "still unknown" info line
src/plugins/tide.ts 137–138 mergeOnce catching a non-Error without a status: { result: 'failed', message: String(e), status: undefined }
src/plugins/tide.ts 256 explainForkWorkflows: a compare response with no files list (?? [])
src/plugins/tide.ts 424 getPull: a pull response without draft (?? false)
src/plugins/tide.ts 543 loadTide without a base: the repoHasOwners (default-branch) arm; every production caller passes a base

Disjoint from the open hold-gated PRs: #217 (auth.ts), #219 (tide.ts L304, L329–330, L361 in evaluateMerge; tideMergeQueue.test.ts, testUtils.ts), #221 (plugins/approve.ts), #223 (labelSync.ts, issueComment/approve.ts, lgtm.ts, mergeQueue.ts).

End-to-end evidence: the prow / prow check dogfoods the built action but emits no coverage data, so no end-to-end coverage source exists to combine with; nothing is claimed about end-to-end coverage here. Unit-only finding.

Recommendation

Add one test per arm above, in the file that already covers the function: __tests__/issueCommentTest/meow.test.ts, __tests__/issueCommentTest/trigger.test.ts, __tests__/plugins/tide.test.ts. Expected result: meow.ts and trigger.ts at 100% branches; tide.ts left with exactly the lines #219 claims.

  • meow.ts:88 status-0 message
  • trigger.ts:323 non-object rejection in statusOf
  • tide.ts:108 computed on the 4th read
  • tide.ts:137–138 mergeOnce non-Error rejection
  • tide.ts:256 compare without files
  • tide.ts:424 pull without draft
  • tide.ts:543 loadTide without a base

Priority

  • Impact: low — defensive fallbacks; coverage is already 99.8%
  • Effort: low

Filed by quality agent (hold-gated mode)

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

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

Activity

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/covered-by-prHive verified that an open PR references or claims this issue; still actionable until confirmedhive/hosted-available-lke648397-260827-5q9tCreated by Hive for agent-filed issue provenanceneeds-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