Orchestrata Ultimate › Plans › kernel-consolidation-plan
Plan: Consolidate Kernel Orchestration onto the Mixin PipelineRunner
Source: plans/kernel-consolidation-plan.md at 8a2cb42ad · last changed 2026-07-27 · first committed 2026-06-18 · 52 lines.
Prose pending.
Plan text
Plan: Consolidate Kernel Orchestration onto the Mixin PipelineRunner
Date: 2026-05-27 · Mode: verify locally, commit to master (no CI) Verified against:
plans/ast-ultimate.json(fresh) viaast-query+ RLM. Principle: keep the working behavior (SpikeKernel), move it into the proper structure (mixinPipelineRunner+Postman). One orchestrator, faithful to the intended design.
AST-verified reality
| Thing | State | Evidence |
|---|---|---|
SpikeKernel (kernel/pipeline.py, 722 lines, bases=[]) |
the only orchestrator actually instantiated — pipeline_cli.py:27; uses SpikePostman |
RLM: SpikeKernel() = 1 site |
PipelineRunner (mixin; in both kernel/pipeline.py & kernel/pipeline_runner.py) |
never instantiated (dead/aspirational, "Production" docstring); uses Postman |
RLM: PipelineRunner() = 0 sites |
| Method coverage | all 18 SpikeKernel method names exist in the mixins/PipelineRunner (structure complete; bodies must be checked for parity) |
RLM overlap: SpikeKernel-only = ∅ |
| Router API | Postman (bases SyncRouterMixin,IPostman) inherits route_sync/get_thread_packets/get_log → covers what the runner calls. SpikePostman is a minimal parallel router used only by SpikeKernel (+ its tests). |
postman/sync_router.py |
kernel/cli_main.py |
third boot path: config + health server + _boot_intent_pipeline, on Postman (no SpikeKernel, no PipelineRunner) |
grep |
Two PipelineRunner copies |
identical except pipeline_runner.py adds a local _human_handler override |
RLM diff |
ArchitectAgent vs ArchitectVolk |
byte-identical; ArchitectAgent never instantiated, ArchitectVolk used by SpikeKernel.boot |
RLM: ArchitectAgent() = 0 sites |
Repoint surface (grep — the AST dependency_graph is unreliable here, returns ∅):
kernel/pipeline_cli.pyimportsSpikeKernel.tests/kernel/test_pipeline{,_expanded,_extended,_pure}.pyimport fromkernel.pipeline.tests/kernel/test_pipeline_runner.pyimports the dup.tests/postman/test_spike_router.pytestsSpikePostman.harness/executor.py+ architect tests importArchitectAgent.
Target end-state
One orchestrator: the mixin PipelineRunner in kernel/pipeline.py, on Postman, carrying SpikeKernel's proven behavior. Deleted: SpikeKernel, kernel/pipeline_runner.py (dup), SpikePostman (+ tests), ArchitectAgent. pipeline_cli.py and cli_main.py both drive PipelineRunner.
Steps (each ends with a local check)
Step 1 — Feasibility gate (do FIRST; non-destructive). Locally PipelineRunner().boot() + one submit_intent + respond on Postman. If it works → proceed. If it breaks, diff SpikeKernel method bodies vs the mixin path and port the deltas (esp. boot/_register_volks/submit_intent/_route_escalation, and any SpikePostman-vs-Postman behavior) until parity. Do not delete SpikeKernel until the runner is proven.
Step 2 — Reconcile the two PipelineRunner copies into kernel/pipeline.py (fold in pipeline_runner.py's _human_handler override if it differs meaningfully from PipelineSessionMixin._human_handler); delete kernel/pipeline_runner.py.
Step 3 — Repoint entrypoints. pipeline_cli.py: SpikeKernel → PipelineRunner. Confirm cli_main.py's _boot_intent_pipeline targets PipelineRunner (or document why it stays component-based).
Step 4 — Delete SpikeKernel from kernel/pipeline.py and SpikePostman (postman/spike_router.py); migrate/retire tests/postman/test_spike_router.py (port still-relevant assertions to Postman/SyncRouterMixin tests if not already covered).
Step 5 — Architect dedup (independently safe). Delete agents/volks/architect/agent.py (ArchitectAgent); repoint harness/executor.py + architect tests to ArchitectVolk; retire the duplicate generated tests.
Step 6 — Update kernel tests. tests/kernel/test_pipeline*.py → target PipelineRunner; remove test_pipeline_runner.py (merge unique cases first).
Step 7 — Verify locally + commit to master. ruff/black/mypy clean; run tests/kernel/, tests/postman/, tests/agents/volks/architect/ against the incus Redis/Neo4j; commit each coherent step to master.
Agent assignment
- Agent A (runner): Steps 1–4 (feasibility gate → reconcile → repoint → delete
SpikeKernel/SpikePostman). Highest care; gated on Step 1. - Agent B (architect): Step 5 (independent, safe — can run in parallel).
- Agent C (tests): Step 6, after A/B land.
- I verify each agent's diff + run the local checks before committing.
Risks
PipelineRunner+Postmanis unexercised → Step 1 gate is mandatory before any deletion.Postmanis richer thanSpikePostman(queues/retry) — confirmroute_syncbehaves equivalently for the pipeline's synchronous flow.- Touches the just-greened test suite → local verification per step, no blind deletes.