Skip to content

✨ Customers: goal and satisfaction suggestions with the meetings model (opt-in) - #18806

Merged
kubestellar-prow[bot] merged 2 commits into
v5from
feat/customers-infer
Nov 17, 2026
Merged

kubestellar-prow[bot] merged 2 commits into
v5from
feat/customers-infer

Conversation

@clubanderson

Copy link
Copy Markdown
Member

PR 9 of the Customers series (RFC #18742), the last in the plan. It builds on PR 7's SafeGoal, which is already merged.

The owner asked for goals and satisfaction that hive infers and offers for confirmation. The data model, the provenance and the profile UI (confirm, edit, reject) were built in PRs 1 and 3. This adds the inference.

Decision for the owner: it is OFF by default

customers.inference.enabled defaults to false (env HIVE_CUSTOMERS_INFERENCE_ENABLED; a switch in Settings, Features). Unlike the rest of Customers, it sends text to a model: a customer's own issues, pull requests and approved mail go to the model configured for meetings. That text can be about people who never signed up, so I did not make it default on. Say the word and it flips; it is one default. It also needs customers.enabled and a meetings model that is an OpenAI-compatible endpoint or the Anthropic API.

What it does

  • The customers_inference optional sweep, every 30 minutes, makes no GitHub call. It reads at most three due customers per pass, only customers (a suggested person is never read), and leaves a person alone for 24 hours after a read and while their evidence is unchanged.
  • Evidence: the issues they opened (state, title, first 240 characters), the pull requests they authored (merged or not), and approved mail from their address, each with its reference. Meeting asks are not read: a meeting stores display names, never an identity, and a name never links.
  • Model route: the in-process meetings route (meetllm through betty.MeetLLM), the one the persona uses. Charged to a daily usage ledger of its own (kept seven days) with a 40,000 token budget; a spent budget ends the pass. An agent backend is not used.

Rules, each tested

Rule Test
Inputs are untrusted: cleaned, cut to 300 bytes, dropped whole on an address, an id or an ioscan finding, fenced with a fresh nonce; the system prompt says it is data TestSafeEvidence, TestInferencePromptFences..., TestInferencePromptCarriesNoPrivateFields...
The prompt carries no name, address, id, note or standing satisfaction level same
Output is bounded and typed: at most 3 short safe goals, each citing only evidence it was given; one level from the ordinal; a number is never a level; a mistyped reply changes nothing TestParseInferenceBoundsAndTypesTheReply
A confirmed or manual goal or level is never overwritten; a rejected suggestion is not offered again TestInferenceNeverOverwritesWhatAPersonOwns
A failed call or an unusable reply changes nothing and is not recorded as a pass; an unchanged person is not read again TestInferSkipsAndFailsSafely
At most three people per pass; a spent budget ends the pass; evidence excludes bots, the hive's own author, non-customers, mail awaiting approval and claimed addresses TestRunCustomersInferenceLimitsAndStopsOnBudget, TestCustomersEvidence...
Off by default; needs Customers on; the switch is owner-only TestCustomersInferenceDefaultsOffAndNeedsCustomers, TestGovernorFeatures_CustomersInferenceToggleRoundTrip

Audit: customer_inference with the person id, goal count and whether a satisfaction suggestion was filed. Never text. Nothing inferred leaves the hive.

Docs

Design page (status, signals, rules), security-model.md (the egress and what is done about it), operator reference, env vars, example config, changelog.

Refs #18742

🤖 Generated with Claude Code

…l (opt-in)

PR 9 of RFC #18742.

- pkg/customers: Infer reads one customer's cleaned, fenced evidence through a
  Completer and files suggestions only. A confirmed or manual value is never
  overwritten, a rejected suggestion is not offered again, there is no numeric
  score, the reply is bounded and typed, and a person is not read again within
  24 hours or while their evidence is unchanged.
- cmd/hive: the customers_inference optional sweep on the meetings model
  route, a daily token ledger of its own, at most three people per pass,
  audited without text.
- customers.inference.enabled, default off, with a Features switch.

Refs #18742

Signed-off-by: Andy 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 17, 2026
@github-actions

github-actions Bot commented Nov 17, 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
#18802 ✨ Customers: graph view, merge and split, and export same files src/docs/design/customers.md
src/pkg/customers/service.go
src/pkg/dashboard/static/index.html
#18800 ✨ Dashboard/API: set review.perspectives_source and agent sandbox image/block without editing config files same files src/pkg/dashboard/static-src/js/config-features.js
src/pkg/dashboard/static/index.html
#18778 ✨ Governor PRs by model: rework per backend and a per-effort breakdown same files src/pkg/dashboard/static/index.html
#18781 ✨ Spend and contributor run stats by model: add the canonical model name same files src/pkg/dashboard/static/index.html
#18782 ✨ Governor PRs by model: split closed-unmerged PRs into superseded, duplicate and other same files src/pkg/dashboard/static/index.html
#18779 ✨ Governor PRs by model: per-repository breakdown and weekly trend same files src/pkg/dashboard/static/index.html
#18785 ✨ PRs by model: list one model's pull requests same files src/pkg/dashboard/static/index.html
#18780 ✨ Governor PRs by model: what each model's PRs cost the hive to review same files src/pkg/dashboard/static/index.html
#18786 🐛 Claude model dropdown and price table: add Fable 5.2, Fable 5.1, Haiku 5.5 and the fable alias same files src/pkg/dashboard/static/index.html
#18793 🐛 Sessions: adopt a Codex or OpenCode login refreshed in a session back into the shared login same files src/docs/security-model.md
#18783 ✨ Evidence summary: change failures (reverts, reopened issues) per model same files src/pkg/dashboard/static/index.html

Refs #18742

Signed-off-by: Andy Anderson <andy@clubanderson.com>
@github-actions

Copy link
Copy Markdown
Contributor

Mutation testing

gremlins found 10 surviving mutant(s) in changed files: the code ran under tests, but changing it did not fail any test.

File Line Mutation
src/pkg/customers/infer.go 93 CONDITIONALS_NEGATION
src/pkg/customers/infer.go 113 ARITHMETIC_BASE
src/pkg/customers/infer.go 113 ARITHMETIC_BASE
src/pkg/customers/infer.go 113 ARITHMETIC_BASE
src/pkg/customers/infer.go 113 CONDITIONALS_BOUNDARY
src/pkg/customers/infer.go 117 ARITHMETIC_BASE
src/pkg/customers/infer.go 117 ARITHMETIC_BASE
src/pkg/customers/infer.go 176 CONDITIONALS_BOUNDARY
src/pkg/customers/infer.go 211 CONDITIONALS_BOUNDARY
src/pkg/customers/infer.go 246 CONDITIONALS_BOUNDARY

13 mutant(s) in changed files are not reached by any test (NOT COVERED). A maintainer may apply the mutation/acknowledged label to accept this.

File Line Mutation
src/cmd/hive/customers_infer.go 29 ARITHMETIC_BASE
src/cmd/hive/customers_infer.go 34 ARITHMETIC_BASE
src/cmd/hive/customers_infer.go 199 CONDITIONALS_NEGATION
src/cmd/hive/customers_infer.go 202 ARITHMETIC_BASE
src/cmd/hive/customers_infer.go 202 ARITHMETIC_BASE
src/cmd/hive/customers_infer.go 202 ARITHMETIC_BASE
src/cmd/hive/customers_infer.go 202 ARITHMETIC_BASE
src/cmd/hive/customers_infer.go 202 ARITHMETIC_BASE
src/cmd/hive/customers_infer.go 203 CONDITIONALS_NEGATION
src/pkg/customers/infer.go 49 ARITHMETIC_BASE
src/pkg/customers/infer.go 53 ARITHMETIC_BASE
src/pkg/customers/infer.go 70 ARITHMETIC_BASE
src/pkg/customers/infer.go 94 INCREMENT_DECREMENT

Verdict: lived (#17349).

@clubanderson clubanderson added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Nov 17, 2026
@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

@kubestellar-prow
kubestellar-prow Bot merged commit af77f74 into v5 Nov 17, 2026
98 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the feat/customers-infer branch November 17, 2026 18:44
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. 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.

1 participant