2.5 KiB
2.5 KiB
OPS Unified Person P2 Bridge Receipt
Scope
- Repository:
astrbot_plugin_private_companion-mainonly. - This correction wires the existing direct
MemoryCompanion.compose_contextpath 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 explicitunified_person_companion_instance_idconfiguration.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 fromunified_person_subject_namespace_map, configured as oneadapter=namespacepair per line.platform_subject_id: currentevent.get_sender_id()value. A conflicting caller-supplieduser_idfails 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_identitywith all five dimensions. - Only
state=resolved, active profile,verifiedorexplicit_linkedassurance, and an active exact stored link may addunified_person_projectionplusunified_person_source_identitytosession_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. compileallandgit diff --checkpassed;compileallemitted only the pre-existing unreadable.pytest_cachenotice.- 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.