generated from coulomb/repo-seed
Add profile-driven runtime adapter resolution
This commit is contained in:
121
workplans/PMEM-WP-0008-profile-driven-runtime-configuration.md
Normal file
121
workplans/PMEM-WP-0008-profile-driven-runtime-configuration.md
Normal file
@@ -0,0 +1,121 @@
|
||||
---
|
||||
id: PMEM-WP-0008
|
||||
type: workplan
|
||||
title: "Profile-Driven Runtime Configuration"
|
||||
domain: markitect
|
||||
repo: phase-memory
|
||||
status: finished
|
||||
owner: codex
|
||||
topic_slug: phase-memory
|
||||
created: "2026-05-18"
|
||||
updated: "2026-05-18"
|
||||
---
|
||||
|
||||
# PMEM-WP-0008: Profile-Driven Runtime Configuration
|
||||
|
||||
## Goal
|
||||
|
||||
Turn Markitect-compatible memory profile metadata into concrete local runtime
|
||||
configuration, then resolve that configuration into adapter instances without
|
||||
silently pretending external adapters exist.
|
||||
|
||||
This advances the scorecard rows for profile contract ingress, profile
|
||||
execution planning, service readiness, and developer experience.
|
||||
|
||||
## Current Evidence
|
||||
|
||||
PMEM-WP-0007 added `RuntimeConfig`, local service contracts, health reports,
|
||||
and conformance helpers. The remaining gap was that `runtime_from_config`
|
||||
returned a default in-memory runtime regardless of config content, so profiles
|
||||
could not drive local file-backed runtime construction.
|
||||
|
||||
## Non-Goals
|
||||
|
||||
- Build live Markitect, Kontextual, telemetry, or external policy adapters.
|
||||
- Add framework-specific HTTP service bindings.
|
||||
- Change runtime envelope schemas.
|
||||
|
||||
## Implementation Update - 2026-05-18
|
||||
|
||||
Implemented the first profile-driven runtime configuration slice:
|
||||
|
||||
- Added `RuntimeConfig.from_profile(...)` for Markitect-compatible profile
|
||||
mapping and `ProfileIntent` inputs.
|
||||
- Added adapter mode normalization for the local aliases already used in
|
||||
fixtures, including `local-graph-store`, `local-event-log`, and
|
||||
`markitect-context-package`.
|
||||
- Added `RuntimeAdapterBundle` and `resolve_runtime_adapters(...)`.
|
||||
- Updated `runtime_from_config(...)` and `LocalServiceRunner` to use adapter
|
||||
resolution.
|
||||
- Wired local file-backed graph stores, JSONL event logs, JSONL audit sinks,
|
||||
in-memory semantic indexes, and in-memory runtime registries.
|
||||
- Added diagnostics that block unresolved external adapters instead of falling
|
||||
back silently.
|
||||
- Added regression tests and service readiness docs.
|
||||
|
||||
## T01 - Derive runtime config from profiles
|
||||
|
||||
```task
|
||||
id: PMEM-WP-0008-T01
|
||||
status: done
|
||||
priority: high
|
||||
```
|
||||
|
||||
Map profile stores, policy, activation, observability, and runtime metadata
|
||||
into `RuntimeConfig`.
|
||||
|
||||
## T02 - Normalize local adapter aliases
|
||||
|
||||
```task
|
||||
id: PMEM-WP-0008-T02
|
||||
status: done
|
||||
priority: medium
|
||||
```
|
||||
|
||||
Support fixture-compatible aliases such as `local-graph-store`,
|
||||
`local-event-log`, and `markitect-context-package`.
|
||||
|
||||
## T03 - Resolve config to local adapters
|
||||
|
||||
```task
|
||||
id: PMEM-WP-0008-T03
|
||||
status: done
|
||||
priority: high
|
||||
```
|
||||
|
||||
Materialize supported local adapter modes into concrete adapter instances and
|
||||
return a reusable adapter bundle.
|
||||
|
||||
## T04 - Block unresolved external adapters
|
||||
|
||||
```task
|
||||
id: PMEM-WP-0008-T04
|
||||
status: done
|
||||
priority: high
|
||||
```
|
||||
|
||||
Emit diagnostics and prevent runtime construction when a profile or config
|
||||
declares an external adapter that the caller did not provide.
|
||||
|
||||
## T05 - Add regression tests and docs
|
||||
|
||||
```task
|
||||
id: PMEM-WP-0008-T05
|
||||
status: done
|
||||
priority: medium
|
||||
```
|
||||
|
||||
Cover file-backed profile-driven resolution, missing external adapter
|
||||
diagnostics, and document the supported first-slice adapter modes.
|
||||
|
||||
## Acceptance Criteria
|
||||
|
||||
- A profile can configure a file-backed local runtime.
|
||||
- Adapter resolution is deterministic and inspectable.
|
||||
- External adapter modes cannot silently degrade to local allow-all behavior.
|
||||
- Tests cover success and failure paths.
|
||||
|
||||
## Closure Review - 2026-05-18
|
||||
|
||||
Closed after adding profile-derived runtime config, adapter bundles, local
|
||||
resolver tests, and service readiness documentation.
|
||||
Reference in New Issue
Block a user