Skip to content

🐛 fix(automerge): warn once per author and repo for unsearchable contributor search - #18089

Merged
hivecommons-hive[bot] merged 2 commits into
v5from
fix/18059-autopromo-422-warn
Nov 13, 2026
Merged

hivecommons-hive[bot] merged 2 commits into
v5from
fix/18059-autopromo-422-warn

Conversation

@Danathar

Copy link
Copy Markdown
Contributor

Summary

Fixes #18059

TunaOS logged contributor-lane auto-promotion search cannot see repository for this author 15 times in 10m, so it self-reported as unclassified_error_repeated. #17151 had already stopped the same pair being re-asked and re-warned on every sweep. The WARN was still keyed per (author, repository) pair, though, so the number of warnings grew with authors × repositories:

  • one repository the App cannot see (renamed, deleted or private) warned once for every contributor whose PRs were evaluated, and
  • one author GitHub refuses to search warned once for every hive repository.

Change

  • noteContributorUnsearchable still remembers each refused pair for contributorUnsearchableTTL, so search skipping is unchanged.
  • It now logs WARN only when neither the author nor the searched repository has warned before in this process. Every other refusal logs at Debug. That caps the warnings by distinct causes instead of the pair product.
  • A new contributorUnsearchableWarned set on Engine holds author:<login> / repo:<owner/repo> keys. Like the TTL map, it is reset once it grows past 4096 entries.

Tests

🤖 Generated with Claude Code

— hive: backend=claude model=claude-opus-5-5


🐝 Hive Agent: contributor | SHA: d1cb42780

…ributor search

The contributor-lane 422 warning was keyed per (author, repository) pair,
so one repository the App cannot see warned once for every contributor,
and one unsearchable author warned once for every hive repository. TunaOS
logged it 15 times in 10m and self-reported it as unclassified_error_repeated.

Refusals are still remembered per pair for the TTL, but WARN now fires only
when neither the author nor the searched repository has warned before;
everything else logs at Debug.

Fixes #18059

Hive-Run: #18059
Hive-Plan: selfreport-unclassified-error-repeated
Hive-Spec: contributor-lane-auto-promotion#unsearchable-warn-once
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Danathar <Danathar@users.noreply.github.com>
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Nov 13, 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 kellyaa 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/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Nov 13, 2026
@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Mutation testing

✅ Resolved: no surviving or uncovered mutants in changed files on the current head.

Verdict: pass (#17349).

The mutation run on #18089 left both `len(...) > 4096` resets in
noteContributorUnsearchable surviving as `>=`. Add a boundary test: a
map holding exactly 4096 entries is kept, and one past the cap is reset.
Each `>=` mutant now fails the test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Danathar <Danathar@users.noreply.github.com>
@Danathar

Copy link
Copy Markdown
Contributor Author

The mutation report's two surviving mutants were the len(...) > 4096 resets at automerge_contributor_unsearchable.go:64 and :67. 4dac447 adds TestNoteContributorUnsearchableResetsOnlyPastCap. It checks that a map holding exactly 4096 entries is kept and that one past the cap is reset. I applied each >= mutation by hand and the new test fails on both. The package tests pass.

🤖 Generated with Claude Code


🐝 Hive Agent: contributor | SHA: 4dac447d5

@kubestellar-prow kubestellar-prow Bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Nov 13, 2026
@hivecommons-hive
hivecommons-hive Bot merged commit 3349b85 into v5 Nov 13, 2026
79 of 83 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the fix/18059-autopromo-422-warn branch November 13, 2026 18:19
@hivecommons-hive

Copy link
Copy Markdown
Contributor

Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor.

Evidence bundle `#180894dac447` sha256:d20eb4f79e9af05ac6115027e94d7f3e75a6cbc96aa16ce4fc8191a48160dee8 — download from the dashboard or `hivectl review evidence #18089`.

hivecommons-hive Bot pushed a commit that referenced this pull request Nov 13, 2026
…ributor search (#18089)

* 🐛 fix(automerge): warn once per author and repo for unsearchable contributor search

The contributor-lane 422 warning was keyed per (author, repository) pair,
so one repository the App cannot see warned once for every contributor,
and one unsearchable author warned once for every hive repository. TunaOS
logged it 15 times in 10m and self-reported it as unclassified_error_repeated.

Refusals are still remembered per pair for the TTL, but WARN now fires only
when neither the author nor the searched repository has warned before;
everything else logs at Debug.

Fixes #18059

Hive-Run: #18059
Hive-Plan: selfreport-unclassified-error-repeated
Hive-Spec: contributor-lane-auto-promotion#unsearchable-warn-once
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Danathar <Danathar@users.noreply.github.com>

* 🧪 automerge: pin the 4096-entry cap on the unsearchable maps

The mutation run on #18089 left both `len(...) > 4096` resets in
noteContributorUnsearchable surviving as `>=`. Add a boundary test: a
map holding exactly 4096 entries is kept, and one past the cap is reset.
Each `>=` mutant now fails the test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Danathar <Danathar@users.noreply.github.com>

---------

Signed-off-by: Danathar <Danathar@users.noreply.github.com>
Co-authored-by: Danathar <Danathar@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.

[selfreport] unclassified_error_repeated: contributor-lane auto-promotion search cannot see repository for this author; l…

1 participant