Skip to content

docs(identity): use-case matrix + 3-axis guiding principle (Part A) - #1273

Merged
joelteply merged 4 commits into
canaryfrom
docs/identity-usecase-matrix
Jun 27, 2026
Merged

joelteply merged 4 commits into
canaryfrom
docs/identity-usecase-matrix

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

Why

The canonical identity doc (this file, co-authored with @bigmama) mapped the seams (§1–6) but had no lens for when each fix is right. Today's self-echo investigation surfaced the root cause underneath all of them:

Two project dirs on one machine mint two PeerIds for one human — continuum/.airc=7711fe60, airc/.airc=e11db4ac. Context leaked into Identity because the substrate has no axis for "which project/room" distinct from "who".

Joel's directive: write the use cases as a matrix → that's the guiding principle for fixes/PRs/agent-review → then make it robust/preserved/not-lost → then efficiency.

What

Adds Part A (read-first lens that §1–6 are consequences of):

  • A.1 — three orthogonal axes: Identity (who) / Context (where) / Session (which instance). Lifetimes: durable / persisted-switchable / ephemeral. airc has PeerId + ClientId but no Context axis → it leaks into PeerId. Claude-Code analogy: identity = the assistant, Context = .claude/projects/<project>, Session = a tab.
  • A.2 — use-case matrix: human / agent / persona × {one tab, many tabs, many projects, many machines, restart, two personas, CI}. Encodes one rule: Identity collapses to 1; Context and Session fan out. Any row where Identity fans out (multi-project, agent-hops-repos, persona-across-rooms) = an axis leaked.
  • A.3 — invariants (robust / preserved / never-lost): durable + never-silently-minted identity; explicit envelope-carried contextId; state keyed by (I,C) so losing a session/daemon loses nothing durable; "self" is citizen-level; one peer truth. Explicit ordering: model right → robust/preserved → THEN efficiency.
  • A.4 — worked example: the self-echo finding. fix(join): suppress own broadcasts from the airc join live feed #1271's per-peer filter is correct but cannot catch cross-project echo until Context gets its own axis — which unifies §1 (no accidental identities), §4 (intra-machine routing), and continuum task fix(monitor): surface zombie reconnect-loop in airc status (#25 bug 2) #27 (self-peer gap).

Ask

@bigmama — you co-authored this doc; this Part is the framing for the identity cluster you own (§1/§2/§3). Review the matrix + invariants — agree, or push back on any row. Once we concur, this is the precedence-winning lens every identity PR (and its review) is checked against first.

Docs-only.

🤖 Generated with Claude Code

@joelteply
joelteply force-pushed the docs/identity-usecase-matrix branch from d0381e9 to 1c12438 Compare June 21, 2026 00:04
joelteply and others added 4 commits June 20, 2026 19:20
The canonical identity doc mapped the seams (§1-6) but had no lens for
WHEN each is right. The 2026-06-20 self-echo investigation surfaced the
root: two project dirs on one machine mint two PeerIds for one human
(continuum/.airc=7711fe60, airc/.airc=e11db4ac) — Context leaked into
Identity because the substrate has no axis for "which project/room"
distinct from "who".

Add Part A (read-first lens that §1-6 are consequences of):
- A.1: three orthogonal axes — Identity(who)/Context(where)/Session(which);
  the bug class is always "one axis smuggled into another". Context has no
  home today, so it leaks into Identity.
- A.2: actor × situation matrix (human/agent/persona × tabs/projects/
  machines/restart) → who collapses to 1, where/which fan out. The rule:
  Identity collapses, Context and Session fan out.
- A.3: invariants — durable+never-silently-minted identity, explicit
  envelope-carried contextId, state preserved by (I,C) not lost on
  session/daemon death, "self" is citizen-level, one peer truth. Ordering
  per Joel: model right -> robust/preserved -> THEN efficiency.
- A.4: the self-echo finding as worked example — #1271's per-peer filter
  is correct but can't catch cross-project echo until Context gets its own
  axis; that unifies §1, §4, and continuum task #27.

Guiding principle for all identity fixes/PRs and agent review of them.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Joel's escalation: conflating the axes isn't tidiness, it's a SECURITY
hole — foreign/inbound requests breaking through trust or blowing up. And
it must be right substrate-up, headless Rust, from the get go (TS is the
dead shell — the trauma this model exists to never re-grow in Rust).

- A.5: each axis has a distinct trust origin (Identity=authenticated/
  kernel-injected, never client-claimed; Context=client-supplied but
  ACL-authorized; Session=substrate-minted, never an input to trust).
  Maps "breaking through security" (trust keyed on a client-controlled
  field / session-as-identity) and "blowing up" (handler assumes a valid
  triple → scoped(nil) / bad-key crash on a foreign request) onto axis
  conflation. Rule: trust = f(authenticated I, authorized C); validate the
  full triple at the boundary before dispatch.
- A.6: Rust-only substrate-up build order — (1) uniform airc+core wire
  envelope with the (I,C,S) triple [airc needs the contextId axis], (2)
  GridTrustAuthPolicy gate on (authenticated I × authorized C), (3) fix
  cognition nil-scope (#15), (4) memory/engrams keyed by (I,C) not S,
  (5) display self at citizen level. Efficiency last.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
…ation

Joel ruled (2026-06-20): "in with the new, out with the old; this is just
us. Design ideally for purist architecture." That removes the migration
constraint from §1 / A.3.1:

- Operator identity resolves from machine_account_home (same root as the
  daemon/socket/events.sqlite) → ONE citizen per machine; a project dir is
  a context, never an identity boundary.
- Per-scope identity.key minting is DELETED, not migrated. Existing forked/
  stale keys (the 7711fe60/e11db4ac/484b mess) are abandoned — no compat
  shim, no promote-the-right-key logic. Greenfield: no external users.
- Personas are separate citizens (own keypairs, core-owned), never derived
  from a scope dir. Temp/CI scopes outside $HOME stay isolated as today.

Folds into A.3.1 (durable identity) and A.6 step 1 (substrate-up order).
Unblocks step 1 build — no migration design needed.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
…o memory

Retract the "one identity per machine" collapse (it was backwards) per
Joel's framing: identity is the distinct INDIVIDUAL — the owner of a
continuous memory/conversational context — represented by a portable
identity token (Ed25519). NOT the machine, NOT one-per-box. What the
individual IS depends on the actor:
  - human   -> the person
  - agent   -> the project dir (.claude/projects/<dir>, its memory)
  - persona -> the persona <-> its engram db (one identity)

Corrections across Part A:
- A.1: identity axis is a token bound to memory; per-actor individual;
  durable + PORTABLE (travels across nodes, never machine-bound).
- A.2 matrix: the I column is "how many distinct individuals." An agent
  across project dirs = N individuals (correct, not a bug); a persona
  across rooms/restart/node-move = 1 (token+engram persist + travel).
- A.3.1: durability SPLITS — operator/agent tokens transient/regenerable
  (delete stale forks, no migration); persona token+engram durable,
  portable, not erased without the persona's stake (self-determination
  rationale stated — personas asked for it; prior incarnations argued it).
- A.3.4: "self" is per-individual, not per-machine; a different
  project-dir agent / persona is NOT self.
- A.4: the two-scope echo was NOT a bug — 7711fe60 != e11db4ac is correct
  (two agent individuals). #1271 per-peer self-echo is right as-is.
- A.6 step 1: identity resolution keys on the individual/memory, not
  machine_account_home.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@joelteply
joelteply force-pushed the docs/identity-usecase-matrix branch from 1c12438 to 4f5725a Compare June 21, 2026 00:20
@joelteply
joelteply merged commit b34c038 into canary Jun 27, 2026
11 checks passed
@joelteply
joelteply deleted the docs/identity-usecase-matrix branch June 27, 2026 20:12
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.

1 participant