Skip to content

[quality] cover pkg/github ETagCacheStats and MergeVerdictKey (0% → 100%) - #7554

Merged
clubanderson merged 1 commit into
v4from
quality/test-etagstats-mergeverdictkey
Sep 18, 2026
Merged

clubanderson merged 1 commit into
v4from
quality/test-etagstats-mergeverdictkey

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Test Improvement

Adds hermetic unit tests for two exported pkg/github contract functions that were at 0.0% coverage on main (9d44557):

Test-only change; no production code touched. Both functions now measure 100%; go test ./pkg/github -short passes.

Files claimed: src/pkg/github/etagcache_stats_test.go, src/pkg/github/merge_verdict_test.go (new files only) — disjoint from open PRs #7545/#7547/#7549/#7550.

Related Issue

Closes #7552


Filed by quality agent (hold-gated mode). Human review required.

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

go tool cover -func on main showed 0.0% for two exported contract
functions in pkg/github:

- ETagCacheStats (etagcache.go:109): exercised through etagCacheWrap
  and the existing etagServer helper so the test proves the stats come
  from the SHARED cache the transport chain installs — one charged
  fetch, one free 304 revalidation, hits/misses/entries deltas 1/1/1,
  with cleanup dropping the test's entry from the process-wide cache.
- MergeVerdictKey (merge_verdict.go:50): table test pinning the
  Repo"#"Number spelling for bare and owner/name repos — the shared
  key contract between the governor's verdict map and the dashboard
  lookup (#7478).

Closes #7552

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 kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Sep 18, 2026
@kubestellar-prow

Copy link
Copy Markdown
Contributor

[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 hanthor 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

@github-actions

Copy link
Copy Markdown
Contributor

Changelog: this PR changes code but carries no changelog entry
(no changelog.d/ fragment and no CHANGELOG.md edit).

If it is user-visible — a feature, a fix an operator would notice, a
security change, a migration, a deprecation, or anything breaking —
please add a fragment file changelog.d/<category>-<pr-or-slug>.md
containing exactly your entry (see changelog.d/README.md; the
category is one of added/changed/deprecated/fixed/security). Please
do not append to CHANGELOG.md's ## Unreleased directly — that
shared section is the merge-conflict generator fragments replaced
(#5675). If it is a refactor, a test-only change, or dependency
churn, no entry is needed and you can ignore this.

This is a reminder, not a gate; it never blocks a merge.

@kubestellar-prow kubestellar-prow Bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Sep 18, 2026
@hivecommons-hive hivecommons-hive Bot added quality testing agent/quality Approved by a Hive merger/owner for auto-merge on green CI hive/hosted-available-oke-11-placeholder-r05x Approved by a Hive merger/owner for auto-merge on green CI labels Sep 18, 2026
@clubanderson clubanderson removed the hold label Sep 18, 2026
@clubanderson
clubanderson merged commit 522593b into v4 Sep 18, 2026
58 of 63 checks passed
@clubanderson
clubanderson deleted the quality/test-etagstats-mergeverdictkey branch September 18, 2026 05:20
@github-actions

Copy link
Copy Markdown
Contributor

Thank you for your contribution! Your PR has been merged.

We'd love to hear how your experience was: share feedback

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent/quality Approved by a Hive merger/owner for auto-merge on green CI copilot dco-signoff: yes Indicates the PR's author has signed the DCO. hive/hosted-available-oke-11-placeholder-r05x Approved by a Hive merger/owner for auto-merge on green CI quality size/M Denotes a PR that changes 30-99 lines, ignoring generated files. testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[quality] pkg/github: ETagCacheStats and MergeVerdictKey have 0% test coverage

1 participant