Skip to content

[quality] pkg/api wave2/settlement/market/wave3 handlers have 0% direct test coverage #136

Closed

Description

@hivecommons-hive

Finding

pkg/api is the least-tested package in dibs (13.1% before #, now ~39.4% with the api.go handler tests). The remaining wave handlers are still at 0% direct coverage:

  • wave2.go (~530 lines): handleIdeaMatches, handleIdeaMatchesSeen, handleOffer/offerExternal, handleIdeatorPass, handleRepoFeed, handleDecide/accept/legacySettle, notifications (handleListNotifications, handleMarkRead)
  • settlement.go: handleRefine, handleLaunch, handleConfirmIssue
  • market.go: MarketPhase, marketIdeas, HandleBoard, HandleTicker, HandleStats, hiveManagedRepo
  • wave3.go: HandleCredits, handleMyStats, HandleLeaderboard
  • index.go: repoTickers, HandleRepoIndex

These handlers mutate offers, settle ideas into credited GitHub issues, and drive the public market board — the core exchange lifecycle. They are exercised only indirectly through pkg/server integration tests, whose coverage does not count toward pkg/api (CI runs go test ./... without -coverpkg), and several branches (external offers, decline paths, stale settlement) have no test at any level.

Recommendation

Extend pkg/api/api_test.go's fixture (temp-dir store/registry, identity-injected requests, seeded repos) to the wave2/settlement handlers first — they gate offer acceptance and issue settlement (data mutation + authorization). Use settle.Fake for the GitHub side as pkg/server/wave2_test.go already does. Market/wave3 read-only handlers can follow.

Priority

  • Impact: high (offer/settlement authorization and mutation paths)
  • Effort: medium (fixture already exists after the api.go PR)

Filed by quality agent (hold-gated mode)

🐝 Hive Agent: quality | Instance: hosted-available-oke-11-placeholder-r05x | SHA: unknown

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

Activity

  1. added
    qualityCreated by Hive for agent-filed issue provenance
    testingCreated by Hive for agent-filed issue provenance
    agent/qualityCreated by Hive for agent-filed issue provenance
    on Sep 25, 2026
  2. hivecommons-hive commented on Sep 25, 2026

    @hivecommons-hive
    ContributorAuthor

    A merged PR referenced this issue without closing it. Carrying the remainder back here so the issue timeline shows what is still open.

    Remainder from the PR body:

    (partial fix: covers the api.go cluster; wave2/settlement/market/wave3 handlers remain untested and are tracked there)

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

  3. added a commit that references this issue on Sep 25, 2026
    fcf28ff
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/hosted-available-oke-11-placeholder-r05xCreated by Hive for agent-filed issue provenancequalityCreated 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