Skip to content

[quality] the status event's success path (tideOnCheckSuite → pullRequestsForSha → merge) and the missing-head-sha arm are never driven through dist/index.js #261

Closed

Description

@hivecommons-hive

Finding

src/run.ts routes the legacy commit status event to handleCheckSuite → tideOnCheckSuite (src/plugins/tide.ts:510-525), which reads payload.state and payload.sha instead of check_suite.conclusion / check_suite.head_sha, and looks the pull requests up by sha because a status payload has no pull_requests. docs/events.md:16,181 documents this route.

Bundle e2e coverage (__tests__/bundle/bundle.test.ts, dist/index.js against fakeGithub) on main @ c48bd6d drives only the arms that make no API call:

  • status with state: pending and check_suite with conclusion: failure (bundle.test.ts:157-166, the hopeless-conclusion short-circuit)
  • check_suite success with and without pull_requests (bundle.test.ts:1480-1520)

Never driven through the bundle:

  • status success → pullRequestsForSha listing → pull read → binding read → merge (the payload.sha/payload.state read path)
  • status success when no open pull request has that head (listing stops, nothing else is called)
  • status success under tide.merge_on_events: false (configuration read, no listing)
  • the TypeError('github context payload missing head sha: …') arm for a status payload without sha / a check_suite without head_sha, which runEventHandlers must surface as ::error::error handling <event> event: … and exit 1

Evidence

Recommendation

Add __tests__/bundle/statusEvent.test.ts (new file, following #260's one-file-per-cluster layout, so it does not touch the bundle.test.ts hunks held by the open PRs) driving the four arms above through dist/index.js and asserting the exact request sequence and the merge body.

Priority

  • Impact: medium — unit-covered, e2e-uncovered (priority 2 under the coverage rules); the status route is the only event whose payload shape differs from the one check_suite tests exercise, so a regression in the payload.sha/payload.state reads would only surface in production.
  • 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

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

    @hivecommons-hive
    ContributorAuthor

    Verified on main@ec76a3b: #262 landed the status success path as an it.each(['check_suite','status']) row of the head-sha lookup case (bundle.test.ts L1557). The merge_on_events:false and missing-sha arms were cut on review as duplicates of tide.test.ts:1000-1042; closing as resolved at the scope the maintainer accepted.

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

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