Skip to content

✨ Customers: audit activity and "Same person?" hints - #18791

Merged
kubestellar-prow[bot] merged 1 commit into
v5from
feat/customers-enrich
Nov 17, 2026
Merged

kubestellar-prow[bot] merged 1 commit into
v5from
feat/customers-enrich

Conversation

@clubanderson

Copy link
Copy Markdown
Member

PR 6 of the Customers series (RFC #18742). Adds the dashboard audit log as an activity source and the hints a person answers on a profile. Step E is deliberately not here; see the end.

Step D: activity from the audit log

One acted edge per customer per day, and a logged_in edge on days they signed in. The sweep reads only the user, the day and whether the action name is a sign-in; the audit line's detail is never copied (tested with a secret in the detail). An audit edge goes when its day leaves the 90-day audit retention (compliance.BuiltinAuditRetentionDays) and is shown to the full view only, because it says when someone worked.

"Same person?" hints

Raised between a customer and a suggested person when a suggested address starts like one of the customer's logins (a GitHub login or the dashboard user name), or a suggested login starts like one of the customer's addresses. Exact, lower-cased keys with any +tag removed; locals under four characters and role addresses (info, noreply, ...) are skipped; a display name is never compared.

A hint links nothing. On the profile, Yes makes the suggested identity the customer's own (recorded manual, by whom, source same_person_hint) and deletes the suggestion; No pins the pair so it is not asked again. A hint between two customers has no Yes: it is answered by merging, which is PR 8. POST /api/customers/hints/{hid}/answer is full view only, in openapi and the API reference, audited as customer_hint_answer.

Accepting a suggestion now also closes the hints that named it, so none dangle.

Docs

security-model.md gains the customers store, the position on people who never signed up, the read-only claim rule, and the one trust assumption in identity linking, stated plainly: a github:<login> access-list entry is taken as proof of that GitHub login. The hub writes that entry after signing the person in with GitHub, but a hand-edited access list would give the named person's profile the matching GitHub activity.

Not built: step E

The budgeted GitHub search for mentions and comments on accept needs a new GitHub client method (the client has no comment or mention search) and a place in the API budget. I did not want to ship that unverified, so it is left for its own PR. Nothing in this PR depends on it.

Also not read by the sweep yet: recordings, the merged ledger, review evidence, contributor profiles and connector fact authors (no accessor reachable from the sweep).

Refs #18742

🤖 Generated with Claude Code

PR 6 of RFC #18742.

- The sweep reads the dashboard audit log: one acted edge per person per day
  and a logged_in edge on sign-in days. Only user, day and kind of action are
  read. An audit edge goes when its day leaves the audit retention.
- Hints between a customer and a suggested person when an address starts like
  a login. Names are never compared. Yes makes the identity theirs, no pins
  the pair. POST /api/customers/hints/{hid}/answer, audited.
- security-model.md: the customers store, people who never signed up, and the
  github:<login> access-list assumption.

Step E (budgeted GitHub search on accept) is not built: the GitHub client has
no comment or mention search.

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/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Nov 17, 2026
@github-actions

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
#18783 ✨ Evidence summary: change failures (reverts, reopened issues) per model same files dashboard/openapi.json
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
#18780 ✨ Governor PRs by model: what each model's PRs cost the hive to review 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
#18779 ✨ Governor PRs by model: per-repository breakdown and weekly trend same files src/pkg/dashboard/static/index.html
#18784 ✨ Contributor run stats by model: why runs failed (scenario split, abandoned, failure kinds) same files dashboard/openapi.json
#18782 ✨ Governor PRs by model: split closed-unmerged PRs into superseded, duplicate and other same files src/pkg/dashboard/static/index.html
#18781 ✨ Spend and contributor run stats by model: add the canonical model name same files dashboard/openapi.json
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
#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

@github-actions

Copy link
Copy Markdown
Contributor

Mutation testing

gremlins found 2 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/hints.go 162 CONDITIONALS_NEGATION
src/pkg/customers/hints.go 165 CONDITIONALS_BOUNDARY

ℹ️ 2 mutant(s) on added lines were SKIPPED because gremlins v0.6.0 only honours the first lines added lines of each default-context hunk, so non-contiguous edits in one hunk are partly missed. This does not affect the verdict.

File Line Mutation
src/cmd/hive/customers_sweep.go 82 CONDITIONALS_NEGATION
src/cmd/hive/customers_sweep.go 83 CONDITIONALS_NEGATION

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 e53ccc2 into v5 Nov 17, 2026
108 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the feat/customers-enrich branch November 17, 2026 18:02
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/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