Skip to content

feat(brain): show WorkOS names and private key aliases - #1128

Merged
AustinKelsay merged 4 commits into
mainfrom
t3/private-identity-aliases
Oct 29, 2026
Merged

AustinKelsay merged 4 commits into
mainfrom
t3/private-identity-aliases

Conversation

@AustinKelsay

@AustinKelsay AustinKelsay commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Human Brain roster entries can show the optional name from the verified WorkOS user Core already fetches. Each viewer can also save a private alias for an exact key.

verified WorkOS user → account name → existing gated identity description
viewer session + exact key → private alias marked “Your alias”
                            → original identity and key remain visible

Aliases do not change ownership, membership, permissions or mapping provenance. Identity cells preserve email, public-name, dated scoped annotation, retired-Agent and Unknown fallbacks. Migration 0043_account_names_and_key_aliases.sql is additive; existing 0042 and the scoped parser remain unchanged.

Stack: #1126 → #1128 → #1127. This PR targets the deletion branch to keep its diff scoped to names and aliases. The stacked names patch is byte-identical to the independently reviewed integration; it adds no deletion or people-management behavior.

Evidence

  • Before: human records fell back to email and private aliases were unavailable. After: browser tests cover name display and email fallback; alias save/reload/edit/clear; viewer isolation; keyboard focus, retry, mobile layout; older Core fallback; preservation of scoped/public/lifecycle labels.
  • Real Postgres upgrade/reapply tests preserve populated scoped records, operation receipts, principals and sharing scopes through 0043, retain names/aliases and accept an older account writer.
  • Feature verification passed 357 Core tests, 426 dashboard tests, 8 Brain description compatibility tests, scoped-roster and alias browser tests, formatting, strict clippy, dashboard lint/typecheck/build and source structure.
  • Fable 5.1 approved the final combined implementation at 64f9c62c with no blocking/high/medium findings. The subsequent small UI polish passed the final combined production build, 19 focused unit/real-hosted-route tests, 4 browser tests and the real composition proof. It verifies same-name/same-alias removal still targets the authoritative key, aliases remain private, and alias edits do not change the deletion state digest.
  • Real composition: Core/Postgres, Brain server, Hosted Device, production dashboard, Runner-rendered Caddy, packaged Hermes and CLI. Fixtures: WorkOS provider, Agent key pin, Core Hermes-access grant and Chat. Live OAuth and production qualification remain release gates.
  • Original feature CI passed. CI for the pushed stack head is separate; merge requires the current required checks.

Reproduce with just web-check, Core tests under devfinity, and the opt-in key_alias_browser_composition test documented in finitecomputer-v2/docs/brain-identity-descriptions-v1.md.

Merge Danger

Door: two-way for the application rollout.

Blast Radius: identity-display.

0043 adds nullable name columns and a viewer/key alias table, with no backfill. Older Core ignores the additions; rollback retains the data. Startup DDL briefly locks users. Deploy Core before the dashboard. Existing accounts acquire names after their next verified request.

The user authorized coordinated release after verification. Retained production source 6a923870 includes 0042 but intentionally omits main's unrelated 0039/0040 trial-archive migrations. A scoped retained-source candidate is being qualified separately; tests on main do not qualify replacing that whole Core generation. No deployment or production mutation has been performed.

The final people-management layer preserves these labels in the roster and removal dialog while displaying the authoritative key. Aliases never determine the removal target or authority.

AustinKelsay and others added 3 commits October 26, 2026 20:48
Core records the WorkOS first and last name from the user record it already
fetches on verified account requests, and returns it on resolved human Brain
identity descriptions under the same gates as the email. Malformed, oversized
or missing names never block sign-in; they clear the stored name.

Signed-in accounts can keep a private alias per exact key through new
account-authenticated routes. Aliases are visible only to their writer and
are never identity evidence. The dashboard Brain roster shows an alias first,
marked "Your alias", with Finite's own name, email or Unknown beneath it, and
keeps working when aliases are unavailable.

Migration 0042 is additive: nullable users columns and account_key_aliases.

Not yet compiled or tested: the build volume was full (see handoff).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Documentation census

This PR adds 0 new Markdown files and 69 lines of Markdown, and removes 0 Markdown files and 5 lines of Markdown.

Net documentation change: +64 lines.

Counts .md and .markdown files anywhere in the repo, case-insensitively. Lines include additions and deletions across all matching files; net change is additions minus deletions. Renamed files are not counted as new or removed. Advisory only; never a merge gate.

AustinKelsay added a commit that referenced this pull request Oct 27, 2026
Inputs: #1126 a94a1f1 and #1128
2517eba (e19b18c, 0aca26f, 2517eba).
Clean textual merge. Cargo.lock keeps the 0.9.0 Brain crate versions from
#1126 and the secp256k1 dependency #1128 adds to finite-saas-core.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AustinKelsay added a commit that referenced this pull request Oct 27, 2026
Inputs: #1127 2da1d3c on top of the
#1126 + #1128 integration.

agent-brain-browser.tsx merged cleanly: the roster passes agentName and
the deletion panel stays below it.

brain-identity-roster.tsx conflict resolution keeps both data contracts
and every affordance:
- readBrainIdentities returns { identities, changes }; the alias lookup
  memoizes the npubs of `identities`, so a refresh after a roster change
  looks the new key set up again.
- Columns are Identity, Your alias, Owner, Role, Folders, Key, and the
  Actions column when the Agent offers removal.
- The identity cell keeps names' alias rendering over the scoped,
  lifecycle and public-name labels. The Remove button and its dialog keep
  the authoritative label from people's personLabel; removal still sends
  only row.npub.
- One short-key helper (shortNpub) replaces names' identical local
  shortKey.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@AustinKelsay
AustinKelsay changed the base branch from main to codex/org-brain-delete-prototype October 27, 2026 13:38
@AustinKelsay
AustinKelsay marked this pull request as ready for review October 27, 2026 13:39

@alexlwn123 alexlwn123 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Pass for this stack layer. Reviewed a992859ccefcead4ed43c56b16f5159082f16cce..f18e9830f4f9cb519452cd8787093fe1bc2843a6 independently in a clean detached checkout of the verified finitecomputer/finite-mono remote. No actionable blocker found in the names/private-alias delta; inherited deletion behavior from #1126 is outside this verdict.

Traced verified WorkOS name capture and clearing, the existing v1/v2/v3 name/email disclosure gates, exact-key canonicalization, account-scoped alias SQL and its per-viewer lock, session/origin boundaries, account-keyed UI remounting, and preservation of identity/provenance/lifecycle labels. Migration 0043 is additive; inspected its populated-schema reapply and older-writer tests and the unchanged Brain parser's optional human-name compatibility.

Validation: 16 focused native dashboard tests passed, plus the existing scoped-roster browser test and an independent actual-UI alias test covering keyboard open, save, refresh persistence, edit, length validation, failed-save retry, clear, unavailable fallback, and desktop/mobile layouts. UI tests used this exact source with existing local dependencies and Chromium, fixture account/Core/Hosted Device services, and mocked Brain transport/alias responses. They do not establish real Core/Postgres isolation or live OAuth. Source diff check passed. Current Rust workspace, Dashboard, Brain acceptance matrix, and Source structure CI checks passed; Nix service packages remains in progress.

Limits: Core/Postgres migration and full composition tests were not rerun because the saved Nix bwrap UID-map/read-only-filesystem restriction remains; CI logs remain restricted (403). Neither blocked path was retried or bypassed. Real desktop (1440×1000), mobile (390×844), and mobile alias-dialog screenshots were captured and privacy-inspected, but automatic approval review denied uploading the synthetic evidence to the authorized Drive folder. No publicly retrievable images or inline-render claims are included. No source edits, merge, deployment, production-data changes, or workflow dispatches were made.

@AustinKelsay
AustinKelsay changed the base branch from codex/org-brain-delete-prototype to main October 29, 2026 02:18
@AustinKelsay
AustinKelsay added this pull request to the merge queue Oct 29, 2026
Merged via the queue into main with commit 644285b Oct 29, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants