transformation registry, transformation runs, and derived artifact lineage

This commit is contained in:
2026-05-06 18:05:44 +02:00
parent 27c068f9ac
commit 43c06d6024
14 changed files with 1695 additions and 8 deletions

View File

@@ -4,13 +4,13 @@ type: workplan
title: "Traceable Transformations And Workflow Jobs"
domain: markitect
repo: kontextual-engine
status: todo
status: active
owner: codex
topic_slug: markitect
planning_priority: high
planning_order: 8
created: "2026-05-05"
updated: "2026-05-05"
updated: "2026-05-06"
state_hub_workstream_id: "1b7a6b04-7879-4862-bb3e-817f7f20fc59"
---
@@ -45,11 +45,20 @@ workflow helpers. The engine owns the operation registry, run state, actors,
policy checks, derived artifact identity, lineage, retries, review gates, and
audit events.
## Implementation Status
The first foundation slice is implemented for transformation operations,
transformation run persistence, and derived artifact lineage. See
`docs/transformation-implementation.md`.
Workflow templates, job runner orchestration, review gates, exception queues,
and richer workflow audit reconstruction remain open in this workplan.
## O8.1 - Implement transformation operation registry
```task
id: KONT-WP-0008-T001
status: todo
status: done
priority: high
state_hub_task_id: "ee2471b1-fab3-48f5-8b2d-d8f624abfc35"
```
@@ -66,11 +75,20 @@ Acceptance:
- Markdown compose, include, transform, and validate operations are registered
as adapter-backed operations rather than reimplemented.
Implemented:
- `TransformationOperationRegistry` and default operation descriptors are in
`src/kontextual_engine/services/transformation_service.py`.
- `structured_view` is executable inside the engine as a generic derived
structured representation.
- Markdown operations are registered with `adapter_ref="markitect-tool"` and
no local handler, preserving the boundary against reimplementing Markitect.
## O8.2 - Implement transformation runs with parameters actors and policy context
```task
id: KONT-WP-0008-T002
status: todo
status: done
priority: high
state_hub_task_id: "1eac7b47-8cff-4736-9f7d-599123218bad"
```
@@ -85,11 +103,20 @@ Acceptance:
outputs.
- Parameters needed to interpret or reproduce the run are preserved.
Implemented:
- `TransformationRun` records include operation, source assets, source
versions, parameters, actor, correlation ID, policy context, diagnostics,
timestamps, status, retry metadata, and output asset IDs.
- Source-read and run-execution policy decisions are captured before handler
execution.
- Run state is persisted in memory and SQLite repositories.
## O8.3 - Persist derived artifacts and source lineage
```task
id: KONT-WP-0008-T003
status: todo
status: done
priority: high
state_hub_task_id: "837ad793-2e9a-41f0-bce6-0a75815b5c15"
```
@@ -104,6 +131,15 @@ Acceptance:
policy context, and output representation.
- Re-runs create new traceable records rather than silently overwriting outputs.
Implemented:
- Executed transformations can persist governed derived assets through
`AssetRegistryService`.
- `DerivedArtifactLineage` records are saved and queryable by output asset,
source asset, or transformation run.
- Derived asset versions use `VersionChangeType.DERIVED_OUTPUT` and point back
to the transformation run and source parent version.
## O8.4 - Implement workflow templates steps dependencies and preconditions
```task