- I-1: test 6 uses the call-time _store_path seam (EVENT_LOG is import-time frozen — root cause of live-journal pollution AND test rot); binds to this run's failed task. Red-green proven. - I-3: canary inspects _run_warm_router's body for 12 banned identifiers (covers the 15 steps the mock sentinels missed). Red-green proven. - I-2: /sleep -> /dream correction; stale 493 -> 495.
6.3 KiB
Pipeline Removal — the per-turn cognitive pipeline is gone (P0-04, #20)
Status: shipped on
p0-04-pipeline-removal. Frozen contract:tests/test_p0_04_pipeline_removal.py. Canary:src/rune/canary_p0_04.py(registered in.gitea/workflows/ci.yml).
What ran per turn BEFORE
Every ordinary user message (on_input_submitted) spawned a warm-router
thread and a pre-dispatch parallel block — a timer firing simulated
consciousness:
Pre-dispatch parallel block (display-only, per message):
auto_context.build_auto_context(text)auto_tasks.extract_tasks(text, channel)behavior.match_context(text)
_run_warm_router — the 21-step pipeline (~390 lines, ~120 ms per
message, measured on hello world performance baseline):
| # | Step | Call |
|---|---|---|
| 1 | Warm router | warm_router.route(text) |
| 2 | Capability broker | capability_broker.match_capabilities(query, top_k=3) |
| 3 | Memory recall | memory_store.cached_recall(db, query, budget=3) |
| 4 | Witness | witness.detect_signals(message=text) |
| 5 | Cache check | cache.get_cache("response:...") |
| 6 | Persona | prompt_sync.get_defining_principles() |
| 7 | Abstraction facts | abstraction.connect() + SQL LIKE scan |
| 8 | Graph memory | graph_memory.connect() + entity resolve |
| 9 | Context pressure | context_pressure.measure_pressure(recent) |
| 10 | Event emit | event_bus.emit("on_context", ...) |
| 11 | Drift check | drift_ledger.check(strict=False, autofix=False) |
| 12 | Goals | task_persist.load() |
| 13 | Time awareness | time_awareness.get_time_context() |
| 14 | Neuron count | warm_neuron_store.get_stats() |
| 15 | Hooks | hook_engine.fire("pre_message", ...) |
| 16 | Voice blend | voice_hybrid.get_blend_info() |
| 17 | Sleep consolidation | sleep_time.consolidate() (silently broken — the attribute never existed, swallowed by except: pass) |
| 18 | Repo map | tool_executor.execute_tool("repo_map", ...) |
| 19 | Auto-read | tool_executor.execute_tool("read_file", ...) |
| 20 | Auto-search | tool_executor.execute_tool("grep_files", ...) |
| 21 | Memory filter | re-filter of _ambient_memory_results |
Model-relevant output of all of it: zero (a dim display-only status
line), while carrying live side effects: neuron state mutation, hook firing,
sleep-consolidation attempts, per-turn event spam, and 17 record_failure
observability calls in rune_tui.py alone.
What runs NOW
- One path per message:
on_input_submitted→_send_to_model→rune_operator.send_task→ ContextBroker assembles all model-facing context (#19). Nothing else runs per turn. - Session-scoped startup checks stay (
_startup_checkat mount:compile_persona,scan_registry,load_tasks— never per-turn). _run_warm_routersurvives as a documented no-op (compat shim); the docstring points here._warm_router_threadand the pre-dispatch parallel block are deleted outright.- Measured overhead: ~120 ms → ~0 ms per message (no-op return).
Capability table — where everything lives on
Nothing was deleted. Every former pipeline capability is reachable on demand:
| Capability | On demand via | Module |
|---|---|---|
| Warm router / neuron priming | /neurons, direct call |
warm_router.py |
| Capability broker (legacy matcher) | direct call | capability_broker.py |
| Memory recall | broker memory contributors, /memory |
memory_store.py |
| Witness signals | direct call | witness.py |
| Response cache | direct call | cache.py |
| Persona | /persona, startup check |
prompt_sync.py |
| Abstraction | /abstraction |
abstraction.py |
| Graph memory | /graph |
graph_memory.py |
| Context pressure | /pressure |
context_pressure.py |
| Event journal | /events |
event_bus.py |
| Drift check | /drift |
drift_ledger.py |
| Goals | /goal |
goal.py, task_persist.py |
| Time awareness | /time, /night |
time_awareness.py, night_mode.py |
| Neurons | /neurons |
warm_neuron_store.py |
| Hooks | /hooks (pre/post message fire kept around the operator call) |
hook_engine.py |
| Voice | /voice, /voice_sync |
voice_hybrid.py, voice_sync.py |
| Sleep consolidation | /dream — now actually works: sleep_time.consolidate() was added (the old per-turn call targeted a nonexistent attribute and silently never ran) |
sleep_time.py → MemoryConsolidation.consolidate_all() |
| Repo map / auto-read / auto-search | tool calls (tool_executor.execute_tool) |
tool_executor.py |
| Auto-context / auto-tasks / behavior | direct call (auto_context.build_auto_context, auto_tasks.extract_tasks, behavior.match_context) |
auto_context.py, auto_tasks.py, behavior.py |
Event-trigger seed (#48-compatible)
The pipeline's side effects split three ways (plan research): display status → broker trace; neuron priming → explicit trigger; sleep/drift/persona sync → meaningful-event triggered. This stage seeds the taxonomy, it does NOT build the trigger engine (that is #48 / P3-05):
- Session start — the existing startup checks (unchanged).
- Explicit /commands —
/drift,/pressure,/health,/events,/dream, ... (unchanged). - NEW:
task.failed— the operator emits the typed vocabulary event (event_bus.emit("task.failed", source="rune_operator", ...)) on every send_task failure transition (rune_operator._emit_task_failed, both the direct path and the approval-resolution path via_apply_runtime_result). This is the first endogenous trigger.#48grows the taxonomy and builds the scheduler on top of these seeds.
Acceptance evidence
- 5 frozen tests green (red proven first: pipeline still ran + pre-dispatch still present); full suite 495 passed + 84 subtests (baseline 488 + 84; the only delta is the 5 new tests — zero regressions).
grep -c record_failure src/rune/rune_tui.py: 21 → 4 (the pipeline's 17 calls died with it; the 4 remaining are the startup/provider paths).src/rune/canary_p0_04.pygreen, registered in the CI canary loop in the same commit (henxels gate).- Authority map (
config/v1_authority_map.json): the twocontext_constructionTUI entries updated to reflect the completed removal (the disposition vocabulary has noremovedvalue, so they stayarchive-candidatewith removal evidence).