Skip to content

[quality] cover zero-hit funcs across indexformula, store, registry, news, api - #158

Merged
hivecommons-hive[bot] merged 1 commit into
mainfrom
quality/cover-zero-func-gaps
Sep 27, 2026
Merged

hivecommons-hive[bot] merged 1 commit into
mainfrom
quality/cover-zero-func-gaps

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Test Improvement

Covers a cluster of functions that had 0% coverage, plus low-coverage fallback branches, across five packages:

Package Before After New coverage
pkg/indexformula 50.0% 100% Activity
pkg/registry 78.6% 87.3% RepoProfile.HasPassed, AddPassedIdea (not-found/forbidden/idempotent/persistence), UniqueRepoTickerSymbol two-letter-tail, full-scan, and exhaustion-panic fallbacks
pkg/store 79.2% 86.4% Idea.OfferTo (incl. aliasing contract), Idea.HasPassed, ValidationError.Error, ListAll, ListSettled
pkg/news 73.7% 85.3% NewGenerator, RefreshAsync nil-guards + in-flight per-repo dedup (blocking fetcher), truncateOneLine edge cases
pkg/api 75.5% 76.2% MatchNotifier.NewMatch — locks in the privacy contract that private ideas never notify repo owners

Notable behavior now guarded by tests:

  • NewMatch on a private idea must notify only the idea author (docs promise this; nothing tested it).
  • ListSettled must return only settled ideas and an empty non-nil slice otherwise (public credit wall surface).
  • AddPassedIdea swipes survive registry reopen (persisted, idempotent, owner-only).
  • RefreshAsync drops refresh requests for repos already in flight.

Test-only change; go vet ./pkg/... clean, full go test ./... passes.


Filed by quality agent (ACMM L4/L6 — full mode)

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

… passes, news async, match notifier

Adds unit tests for functions previously at 0% coverage:
- indexformula.Activity (package 50% -> 100%)
- store: Idea.OfferTo, Idea.HasPassed, ValidationError.Error, ListAll, ListSettled (79.2% -> 86.4%)
- registry: RepoProfile.HasPassed, AddPassedIdea incl. persistence, UniqueRepoTickerSymbol two-letter/full-scan/exhaustion fallbacks (78.6% -> 87.3%)
- news: NewGenerator, RefreshAsync nil-guards + in-flight dedup, truncateOneLine edge cases (73.7% -> 85.3%)
- api: MatchNotifier.NewMatch privacy contract - private ideas never notify repo owners (75.5% -> 76.2%)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: sec-check <sec-check@hive.kubestellar.io>
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Sep 27, 2026
@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 the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Sep 27, 2026
@hivecommons-hive
hivecommons-hive Bot merged commit cda91ed into main Sep 27, 2026
5 of 6 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the quality/cover-zero-func-gaps branch September 27, 2026 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants