Add fake external adapter packs

This commit is contained in:
2026-05-18 22:40:53 +02:00
parent e92c8f8c89
commit d1b46ad2f3
8 changed files with 472 additions and 13 deletions

View File

@@ -44,33 +44,33 @@ not what adjacent repositories may already provide.
## Current Baseline - 2026-05-18
Overall maturity: **4.4 / 5**
Overall maturity: **4.5 / 5**
The repo has crossed from intent-only into a working deterministic library
foundation, a usable local runtime facade, a CLI, a file-backed local
workspace, first-slice policy/review/audit gates, a concrete Markitect package
bridge, deterministic activation quality helpers, and first-slice service
readiness contracts with profile-driven runtime adapter resolution and
profile-derived lifecycle rules.
readiness contracts with profile-driven runtime adapter resolution,
profile-derived lifecycle rules, and fake external adapter packs.
| Dimension | Current | Target | Evidence | Needed Next |
| --- | ---: | ---: | --- | --- |
| Intent and boundaries | 4.0 | 5.0 | `INTENT.md`, `SCOPE.md`, `README.md`, architecture doc, PMEM-WP-0001 closure | Keep boundaries current as runtime behavior expands. |
| Package foundation | 4.0 | 4.0 | Python package, exports, runtime facade, CLI entrypoint, config, service contracts, dependency-light tests | Maintain public API compatibility as adapters expand. |
| Profile contract ingress | 3.2 | 4.0 | Markitect-compatible profile loading, diagnostics, runtime envelopes, profile-derived runtime config, local adapter alias normalization | Add richer compatibility coverage. |
| Graph/event contract ingress | 3.5 | 4.0 | Graph loading, edge endpoint diagnostics, event model, JSONL event log, export, repair diagnostics, service import/export contracts | Add broader external adapter fixtures. |
| Graph/event contract ingress | 3.7 | 4.0 | Graph loading, edge endpoint diagnostics, event model, JSONL event log, export, repair diagnostics, service import/export contracts, fake external graph/event adapters | Add broader external adapter fixtures. |
| Phase domain model | 3.4 | 4.0 | Phases, memory kinds, lifecycle states, actions, explicit path records, profile-derived transition rules | Add migration semantics. |
| Profile execution planning | 3.8 | 4.0 | Adapter plan, capabilities, policy gates, fallback behavior, CLI output, snapshot fixture, service contract, config-driven local adapter resolution | Add external adapter injection coverage. |
| Profile execution planning | 4.0 | 4.0 | Adapter plan, capabilities, policy gates, fallback behavior, CLI output, snapshot fixture, service contract, config-driven local and fake external adapter resolution | Maintain compatibility as live adapters land. |
| Lifecycle planning | 3.6 | 4.0 | Transition, retention, refresh, compaction dry-run plans, profile-driven lifecycle rules, review-gated local apply | Add service apply contracts and migration semantics. |
| Activation planning | 3.8 | 5.0 | Budgeted selection, Markitect-compatible selection output, package request envelope, graph neighborhoods, event paths, ranking, metadata preservation, metrics | Add semantic-index adapters and broader evaluation corpora. |
| Local persistence | 3.0 | 4.0 | Versioned local workspace, file-backed graph store, JSONL event log, JSONL audit sink | Add migration/repair utilities and stronger durability semantics. |
| Policy and audit | 3.2 | 5.0 | Operation points, policy gateway checks, audit schema, review records, redaction, activation denials | Add external policy adapters and richer audit retention behavior. |
| Observability and diagnostics | 3.5 | 4.0 | Planner diagnostics, runtime diagnostics, event log corruption checks, repair diagnostics, policy denial diagnostics, health envelopes, adapter status | Add production telemetry adapters. |
| Markitect interop | 3.5 | 4.0 | Compatible contract ingress, optional validation boundary, enriched selection metadata, package request/response envelopes | Add live optional Markitect compiler adapter when available. |
| Kontextual/Infospace interop | 2.5 | 4.0 | Boundaries documented, small derived fixtures, activation quality report fixture, Kontextual delegation envelope | Add live fake/real delegation adapters and broader Infospace reports. |
| Testing and evaluation | 4.0 | 4.0 | 58 deterministic tests over planners, adapters, runtime envelopes, CLI, snapshots, file-store round trips, lifecycle rules, apply denial, review records, audit schema, policy redaction, Markitect bridge fixtures, retrieval, activation metrics, service contracts, config, health, conformance, and adapter resolution | Add broader evaluation corpora. |
| Service readiness | 3.9 | 4.0 | Runtime ports, service contracts, config model, profile-derived adapter resolution, health checks, local service runner lifecycle support, adapter conformance helpers | Add framework-specific bindings and production adapter packs. |
| Developer experience | 3.6 | 4.0 | README quick start, package map, runtime facade docs, CLI examples, local persistence guide, service adapter resolution docs, lifecycle rule docs | Add troubleshooting and richer examples. |
| Policy and audit | 3.5 | 5.0 | Operation points, policy gateway checks, audit schema, review records, redaction, activation denials, fake external policy/audit adapters | Add richer audit retention behavior and live policy adapters. |
| Observability and diagnostics | 3.8 | 4.0 | Planner diagnostics, runtime diagnostics, event log corruption checks, repair diagnostics, policy denial diagnostics, health envelopes, adapter status, fake telemetry audit sink | Add production telemetry adapters. |
| Markitect interop | 3.7 | 4.0 | Compatible contract ingress, optional validation boundary, enriched selection metadata, package request/response envelopes, fake Markitect package compiler | Add live optional Markitect compiler adapter when available. |
| Kontextual/Infospace interop | 3.0 | 4.0 | Boundaries documented, small derived fixtures, activation quality report fixture, Kontextual delegation envelope, fake Kontextual runtime registry | Add live delegation adapters and broader Infospace reports. |
| Testing and evaluation | 4.0 | 4.0 | 60 deterministic tests over planners, adapters, runtime envelopes, CLI, snapshots, file-store round trips, lifecycle rules, apply denial, review records, audit schema, policy redaction, Markitect bridge fixtures, retrieval, activation metrics, service contracts, config, health, conformance, adapter resolution, and fake external packs | Add broader evaluation corpora. |
| Service readiness | 4.0 | 4.0 | Runtime ports, service contracts, config model, profile-derived adapter resolution, health checks, local service runner lifecycle support, adapter conformance helpers, fake external adapter pack | Add framework-specific bindings and production adapter packs. |
| Developer experience | 3.7 | 4.0 | README quick start, package map, runtime facade docs, CLI examples, local persistence guide, service adapter resolution docs, lifecycle rule docs, external adapter pack docs | Add troubleshooting and richer examples. |
## Progress Update - PMEM-WP-0002
@@ -194,6 +194,27 @@ Remaining maturity blockers:
- Live external adapter implementations.
- Broader evaluation corpora.
## Progress Update - PMEM-WP-0010
Closed on 2026-05-18:
- Added `ExternalAdapterPack`.
- Added deterministic fake external graph and event adapters.
- Added fake Markitect package compiler.
- Added fake external policy gateway.
- Added fake telemetry audit sink with retention metadata.
- Added fake semantic index and fake Kontextual runtime registry.
- Added `fake_external_adapter_pack()` and `fake_external_runtime_config()`.
- Added conformance tests and all-external runtime wiring tests.
- Added external adapter pack documentation and README links.
Remaining maturity blockers:
- Live external adapter implementations.
- Broader evaluation corpora.
- Framework-specific service bindings.
- Production audit retention and telemetry integrations.
## Progress Update - PMEM-WP-0004
Closed on 2026-05-18:
@@ -259,6 +280,7 @@ flowchart TD
WP7["PMEM-WP-0007\nService readiness and adapters"]
WP8["PMEM-WP-0008\nProfile-driven runtime config"]
WP9["PMEM-WP-0009\nProfile-driven lifecycle rules"]
WP10["PMEM-WP-0010\nFake external adapter packs"]
WP1 --> WP2
WP2 --> WP3
@@ -277,6 +299,8 @@ flowchart TD
WP2 --> WP9
WP4 --> WP9
WP8 --> WP9
WP7 --> WP10
WP8 --> WP10
```
## Next Tracking Cadence

View File

@@ -0,0 +1,116 @@
---
id: PMEM-WP-0010
type: workplan
title: "Fake External Adapter Packs"
domain: markitect
repo: phase-memory
status: finished
owner: codex
topic_slug: phase-memory
created: "2026-05-18"
updated: "2026-05-18"
---
# PMEM-WP-0010: Fake External Adapter Packs
## Goal
Provide a deterministic fake external adapter pack that exercises the same
adapter injection path live Markitect, Kontextual, semantic index, policy, and
telemetry integrations will use.
This refines the external adapter workplan direction into a testable first
slice: no live service dependency, but no silent fallback either.
## Current Evidence
PMEM-WP-0008 made `external` adapter modes explicit and blocked unresolved
external adapters. PMEM-WP-0009 added profile-driven lifecycle planning. The
remaining service-readiness gap was a supplied external adapter pack that could
pass public conformance helpers and run through the service/runtime wiring.
## Non-Goals
- Call live Markitect, Kontextual, telemetry, or policy services.
- Add credentials, network dependencies, or deployment configuration.
- Replace the local file-backed adapters.
## Implementation Update - 2026-05-18
Implemented the fake external adapter pack:
- Added `ExternalAdapterPack`.
- Added fake external graph store and event log adapters.
- Added fake Markitect package compiler.
- Added fake external policy gateway.
- Added fake telemetry audit sink with retention metadata.
- Added fake semantic index and Kontextual runtime registry.
- Added `fake_external_adapter_pack()` and `fake_external_runtime_config()`.
- Added conformance and runtime wiring tests.
- Added docs and README links.
## T01 - Add fake external adapter pack model
```task
id: PMEM-WP-0010-T01
status: done
priority: high
```
Add a small pack record with adapter instances, capabilities, and metadata.
## T02 - Add fake Markitect and Kontextual adapters
```task
id: PMEM-WP-0010-T02
status: done
priority: high
```
Provide fake package compiler and runtime registry adapters that match the
public ports.
## T03 - Add fake policy, audit, semantic, graph, and event adapters
```task
id: PMEM-WP-0010-T03
status: done
priority: high
```
Provide deterministic fake implementations for the remaining runtime ports.
## T04 - Prove external config wiring
```task
id: PMEM-WP-0010-T04
status: done
priority: high
```
Resolve an all-external runtime config with the supplied fake pack and verify
runtime package compilation plus registry publication.
## T05 - Document adapter pack usage
```task
id: PMEM-WP-0010-T05
status: done
priority: medium
```
Document fake pack usage, conformance expectations, and the relationship to
future live adapters.
## Acceptance Criteria
- The fake pack satisfies all public conformance helpers.
- An all-external runtime config resolves when the pack is supplied.
- Missing external adapter behavior remains unchanged.
- Runtime envelopes can compile packages through the fake Markitect adapter.
- Runtime envelopes can be published through the fake Kontextual registry.
## Closure Review - 2026-05-18
Closed after adding fake external adapter implementations, adapter pack helpers,
runtime wiring coverage, and documentation.