Skip to content

✨ Customers: agent context block and a people retriever for the meeting persona - #18794

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

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

Conversation

@clubanderson

Copy link
Copy Markdown
Member

PR 7 of the Customers series (RFC #18742). This crosses a security boundary, so the rules are listed first and each has a test. It does not depend on PR 6 (#18791).

What it does

  • Kick prompt: when a kicked GitHub issue has a human author, assignee or claimer who is a customer, the prompt gets a # Customer context block after the maintainer notes: their GitHub login, the tags that are on, up to three goals a person confirmed, and a count.
  • Meeting persona: a PeopleRetriever. When a question names a customer (a word equal to a word of their name, or their login), the persona can describe them.

Agents still cannot query the customers store (security-model.md section 4, ADR-0011). They receive this slice and nothing else.

Rules and where they are tested

Rule Test
Capped at 1,024 bytes, at every cap size; a person line is never cut; a fence is never half-written TestRenderKickContextHonoursTheCapAtEverySize
No email, id, notes, satisfaction assessment or surname-only fields; no inferred goals; no suggested person; no non-customer TestKickContextOnlyCustomersAndNothingPrivate
Goals are scanned with ioscan, dropped whole on an address, an id or a finding; control characters removed TestSafeGoal
Attack strings typed into goals (including by a read-only user about themselves): fence markers rewritten and nothing outside the one fence; no address or id; no recognised injection TestKickContextInjectionStrings
Fence has a fresh nonce each render TestRenderKickContextShapeAndFence
The scheduler hands over only logins (human author, assignees, claimer, real GitHub items, at most 20), appends once, and appends nothing that does not start with the block header TestKickCustomerContext*
The persona's snippet holds a name, tags and confirmed goals only; there is no field for notes or satisfaction; it says nothing when customers are off TestPeopleRetriever, TestPeopleBriefsForThePersona, TestCustomersAgentContextWiring

Decisions

  • The scheduler and the meetings package never import pkg/customers. The scheduler takes a func(logins []string) string; Betty takes a PeopleDirectory interface; cmd/hive connects them.
  • The persona speaks in a room that can hold people who are not the hive's users, so it gets no notes and no satisfaction assessment. The retriever has no field for them.
  • Betty already fences snippets as data in its own prompt; the people text is cleaned before that as well.
  • The persona directory is read at call time through a package-level holder, because the persona is built before customers are wired.
  • Matching a word in a question to a name is retrieval only. Nothing is linked or created, and no display name is used as an identity.

Docs: security-model.md (agents section) and the design page.

Refs #18742

🤖 Generated with Claude Code

@kubestellar-prow kubestellar-prow Bot added dco-signoff: yes Indicates the PR's author has signed the DCO. size/XL Denotes a PR that changes 500-999 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 CONFLICT src/cmd/hive/customerswire.go (conflict)
src/docs/design/customers.md
#18776 🐛 claude: keep the rotated shared-login grant until it is durably written; one writer for the shared login same files src/docs/security-model.md
#18793 🐛 Sessions: adopt a Codex or OpenCode login refreshed in a session back into the shared login same files src/docs/security-model.md

@github-actions github-actions Bot added the conflicts-with-open-pr Open PR has a merge conflict with another open PR label Nov 17, 2026
@kubestellar-prow kubestellar-prow Bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 17, 2026
@github-actions github-actions Bot removed the conflicts-with-open-pr Open PR has a merge conflict with another open PR label Nov 17, 2026
…eople retriever for the persona

PR 7 of RFC #18742.

- customers.RenderKickContext and PeopleBriefs: login, active tags, confirmed
  goals and a count; never an email, an id, notes or the satisfaction
  assessment. Goals are scanned with ioscan, dropped whole on an address, an
  id or a finding, and fenced with a fresh nonce. The kick block is capped at
  1,024 bytes.
- scheduler: a CustomerContextLookup seam after the maintainer notes; the
  scheduler never imports the customers package.
- betty: PeopleRetriever over a PeopleDirectory; cmd/hive supplies it.
- security-model.md and the design page describe the boundary.

Refs #18742

Signed-off-by: Andy Anderson <andy@clubanderson.com>
Refs #18742

Signed-off-by: Andy Anderson <andy@clubanderson.com>
@kubestellar-prow kubestellar-prow Bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 17, 2026
@github-actions github-actions Bot added the conflicts-with-open-pr Open PR has a merge conflict with another open PR label Nov 17, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Mutation testing

gremlins found 14 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/kickcontext.go 88 CONDITIONALS_NEGATION
src/pkg/customers/kickcontext.go 145 CONDITIONALS_BOUNDARY
src/pkg/customers/kickcontext.go 158 INCREMENT_DECREMENT
src/pkg/customers/kickcontext.go 163 CONDITIONALS_BOUNDARY
src/pkg/customers/kickcontext.go 167 ARITHMETIC_BASE
src/pkg/customers/kickcontext.go 167 CONDITIONALS_BOUNDARY
src/pkg/customers/kickcontext.go 173 CONDITIONALS_BOUNDARY
src/pkg/customers/kickcontext.go 196 CONDITIONALS_BOUNDARY
src/pkg/customers/kickcontext.go 196 CONDITIONALS_BOUNDARY
src/pkg/customers/kickcontext.go 196 CONDITIONALS_NEGATION
src/pkg/customers/kickcontext.go 234 CONDITIONALS_BOUNDARY
src/pkg/customers/kickcontext.go 234 CONDITIONALS_NEGATION
src/pkg/customers/kickcontext.go 246 CONDITIONALS_NEGATION
src/pkg/meetings/betty/retrieve_people.go 70 CONDITIONALS_BOUNDARY

2 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/main.go 3637 CONDITIONALS_NEGATION
src/pkg/customers/kickcontext.go 40 ARITHMETIC_BASE

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 1534a43 into v5 Nov 17, 2026
100 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the feat/customers-agent branch November 17, 2026 18:19
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/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant