Skip to content

ADR-046 Phase 2: Naming & identity (alias registry, NameResolver, NameBinder) #855

@kitplummer

Description

@kitplummer

ADR-046 Phase 2: Naming & identity

Part of #853

Implement the alias registry and name resolution from ADR-046 §0.

Tasks

  • Define AliasBinding and AliasAppConfig proto/schema types
  • Define AliasType enum (ROLE, CALLSIGN, SLOT, CLAIMED)
  • Reserve and create system collections _aliases/{app_id}.{alias} and _alias_config/{app_id}
  • Implement NameResolver trait: resolve, resolve_selector, watch_alias, watch_selector
  • Implement NameBinder trait: bind, unbind, claim, release
  • Implement alias resolution in WriteOptions: target_aliases → target_nodes per the timing decision in the epic
  • Add aliases: repeated string and labels: map<string,string> fields to Beacon schema
  • Enforce APP_ID/alias format and length rules (validation in bind / claim)
  • Reserved APP_IDs (peat, system) rejected at bind time
  • Unit + integration tests: bind, claim, watch, resolve, conflict (LWW), TTL expiry

Friendly-mesh scope reductions (per epic #853)

  • Only implement BindAuthority::OPEN and ConflictPolicy::LAST_WRITE_WINS for v1
  • Keep the other enum variants in the proto for future extension; return Unimplemented if requested
  • No authority check on bind() — any peer can bind

Blocking design decisions (see epic #853)

  • Alias resolution timing — sender-only vs. every-hop

Acceptance

  • bind / resolve / watch integration test passes across two peat-protocol instances
  • Beacon advertisement carries aliases and labels
  • Reserved APP_IDs are rejected

Metadata

Metadata

Assignees

No one assigned

    Labels

    component/automergeAutomerge CRDT sync enginepriority/p2-normalNormal: Standard priority work itemteam/coreCore team: Schema, protocol, reference implementationtype/enhancementNew feature or requesttype/schemaSchema definition or change

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions