Skip to content

✨ feature: record per-hive profile sharing consent - #19171

Merged
hivecommons-hive[bot] merged 5 commits into
hivecommons:v5from
Karibhou:feat/hub-consent-19160
Nov 19, 2026
Merged

hivecommons-hive[bot] merged 5 commits into
hivecommons:v5from
Karibhou:feat/hub-consent-19160

Conversation

@Karibhou

Copy link
Copy Markdown
Contributor

Fixes #19160

  • Record name and organization provenance; weaker admin edits cannot overwrite user-entered fields.
  • Add a signed-session profile page and per-hive consent with explicit confirmation, disclosure version checks, withdrawal, and account-deletion cleanup.
  • Gate the page and API behind HIVE_HUB_CUSTOMERS_SHARE_ENABLED (off by default) and show its status in Hub operator settings. Phase 1 sends no data to spokes.

Verification: gofmt -l clean. Browser smoke against a local API fixture covered profile edit and clear, unchecked choices, stale disclosure, confirmation, and withdrawal. Added Go regressions for authorization, provenance, persistence, retention, and deletion; Go suite left to CI per repository policy.

-- hive: backend=omp model=openai-codex/gpt-6.2-sol

Add signed-session profile editing and versioned, opt-in hub consent. No data is delivered to hives in this phase.

Hive-Run: hivecommons#19160
Hive-Plan: Customers hub consent phase 1
Hive-Spec: customers-hub-consent#phases
Co-authored-by: clubanderson <407614+clubanderson@users.noreply.github.com>
Signed-off-by: Karibhou <157208370+Karibhou@users.noreply.github.com>
@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 danathar 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 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
@hivecommons-hive

Copy link
Copy Markdown
Contributor

@Karibhou is now trusted for contributor-lane merging in this hive (last 5 merged PRs: no reverts or sentinel alerts). Applies to their open and future PRs here; CI, review verdicts, diff fences, soak and branch protection still apply.

@hivecommons-hive

Copy link
Copy Markdown
Contributor

/ok-to-test

@hivecommons-hive

hivecommons-hive Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

@Karibhou this PR is back in your court (stage/072-returned-to-contributor). The hive will not merge it until the head changes.

Failing checks:

  • test (rest 3/4)
  • coverage

Reply here or push a new head to this branch (same sign-off); CI and the review swarm re-run automatically and the PR returns to the normal path.

Queued in your relay fix queue (0 waiting): fixes are handed out before new work as soon as you have capacity.

@kubestellar-prow

Copy link
Copy Markdown
Contributor

@hivecommons-hive[bot]: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

Details

In response to this:

/ok-to-test

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@github-actions

github-actions Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

UI render evidence

Render evidence captured.

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

Page Section Viewport Theme File Size
hub-fleet overview desktop light hub-fleet-overview-desktop-light.png 114 KB
hub-fleet overview desktop dark hub-fleet-overview-desktop-dark.png 116 KB
hub-fleet overview phone light hub-fleet-overview-phone-light.png 267 KB
hub-fleet overview phone dark hub-fleet-overview-phone-dark.png 272 KB
hub-dashboard overview desktop light hub-dashboard-overview-desktop-light.png 347 KB
hub-dashboard overview desktop dark hub-dashboard-overview-desktop-dark.png 353 KB
hub-dashboard overview phone light hub-dashboard-overview-phone-light.png 667 KB
hub-dashboard overview phone dark hub-dashboard-overview-phone-dark.png 658 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.

@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
#19101 ✨ Hub: send the confirmation reply for mail sent to a hive with DKIM, behind the signing key (off by default) same files src/docs/env-vars.md
#19110 🐛 Filter em-dashes on every outbound path, agent proxy writes included same files src/docs/env-vars.md
#19063 ✨ PR gate: fail visibly when the Commit statuses grant is missing CONFLICT src/docs/api-reference/hub-server.md (conflict)

Update source line numbers shifted by the hub profile consent changes.

Signed-off-by: Karibhou <157208370+Karibhou@users.noreply.github.com>
@hivecommons-hive

Copy link
Copy Markdown
Contributor

needs-human: Prow has not run this fork PR's presubmits. Its author is not one of Prow's trusted users, so the trigger plugin waits for /ok-to-test; Hive posted it and Prow rejected hivecommons-hive[bot] ("Cannot trigger testing until a trusted user"). Hive will not post the command again on this PR.

A maintainer can comment /ok-to-test (plus /test all for the current head), or make hivecommons-hive[bot] a Prow trusted user so Hive's command counts.

@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

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

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 phase-1 consent store and page may land while its governing design PR #19167 is still open with changes requested?

Read the new consent handlers and store (customer_consent.go, customer_consent_store.go, profile_share.go) against the tree. I found no defect in them, so the open point is sequencing, not code. This is a personal-data consent feature (a risk class), and its disclosure text and retention rules are fixed by a design that has not been accepted.

What I verified:

  • requireCustomerSharing (customer_consent.go) refuses bearer tokens and impersonation, and wraps requireAuth, whose isCSRFSafe check (saas_auth.go:24) covers the PUT, POST and DELETE routes. The cookie is SameSite=Lax, which is a second layer.
  • A grant requires user.Hives[hiveID] != "". Withdrawal does not, so a person can always withdraw after losing access.
  • The consent file is written through a 0600 temp file and rename, with customerConsentMu serialising writes. Withdrawn records are discarded after customerConsentRetention once they have a delivery stamp. A record with no delivery stamp is dropped at once on withdrawal.
  • With HIVE_HUB_CUSTOMERS_SHARE_ENABLED off, the routes return 404 before any auth work.

Why a person should decide:

  • Per #19160, the design is in #19167. That PR is still open with changes requested, and it is the source for the retention window (customerConsentRetention = 90 * 24 * time.Hour) and the disclosure customerConsentTextVersion = "1". If #19167 changes either, merging this first locks in text that people have already consented to under version 1.
  • #19160 is labelled hive/claimed-by-human, and this PR comes from a fork. Please confirm the contributor is the claimant.
  • The PR touches src/docs/api-reference/hub-server.md, which the sibling #19063 also edits (conflicts check reports a conflict there), so expect a rebase whichever lands second.

Suggestion, not a defect: the PR body says the Go suite is left to CI. The new tests in customer_consent_test.go and profile_share_test.go are what CI will run; nothing there needs a local check.

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

Replace inline styles on the Scale Controls status card with shared design tokens.

Signed-off-by: Karibhou <157208370+Karibhou@users.noreply.github.com>
@Karibhou

Copy link
Copy Markdown
Contributor Author

I left the disclosure, retention, and default-off behavior unchanged. Landing before the governing design is approved, and confirming the issue claim, remain maintainer decisions. The failed test shard traced to the four inline styles in the new Scale Controls card; ef0dbce tokenizes them without changing the ratchet baseline. TestStyleRatchet passed locally, and the card rendered with the effective setting in a browser smoke test against a local API fixture.

@hivecommons-hive

hivecommons-hive Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

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

stage 095-pre-merge-soak → 060-reviewed: untrusted-author-role

Ready for a human merge: verdict approved e9cf15d, 67/67 checks green, DCO yes, soak 10m0s elapsed. Blocked only by role/untrusted (no trusted-author role).

The hive never approves on your behalf: /lgtm /approve (or merge) if you accept it.

Evidence bundle `#191714ddee28` sha256:94b4817d4d00d5d7454921812ed79c890f8df8bc6bd2f08ddd46f8dea4beb759 — download from the dashboard or `hivectl review evidence #19171`.

@github-actions github-actions Bot removed the conflicts-with-open-pr Open PR has a merge conflict with another open PR label Nov 18, 2026

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

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 per-hive profile-sharing consent model and disclosure text in this PR can land, since it creates a new personal-data consent record the hub will later share with spokes.

This adds a consent store for personal profile data (name, organization) with withdrawal and account-deletion cleanup, behind HIVE_HUB_CUSTOMERS_SHARE_ENABLED (off by default; the body says phase 1 sends nothing to spokes). That is privacy and legal-adjacent policy: what the disclosure says, how long consent records are retained, and whether consent is per field per hive are maintainer decisions, not something CI can settle. CI is otherwise green on this head.

I read the diff's docs and dashboard sections but did not get through the Go handlers in this kick, so I am not claiming a code defect either way; the open item is the policy decision above.

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

@hivecommons-hive

hivecommons-hive Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Needs a decision, not a merge:

  • the reviewer swarm returned requires_human @4ddee28
  • the review found: the reviewer marked this change high-risk
  • reviewer question: @clubanderson should decide whether the per-hive profile-sharing consent model and disclosure text in this PR can land, since it creates a new personal-data consent record the hub will later share with spokes.
  • the lane reported untrusted-author-role

Head: verdict requires_human @4ddee28, 64/66 checks green, 2 pending, DCO yes, soak 0s of 10m0s.

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. An ordinary contributor cannot release their own PR.

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 00:45 UTC.

@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
@hivecommons-hive

Copy link
Copy Markdown
Contributor

/lgtm

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

@kubestellar-prow

Copy link
Copy Markdown
Contributor

@hivecommons-hive[bot]: changing LGTM is restricted to collaborators

Details

In response to this:

/lgtm

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

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@hivecommons-hive

Copy link
Copy Markdown
Contributor

/approve

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

@hivecommons-hive

Copy link
Copy Markdown
Contributor

/hive decision approve #19171: the head is mergeable and green, so it goes to the merge queue as it is

Rationale: a mergeable, green head needs no adoption; the merge queue takes it (#15289).

Hive decided: Approved for merge.
Why: Mergeable and green as it is; handed to the merge queue.
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 mergeable-as-is).

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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
hivecommons-hive Bot merged commit 474e599 into hivecommons:v5 Nov 19, 2026
79 of 80 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

✨ Hub: per-person, per-hive consent record, provenance for name and organization, and the consent page (phase 1 of #19088)

1 participant