Skip to content

✨ Customers step E: budgeted GitHub mention search on suggestion accept - #18903

Merged
kubestellar-prow[bot] merged 2 commits into
v5from
feat/18884-customers-mention-search
Nov 18, 2026
Merged

kubestellar-prow[bot] merged 2 commits into
v5from
feat/18884-customers-mention-search

Conversation

@clubanderson

Copy link
Copy Markdown
Member

Fixes #18884

Step E of the Customers RFC (#18742): when an owner or read-write user accepts a suggested person, run one budgeted GitHub search for that login so the new profile starts with history beyond what the hive holds.

What it does

  • Accept and AcceptInto in the customers adapter run the search in the background after the accept succeeds. The discovery sweep is unchanged and still gets no GitHub client; a test asserts the sweep makes zero searches and that its source does not reference the search.
  • Only GitHub logins are searched. A suggested email is never sent to GitHub. Bot logins are skipped.
  • Per-accept hard budget (named constants): 2 requests (mentions: then commenter:), one page of 30 each, at most 60 results.
  • Per-hour budget across accepts: customers.mention_search.max_requests_per_hour (default 10, capped at 60), rolling hour, unspent requests refunded.
  • Off switch: customers.mention_search.enabled, env HIVE_CUSTOMERS_MENTION_SEARCH_ENABLED, default OFF (it sends a login to GitHub and the RFC says the section adds no outbound path). Settings, Features toggle added, with the golden file, yaml example, env-vars and operator reference entries.
  • Shared quota: the call goes through the shared GitHub transport (REST accounting caller customers_mention_search, low pacing class). It stands down when API budget mode is not normal, the core or search bucket is low, or the secondary-limit slow-start caution window is engaged, and re-checks between the two requests. A rate-limit refusal or pacer shed ends the search.
  • Results become mentioned_in / commented_on edges (source github_search) on gh:issue: / gh:pr: refs. New Index.PutNew writes only edges the index does not hold, so a search never overwrites the time or source of an edge the poll made; hits are deduplicated per predicate and artefact.
  • Privacy: only repo, number, kind and updated time are read, never titles, bodies or comment text. The log line carries person id and counts only. GitHub errors are reduced to a class so the login or URL never reaches a log.

Tests

Budget exhaustion (per accept and per hour, including window roll and zero), off switch, quota-low backoff (before and between requests), accept-only call path (sweep makes none, email and refused accepts make none), dedupe, existing-edge preservation, log and result carry ids and counts only, the GitHub client query scoping and error scrubbing, the settings toggle round trip and markup.

Not run locally per repo process (no go build/test/vet); gofmt checked, docs and API-reference citation scripts pass. CI is the verdict.

🤖 Generated with Claude Code

Fixes #18884

Signed-off-by: Andrew Anderson <andy@clubanderson.com>
@kubestellar-prow kubestellar-prow Bot added dco-signoff: yes Indicates the PR's author has signed the DCO. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Nov 18, 2026
@github-actions

github-actions Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Open PR overlap check

Base branch: v5

Conflicts are checked with every PR merged onto the current tip of v5, so a PR that only needs a rebase is not reported as conflicting with its siblings.

PR Title Relation Files
#18873 🐛 needs-sha: exempt owner/detailed issues, overrideable waiver, visible hold on the row same files src/docs/operator-reference/README.md
src/pkg/dashboard/static/index.html
#18893 🐛 Hold decisions on a PR whose CI or review is still running on its current head same files src/pkg/dashboard/static/index.html
#18904 ✨ Expose the knowledge advisor rank-versus-holdout summary through a read-only route and Advisor card same files src/cmd/hive/main.go
src/pkg/dashboard/static/index.html
#18868 ✨ Sandbox Jobs: authenticated GitHub reads via a read-only hive relay CONFLICT src/cmd/hive/main.go
src/hive.yaml.example (conflict)

@hivecommons-hive

Copy link
Copy Markdown
Contributor

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

@clubanderson this PR is held at stage/071-needs-author and the hive will not merge it yet.

Failing checks:

  • build-go
  • build-hub (linux/amd64, true, false, 60)
  • build-hub (linux/arm64, true, true, 75)

Next: the hive does not push to your branch. Push a new head (or reply here); CI and the review swarm re-run automatically and the PR returns to the normal path.

…QueryMaxLen

Signed-off-by: Andrew Anderson <andy@clubanderson.com>
@kubestellar-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

Approval requirements bypassed by manually added approval.

This pull-request has been approved by:

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

The pull request process is described 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 github-actions Bot added the conflicts-with-open-pr Open PR has a merge conflict with another open PR label Nov 18, 2026
@kubestellar-prow
kubestellar-prow Bot merged commit accb8f9 into v5 Nov 18, 2026
98 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the feat/18884-customers-mention-search branch November 18, 2026 05:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. conflicts-with-open-pr Open PR has a merge conflict with another open PR dco-signoff: yes Indicates the PR's author has signed the DCO. lgtm Indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Customers step E: budgeted GitHub mention search on suggestion accept (follow-up to #18742)

1 participant