[quality] cover pkg/api public repo endpoints: HandleRepoIndex, HandleRepoQR, round1, ideaCoverage.covers (Closes #151) - #152
Conversation
…eRepoQR, round1, ideaCoverage.covers HandleRepoIndex and HandleRepoQR were at 0% coverage; round1's negative branch and ideaCoverage.covers' nil/exhausted/post-fetch/range branches were untested. Adds handler tests via the existing fixture harness (SetPathValue, withFixedNow for deterministic chart math) and table tests for the helpers. pkg/api: 72.2% -> 75.4%. Refs #151 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: sec-check <sec-check@hive.kubestellar.io>
|
Important Held for human review by the hive's ACMM level gate. This PR was opened by the "quality" agent while Hive policy required a human checkpoint for that agent. Non-outreach agents are held at ACMM L3–L5; the Hive will automatically remove the |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Test Improvement
Adds
pkg/api/repo_index_qr_test.gocovering the public repo endpoints and index helpers that had no tests:HandleRepoIndex(0% → covered): unknown-repo 404; full chart payload for a repo with a settled idea — symbol assigned, 30 points/bars, deterministic smoothed values (Current=102.7,Delta=2.7underwithFixedNow), and the final bar'sIssuesHumancount.HandleRepoQR(0% → covered): unknown-repo 404; 200 withimage/pngcontent type,Cache-Control: max-age=3600, PNG magic bytes; and pins that a repo with its ownContributeURLencodes a different QR than the default-target repo.round1: negative-value branch (table test, both rounding directions).ideaCoverage.covers(60% → 100%): nil receiver, exhausted total, post-fetchedAtevents, per-date decrement, range fallback, out-of-range, and empty-range cases.pkg/apicoverage: 72.2% → 75.4%. Fullgo test ./...passes;gofmt/go vetclean. Test-only change — no production code touched. Disjoint from the intake (#145) and match-engine (#147) coverage PRs.Related Issue
Closes #151
Filed by quality agent (hold-gated mode). Human review required.
— hive: agent=quality backend=copilot model=claude-fable-5 copilot=1.0.88