# M01-FND-DOMAIN-IDENTITIES-001 — Stable domain identity namespaces ## Ownership - Target: M01 - Program: FND - Owner/Agent ID: sindo-main-codex - Branch: `work/sindo-main-codex/m01-domain-identities` - Lease expires UTC: 2026-07-15 - Integrator: M01 milestone integrator ## Outcome Add scene-free, immutable identity values for stable authored content, session-local entities, opaque WoW wire GUIDs and namespaced server entries so callers cannot silently interchange their numeric/string representations. ## Non-goals - Allocating Content IDs, Entity IDs or server entries. - Decoding WoW GUID high types before the build-12340 protocol package. - Defining map/spell/item/quest/display/sound IDs in this package. - Migrating gameplay, network or Content Project consumers that do not exist yet. ## Paths - Exclusive: `src/domain/identity/`, `src/tools/verify_domain_identities.gd`, `docs/modules/domain-identities.md`, `docs/adr/0002-domain-identity-namespaces.md` - Shared/hotspots: `docs/ARCHITECTURE.md`, this claim - Generated/ignored: Godot import metadata ## Contracts and data - `ContentId`: canonical lowercase UUID text persisted with schema-owned content - `EntityId`: positive session-local integer, never a persisted content/server identity - `WowGuid`: opaque high/low unsigned 32-bit words preserving wire bits - `ServerEntryId`: positive integer plus non-empty adapter/table namespace - Migration: additive types only; no existing persisted data changes ## Dependencies - Requires: M01 coordinate/focus seams through `77cd17a` - Blocks: Content Project schemas, server adapters, network entity mapping and gameplay registry - External state: no dependency or proprietary input ## Verification - Commands: identity contract/boundary verifier, dependency search, coordination/documentation gates and headless project load - Fixtures: valid/invalid UUIDs, session IDs, full unsigned GUID words and duplicate numeric server entries in different namespaces - Fidelity evidence: GUID words remain opaque and lossless until build-12340 packet fixtures establish semantic decomposition - Performance budget: constant-time scalar/string validation outside frame loops ## Documentation deliverables - Inline public API docs: every value and validation/equality method - Module specification: persistence, ownership, namespace mapping and recovery - Data-flow diagram: authored/runtime/wire/server identities into adapters - State/sequence diagrams: lifecycle diagram for content/session/wire/server identity - ADR: namespace separation and UUID persistence decision ## Simplicity and naming - Important names introduced: `ContentId`, `EntityId`, `WowGuid`, `ServerEntryId` - Simplest considered solution: four independent values with explicit fields - Rejected complexity/abstractions: generic ID base class, registry service, UUID generator and speculative GUID high-type enum - Unavoidable complexity and justification: server entry namespace and split GUID words prevent collisions and signed 64-bit loss - Measured optimization evidence: not applicable ## Status - State: ready-for-review - Done: four identity values, boundary verifier, ADR, module specification, architecture mapping and repository gates - Next: integrator review and merge before the manual axis-conversion gate - Blocked by: ## Handoff - Commit: `c1dc07c` - Branch: `work/sindo-main-codex/m01-domain-identities` - Outcome: authored content, runtime entities, WoW wire GUIDs and namespaced server entries now have separate immutable scene-free value objects - Contract/schema: identity contract version 1; `ContentId` uses canonical lowercase UUID text. No existing schema/cache is migrated; containing future schemas still require their own version and duplicate/reference policy - Verification: DomainIdentities PASS (`5` ContentId, `5` EntityId, `6` WowGuid, `5` ServerEntryId cases); StreamingFocus, coordinate golden fixtures and CoordinateMapper PASS; M00 calibration PASS with maximum error `0.000015`; renderer manifest PASS (`7` checkpoints); headless project load exit `0`; coordination, documentation, naming/dependency and whitespace checks passed - Fidelity: `WowGuid` preserves two complete unsigned 32-bit wire words and explicitly does not claim build-12340 high-type semantics without packet fixtures; zero GUID remains an uninterpreted observable sentinel - Rebuild: none; no dependency or proprietary input. Clean-worktree project load reports expected missing ignored extracted assets/character resources - Remaining risks: no ID allocator, mapping registry or server namespace vocabulary exists yet; UUID shape does not enforce generator version/variant; GDScript callers must use domain `equals` or canonical keys rather than reference `==` - Recommended merge order: after StreamingFocus at `77cd17a`, before the M01 manual axis-conversion rule/search gate - Documentation: ADR 0002, domain-identities module API/input-output/data-flow/ lifecycle/persistence/recovery/capability/source-map sections, module registry and architecture Domain mapping added or updated