# OPS Unified Person P2 Bridge Receipt ## Scope - Repository: `astrbot_plugin_private_companion-main` only. - This correction wires the existing direct `MemoryCompanion.compose_context` path to the frozen P0 read-only person projection. - It does not attach attributes to AstrBot events because the relative hook order is not proven here. ## Runtime Identity - `companion_instance_id`: required explicit `unified_person_companion_instance_id` configuration. - `bot_account_id`: current event Bot self ID; ambiguous or missing values fail closed. - `adapter_instance_id`: the unique exact platform instance returned by `_preferred_platform_instance_id(kind=event.get_platform_name())`. A platform kind/name is only a lookup hint; a missing resolver or ambiguous instance set fails closed. - `subject_namespace`: exact lookup from `unified_person_subject_namespace_map`, configured as one `adapter=namespace` pair per line. - `platform_subject_id`: current `event.get_sender_id()` value. A conflicting caller-supplied `user_id` fails closed. - Both new configuration values default to empty. The bridge therefore does not activate person authority until deployment identity values are explicitly reviewed and configured. ## Person Gate - The adapter calls local read-only `resolve_identity` with all five dimensions. - Only `state=resolved`, active profile, `verified` or `explicit_linked` assurance, and an active exact stored link may add `unified_person_projection` plus `unified_person_source_identity` to `session_context`. - Missing dimensions, pending identities, identity conflicts, low assurance, changed links, cross-user calls, and cross-platform calls keep person authority absent. - Resolution never creates, links, merges, or otherwise mutates a person. ## Verification - Directed: P2 bridge, P0 contract, P1 registry, compose-argument, and platform-alias suites - 28 tests passed. - Full: `python -m unittest discover -s tests -q` - 272 tests passed. - `compileall` and `git diff --check` passed; `compileall` emitted only the pre-existing unreadable `.pytest_cache` notice. - Counterfactual coverage includes unique platform-name-to-instance resolution, exact selection among same-kind instances, ambiguous platform-kind rejection, empty instance configuration, missing namespace mapping, pending, observed/low assurance, cross-user, conflicting caller user, cross-platform, and unlinked-link cases. - P0 descriptor, fixture, and fingerprint remain unchanged. - No commit, push, deployment, or production migration was performed.