1.9 KiB
External Adapter Packs
phase-memory can resolve runtime configuration values that declare adapter
mode external. Missing external adapters still fail resolution, but supplied
adapter packs can satisfy the public runtime ports.
Fake External Pack
phase_memory.external_adapters.fake_external_adapter_pack() returns a local
fake pack for conformance and integration tests. It provides:
FakeExternalGraphStoreFakeExternalEventLogFakeExternalPolicyGatewayFakeTelemetryAuditSinkFakeMarkitectPackageCompilerFakeExternalSemanticIndexFakeKontextualRuntimeRegistry
The pack is not a production adapter. It is intentionally deterministic and dependency-light so that service wiring, conformance helpers, and runtime envelopes can be tested before live Markitect, Kontextual, or telemetry services exist.
Runtime Wiring
from phase_memory.external_adapters import (
fake_external_adapter_pack,
fake_external_runtime_config,
)
from phase_memory.service import runtime_from_config
config = fake_external_runtime_config()
pack = fake_external_adapter_pack()
runtime = runtime_from_config(config, external_adapters=pack.adapters)
resolve_runtime_adapters(config, external_adapters=pack.adapters) returns a
RuntimeAdapterBundle with diagnostics. External declarations produce
external_adapter_declared warnings. Missing adapters produce
missing_external_adapter errors and block runtime construction.
Conformance
The fake pack passes the same public helpers expected of live adapters:
assert_graph_store_conformanceassert_event_log_conformanceassert_context_compiler_conformanceassert_policy_gateway_conformanceassert_audit_sink_conformanceassert_semantic_index_conformanceassert_runtime_registry_conformance
Live adapter packs should pass those helpers before being wired into a runtime or service runner.