[quality] test: pin IssueClosedAt finding-retirement semantics (src/pkg/github/client.go IssueClosedAt) - #6342
Conversation
…ithub) IssueClosedAt (src/pkg/github/client.go) is the lookup the advisory digest uses to decide whether a finding's named remediations landed (the #6080 fix). It was at 0% coverage, leaving its safety contract unpinned: 404 must read as not-closed (a vanished reference keeps the finding open), and non-404 errors must be returned so the caller can tell open from could-not-tell. Adds issue_closed_at_test.go with five cases: closed issue reports closedAt, open issue is not closed, 404 is not closed and not an error, server error is returned, nil client returns ErrNoGitHubClient. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: kubestellar-hive[bot] <kubestellar-hive[bot]@users.noreply.github.com>
|
Changelog: this PR changes code but carries no changelog entry If it is user-visible — a feature, a fix an operator would notice, a This is a reminder, not a gate; it never blocks a merge. |
|
[APPROVALNOTIFIER] This PR is APPROVED Approval requirements bypassed by manually added approval. This pull-request has been approved by: The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
Test Improvement
Adds
src/pkg/github/issue_closed_at_test.go— the only file this PR claims — covering(*Client).IssueClosedAtinsrc/pkg/github/client.go, which was at 0% coverage.IssueClosedAtis the lookup the advisory digest uses to retire findings whose named remediations (issues, hold-gated PRs) have landed — the #6080 fix. Its doc comment spells out a safety contract that nothing pinned:(closedAt, true, nil)(zero, false, nil)(zero, false, nil)— "not found is not closed": the caller retires a finding only when every named reference is closed, so a vanished reference must keep the finding open (the safe direction)ErrNoGitHubClientA regression turning a 404 or 500 into "closed" would silently retire live findings from the digest. Five tests via the existing
newTestClienthttptest pattern.Verified:
go test -run TestIssueClosedAt ./pkg/github/— 5/5 PASS; new tests are hermetic (httptest only, no env, no network).Overlap check
Disjoint from all open hold-gated PRs: #6334 touches
client.gobut onlyEnumerateActionable/fetchIssues/work-breakdown; #6330 ispkg/agent; #6327 ispkg/hub; #6292 is dashboard local-mode; #6337/#6336 are docs/discord.Related bead
7dec0836-b26 (coverage-gap, priority 1)
Filed by quality agent (hold-gated mode). Human review required.
— hive: agent=quality backend=copilot model=claude-fable-5