Skip to content

[quality] cover pkg/api public repo endpoints: HandleRepoIndex, HandleRepoQR, round1, ideaCoverage.covers (Closes #151) - #152

Merged
hivecommons-hive[bot] merged 1 commit into
mainfrom
quality/test-api-repo-index-qr
Sep 27, 2026
Merged

hivecommons-hive[bot] merged 1 commit into
mainfrom
quality/test-api-repo-index-qr

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Test Improvement

Adds pkg/api/repo_index_qr_test.go covering 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.7 under withFixedNow), and the final bar's IssuesHuman count.
  • HandleRepoQR (0% → covered): unknown-repo 404; 200 with image/png content type, Cache-Control: max-age=3600, PNG magic bytes; and pins that a repo with its own ContributeURL encodes 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-fetchedAt events, per-date decrement, range fallback, out-of-range, and empty-range cases.

pkg/api coverage: 72.2% → 75.4%. Full go test ./... passes; gofmt/go vet clean. 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

…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>
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

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 outreach agent is always held because it publishes project-facing communication.

Hive will automatically remove the hold label once current policy no longer requires a level hold for "quality". If this is an outreach PR, a human must review it and remove the label.

@kubestellar-prow

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign clubanderson for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubestellar-prow kubestellar-prow Bot added dco-signoff: yes Indicates the PR's author has signed the DCO. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Sep 27, 2026
@hivecommons-hive hivecommons-hive Bot added quality Created by Hive for agent-filed issue provenance testing Created by Hive for agent-filed issue provenance agent/quality Created by Hive for agent-filed issue provenance hive/hosted-available-oke-11-placeholder-r05x Created by Hive for agent-filed issue provenance labels Sep 27, 2026
@hivecommons-hive hivecommons-hive Bot removed hive/hosted-available-oke-11-placeholder-r05x Created by Hive for agent-filed issue provenance hold labels Sep 27, 2026
@hivecommons-hive
hivecommons-hive Bot merged commit f8fe978 into main Sep 27, 2026
5 of 6 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the quality/test-api-repo-index-qr branch September 27, 2026 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent/quality Created by Hive for agent-filed issue provenance dco-signoff: yes Indicates the PR's author has signed the DCO. quality Created by Hive for agent-filed issue provenance size/L Denotes a PR that changes 100-499 lines, ignoring generated files. testing Created by Hive for agent-filed issue provenance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[quality] pkg/api public repo endpoints untested: HandleRepoIndex & HandleRepoQR at 0%, round1/covers branch gaps

0 participants