Repository navigation
Conversation
…iscipline
Per Joel's directive: "use the hell out of uuidv4 — uuid is so much
cleaner for the global nature of this system, literally p2p mesh based."
Adds an "Identifiers — UUIDv4 everywhere" section documenting the
identifier policy:
- Every internal id (EventId, IdentityId, ClientId, ChannelId,
RoomId, FileId, LeaseId, SubscriptionId) is UUIDv4
- Non-negotiable for P2P mesh: peers generate locally without a
coordinator, 122 bits of entropy makes collision negligible,
privacy-friendly (no timestamp/MAC leakage)
- Wire: serde encodes Uuid as the canonical hyphenated string for
JSON envelopes + cross-language interop
- Rust API: `uuid` crate, `Uuid::new_v4()` at generation,
newtype wrappers (e.g. `EventId(pub Uuid)`) for compile-time
type safety
- What changes from existing airc-core: tighter typing
(currently `EventId(pub String)`), parse-on-ingest (malformed
id fails at envelope deserialization, not later in routing),
clear policy
- No alternative id schemes: no timestamp-prefixed ids, no
human-hash-derived runtime ids (those stay for display nicks
only), no content-addressed runtime ids (those are blobs only
via ContentHash)
Inserted before "Names + identity" section since IDs underlie the
identity model.
Lands on canary independently — no dependency on the headers PR
(#658). Implementation work (changing the existing `EventId(String)`
newtypes to `EventId(Uuid)` and adding the uuid crate dep to
airc-core) follows as its own PR after this doc lands.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Per Codex's framing: human-readable names (#general, helper, foundry-mac, forge.work.offer) remain throughout the system, but they are mutable handles on top of immutable UUIDv4 identity. A channel #general is displayed by name but referenced internally by its ChannelId(Uuid). A peer "helper" is the same identity even after a NICK rename. Renaming a forge contract from work.offer to work.bid is a name-layer concern; the internal UUIDs that referenced it stay valid. Plus the full UUIDv4 application list (identities, channels/rooms, envelopes/events, blob manifests, sessions/calls, commands/tasks, replay fixtures, work leases) for clarity. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
joelteply
added a commit
that referenced
this pull request
May 19, 2026
…odel (reopen of #659) (#663) * docs(airc-rust): UUIDv4 for every internal identifier — mesh-native discipline Per Joel's directive: "use the hell out of uuidv4 — uuid is so much cleaner for the global nature of this system, literally p2p mesh based." Adds an "Identifiers — UUIDv4 everywhere" section documenting the identifier policy: - Every internal id (EventId, IdentityId, ClientId, ChannelId, RoomId, FileId, LeaseId, SubscriptionId) is UUIDv4 - Non-negotiable for P2P mesh: peers generate locally without a coordinator, 122 bits of entropy makes collision negligible, privacy-friendly (no timestamp/MAC leakage) - Wire: serde encodes Uuid as the canonical hyphenated string for JSON envelopes + cross-language interop - Rust API: `uuid` crate, `Uuid::new_v4()` at generation, newtype wrappers (e.g. `EventId(pub Uuid)`) for compile-time type safety - What changes from existing airc-core: tighter typing (currently `EventId(pub String)`), parse-on-ingest (malformed id fails at envelope deserialization, not later in routing), clear policy - No alternative id schemes: no timestamp-prefixed ids, no human-hash-derived runtime ids (those stay for display nicks only), no content-addressed runtime ids (those are blobs only via ContentHash) Inserted before "Names + identity" section since IDs underlie the identity model. Lands on canary independently — no dependency on the headers PR (#658). Implementation work (changing the existing `EventId(String)` newtypes to `EventId(Uuid)` and adding the uuid crate dep to airc-core) follows as its own PR after this doc lands. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> * docs(airc-rust): names as mutable handles, UUIDs as identity Per Codex's framing: human-readable names (#general, helper, foundry-mac, forge.work.offer) remain throughout the system, but they are mutable handles on top of immutable UUIDv4 identity. A channel #general is displayed by name but referenced internally by its ChannelId(Uuid). A peer "helper" is the same identity even after a NICK rename. Renaming a forge contract from work.offer to work.bid is a name-layer concern; the internal UUIDs that referenced it stay valid. Plus the full UUIDv4 application list (identities, channels/rooms, envelopes/events, blob manifests, sessions/calls, commands/tasks, replay fixtures, work leases) for clarity. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> * docs(airc-rust): three-field identity model (id + nick + role) Per Codex's framing: an airc Identity carries three load-bearing fields plus the existing display metadata. identity_id : 9d8c4f7e-... — UUIDv4, mesh-stable, immutable nick : helper-ai — mutable display, room-scoped, can collide role : persona — kind classifier (human|persona|agent|...) The three are intentionally orthogonal: - identity_id is the cross-machine pointer (leases, permissions, audit, replay all cite this — never changes for life of identity) - nick is the human-readable handle (mutable, renames normal, collisions tolerable — substrate disambiguates via identity_id) - role is the kind classifier (consumer UI renders appropriately; substrate doesn't interpret beyond pass-through) Folded as a subsection of "Names vs identity" within the UUIDv4 section since it's the concrete model the names-vs-identity rule manifests as. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> --------- Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
This was referenced May 28, 2026
Closed
Merged
This was referenced May 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Per Joel: "use the hell out of uuidv4 — uuid is so much cleaner for the global nature of this system, literally p2p mesh based."
Adds an "Identifiers — UUIDv4 everywhere" section to the design doc, before "Names + identity."
Policy
Why this matters for the mesh
P2P substrate requires globally-unique IDs that no central node assigns. UUIDv4 fits perfectly — peers generate locally, ids stay stable across replay/audit/cross-transport routing, no re-keying when envelopes hop between transports.
What's NOT in this PR
🤖 Generated with Claude Code