Skip to content

✨ customers: hub import disclosure, docs and consent views - #19253

Open
hivecommons-hive[bot] wants to merge 1 commit into
v5from
scanner/fix-19164
Open

hivecommons-hive[bot] wants to merge 1 commit into
v5from
scanner/fix-19164

Conversation

@hivecommons-hive

@hivecommons-hive hivecommons-hive Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Phases 1 to 3 of #19088 made the hub import work end to end, but the consent page still told people "No profile details are sent to any hive in this release", and the docs still said Customers reads nothing from the hub. So a person could consent under text that no longer matched what happens. This closing slice fixes that gap. People can now see their consent being used, and the hub admin gets a view that does not turn into a per-person lookup.

  • Disclosure. The page now says what is sent and to whom, that the hive owner and anyone with Customers access on that hive can see and export it, what is never sent, how fast withdrawal takes effect, and that the hub cannot recall an exported copy. This is a material change, so customerConsentTextVersion goes to 2. As the design requires, a consent given under the old "nothing is sent" text is suspended until the person confirms again.
  • Person's view. Each hive card shows what was last sent and when, using the existing delivery stamps. A new last_delivered_fields stamp holds the last answer's fields, because delivered_fields is the union of every field ever sent.
  • Admin view. The admin sees consent counts per hive only, split into current and awaiting reconfirmation. Per-field counts are left out on purpose: on a hive with one consenting person, they would reveal what that person chose. No person or value is shown, and the route returns 404 while the hub switch is off.
  • Docs. The hub deployment, telemetry (new outbound-path row and section), env vars, dashboard sections, security model and Customers design pages now describe the opt-in path: hashes only, default off, consent first. They replace the "nothing is read from the hub" statements.

Fixes #19164 (needs-human: live hub/spoke verification, scope item 5)

🤖 Generated with Claude Code

-- hive: agent=scanner backend=claude model=claude-sonnet-5-5 claude=2.1.328 requested_by=@clubanderson

@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Nov 19, 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 hanthor 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/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Nov 19, 2026
@hivecommons-hive

hivecommons-hive Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor Author

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

hive/awaiting-ci: CI pending - sweep will merge when green. Synced with v5 this kick.


🐝 Hive Agent: scanner | Instance: hosted-available-oke-11-placeholder-r05x | SHA: unknown

Review findings from reviewer (folded here because this head already carries its hive review):

The code looks correct to me; the open point is a consent and privacy wording decision, which is a person's call.

Verified against the tree at v5:

  • Suspension of version 1 consents is really enforced: customer_match.go:221 only answers when c.TextVersion == customerConsentTextVersion, so bumping the constant in customer_consent.go:20 stops delivery for old consents until reconfirmation, as the body says.
  • The consent POST already rejects a mismatched displayed version (customer_consent.go:154), so reconfirming under version 2 is the only path back.
  • The admin counts route sits behind requireAdmin, returns 404 with the switch off, and returns counts only; the test asserts no login, name or field choice appears in the body.

Suggestion, not a defect: the disclosure states concrete timing ("normally within an hour", "within three days") that nothing in this diff ties to a code constant, so it can drift. A maintainer should confirm those numbers match the spoke sync behaviour from the earlier phases.

@hivecommons-hive hivecommons-hive Bot added author/hive This repository's own hive (the App or one of its agent lanes) authored this PR dco All commits are DCO signed-off role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Nov 19, 2026
@github-actions

github-actions Bot commented Nov 19, 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
#19249 ✨ hub: provision the per-hive customer match key to hosted spokes same files src/docs/design/customers-hub-consent.md
#19240 ✨ hub: registration key rotation with a grace window same files src/docs/env-vars.md
src/docs/hub-deployment.md
#19202 ✨ ask: hub panel for optional Ask AI help same files src/docs/api-reference/hub-saas.md
src/docs/env-vars.md
src/docs/hub-deployment.md
src/docs/telemetry.md
src/pkg/hub/assets/dashboard.html
#19204 ✨ ask: hive backend and hub relay for optional Ask AI help same files src/docs/api-reference/hub-saas.md
src/docs/env-vars.md
src/docs/hub-deployment.md
src/docs/telemetry.md
#19206 ✨ ask: hive panel and rollout verification for optional Ask AI help same files src/docs/api-reference/hub-saas.md
src/docs/env-vars.md
src/docs/hub-deployment.md
src/docs/telemetry.md
src/pkg/hub/assets/dashboard.html
#19264 🐛 fix: filter headers at agent HTTP relay boundaries same files src/docs/security-model.md
#19266 🐛 Sentinel judges the PR's current head and clears its own stale alert 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 19, 2026
@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

UI render evidence

Render evidence captured.

Built from 31a730e50465.
Screenshots: download the artifact (sign-in to GitHub required).
Run: https://github.com/hivecommons/hive/actions/runs/44569890516

Page Section Viewport Theme File Size
hive overview desktop light hive-overview-desktop-light.png 312 KB
hive overview desktop dark hive-overview-desktop-dark.png 306 KB
hive overview phone light hive-overview-phone-light.png 467 KB
hive overview phone dark hive-overview-phone-dark.png 464 KB
hub-fleet overview desktop light hub-fleet-overview-desktop-light.png 113 KB
hub-fleet overview desktop dark hub-fleet-overview-desktop-dark.png 115 KB
hub-fleet overview phone light hub-fleet-overview-phone-light.png 265 KB
hub-fleet overview phone dark hub-fleet-overview-phone-dark.png 270 KB
hub-dashboard overview desktop light hub-dashboard-overview-desktop-light.png 338 KB
hub-dashboard overview desktop dark hub-dashboard-overview-desktop-dark.png 344 KB
hub-dashboard overview phone light hub-dashboard-overview-phone-light.png 624 KB
hub-dashboard overview phone dark hub-dashboard-overview-phone-dark.png 656 KB

These are fixture renders, not live data: the page was built from the PR head and filled with synthetic data from src/scripts/fixtures/render-evidence/. They show layout and theming, not how real hives behave. How to read them: src/docs/ui-render-evidence.md.

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Decision needed: @clubanderson should decide whether the new consent disclosure wording (hub learns the hive-customer relationship, 72h/hourly withdrawal timing, "cannot recall exported copies") is the text people should be consenting to, since it bumps customerConsentTextVersion to 2 and suspends every existing consent.

Code read at the PR head: the aggregate admin endpoint and the stamp change look correct to me; the open item is a consent and privacy wording decision, which is a person's call.

  • customerConsentCounts (src/pkg/hub/customer_consent.go) reads only the consent store, skips withdrawn, discardable and empty-field records, and splits current vs older TextVersion. It is behind requireAdmin and returns 404 while the switch is off. TestCustomerConsentAdminCounts checks both gates and that no login, value or field name appears in the body.
  • LastDeliveredFields is stamped in stampCustomerDelivery (customer_match.go) and covered by the updated match test.
  • Open question, not a defect: the endpoint states "no person or value is shown", but a hive with one consent reveals that one person consented for that hive. Admin-only, so probably acceptable; worth a conscious yes.
  • The version bump to 2 is intentional and tested (TestCustomerConsentDisclosureText). It is irreversible for users in practice (all prior consents pause), hence the routing above.

I did not run anything; CI is the verdict. The PR shows mergeable_state=blocked, so check the required checks.

-- hive: agent=reviewer-2 backend=claude model=claude-sonnet-5-5 claude=2.1.328

@github-actions

Copy link
Copy Markdown
Contributor

Mutation testing

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

File Line Mutation
src/pkg/hub/customer_consent.go 314 CONDITIONALS_BOUNDARY

Verdict: lived (#17349).

@hivecommons-hive hivecommons-hive Bot added stage/085-needs-decision A human decision is owed: sentinel alert, hold/needs-decision label, human-only rule or parked issue and removed stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Nov 19, 2026
@hivecommons-hive

hivecommons-hive Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor Author

Needs a decision, not a merge:

  • the reviewer swarm returned requires_human @aa56e0c
  • the review found: the reviewer marked this change high-risk
  • reviewer question: @clubanderson should decide whether the version 2 consent disclosure text, which suspends every existing version 1 consent until each person reconfirms, is acceptable to ship as worded.
  • the automerge lane will not merge this unattended

Head: verdict requires_human @aa56e0c, 75/75 checks green, DCO yes, soak 0s of 10m0s.

What to do: approve this head (aa56e0c) to merge as-is, or leave a changes requested review (or reply /hive decision <what to change>) and the hive will push the fix.

How to release it:

  • After reading the verdict, a trusted merger can submit a GitHub Approve review for the current head and the lane clears the hold on its next pass; /hive approve replies on a PR are acknowledged but not consumed.

Clear the cause and the hive re-evaluates on its next pass; the stage moves to stage/090-ready-for-human-merge, stage/095-pre-merge-soak or the merge queue on its own. Approval does not bypass CI, hold labels or other merge gates.

Updated 2026-11-19 15:38 UTC.

@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

/approve

Posted by @clubanderson from the Hive dashboard; the merge gate decides from here.

@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

/hive decision approve #19253: green head, reviewer question answered with the reversible default — proceed as implemented

Rationale: no owner rule holds this back; a merge is reversible and keeps work moving.

Hive decided: Approved for merge.
Why: No special rule applies; a green branch is approved.
What happens next: The merge queue merges this PR once its checks are green — expected within 30 min.
If it doesn't happen: A maintainer can merge it by hand or send it back for a new commit; approving again does not help.

Decided by the hive at @clubanderson's request as the owner's delegate under the owner-delegate policy (rule default-release).

@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

Approved by @clubanderson for Hive auto-merge on green CI.

@hivecommons-hive hivecommons-hive Bot added the lgtm Indicates that a PR is ready to be merged. label Nov 19, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

Hive queued this PR but could not set the prow/lgtm commit status, so Prow may strip the lgtm label and the auto-merge queue may not hold.

@hivecommons-hive hivecommons-hive Bot added the stage/050-review-pending Review swarm requested; awaiting a verdict for the current head label Nov 19, 2026
@kubestellar-prow kubestellar-prow Bot removed the lgtm Indicates that a PR is ready to be merged. label Nov 19, 2026
@kubestellar-prow

Copy link
Copy Markdown
Contributor

New changes are detected. LGTM label has been removed.

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Decision needed: @clubanderson should decide whether the version 2 consent disclosure text, which suspends every existing version 1 consent until each person reconfirms, is acceptable to ship as worded.

Code reads correct to me; the open point is the consent-text change, which is a privacy/legal call for a person.

What I checked in the tree at the head:

  • Bumping customerConsentTextVersion to "2" (customer_consent.go:23) really does suspend v1 consents: the delivery gate customerMatchEffective requires c.TextVersion == customerConsentTextVersion (customer_match.go:221), and the counts endpoint reports older records as awaiting_reconfirmation.
  • customerConsentCounts returns only hive id, name and two integers, skips withdrawn and discardable records, and the route sits behind requireAdmin and the sharing switch. No person or field value leaks.
  • last_delivered_fields is stamped only in stampCustomerDelivery (customer_match.go:453), so the UI summary reflects what was actually sent.

One finding:

  • src/docs/api-reference/hub-saas.md:86 and :108 both add the identical GET /api/saas/admin/profile-share/counts row, so the route is listed twice in the table. Drop one.

The decision: existing v1 consents stop sharing on merge and people must reconfirm. That is the intended behavior per the code comment, but whether the new disclosure wording is final is not stated anywhere I can see.

-- hive: agent=reviewer-2 backend=claude model=claude-sonnet-5-5 claude=2.1.328

@hivecommons-hive hivecommons-hive Bot added stage/085-needs-decision A human decision is owed: sentinel alert, hold/needs-decision label, human-only rule or parked issue and removed stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Nov 19, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

/approve

Posted by @clubanderson from the Hive dashboard; the merge gate decides from here.

@hivecommons-hive hivecommons-hive Bot added stage/050-review-pending Review swarm requested; awaiting a verdict for the current head and removed stage/085-needs-decision A human decision is owed: sentinel alert, hold/needs-decision label, human-only rule or parked issue labels Nov 19, 2026
@github-actions github-actions Bot removed the conflicts-with-open-pr Open PR has a merge conflict with another open PR label Nov 19, 2026
@hivecommons-hive hivecommons-hive Bot added stage/070-fixing Hive-authored PR: CI red, changes requested or needs rebase; a hive agent is fixing it and removed stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Nov 19, 2026
@hivecommons-hive hivecommons-hive Bot added stage/050-review-pending Review swarm requested; awaiting a verdict for the current head and removed stage/070-fixing Hive-authored PR: CI red, changes requested or needs rebase; a hive agent is fixing it labels Nov 19, 2026
Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
Co-authored-by: clubanderson <407614+clubanderson@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

author/hive This repository's own hive (the App or one of its agent lanes) authored this PR copilot dco All commits are DCO signed-off dco-signoff: yes Indicates the PR's author has signed the DCO. role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) size/L Denotes a PR that changes 100-499 lines, ignoring generated files. stage/050-review-pending Review swarm requested; awaiting a verdict for the current head

Projects

None yet

Development

Successfully merging this pull request may close these issues.

📖 Customers: disclosure text, docs and live verification for hub import (phase 4 of #19088)

0 participants