From be2281eb13f84710e61e21c6a9e9c03571ea4a21 Mon Sep 17 00:00:00 2001 From: "ilblackdragon@gmail.com" Date: Tue, 24 Mar 2026 00:08:10 -0700 Subject: [PATCH] docs(engine): document routine/job gap and SIGKILL crash scenario MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Routines are entirely v1 — not hooked up to engine v2. When a user asks "create a routine" as natural language, engine v2 tries to call routine_create via CodeAct, but the tool needs RoutineEngine + Database refs that the bridge's minimal JobContext doesn't provide. This caused a SIGKILL crash during testing. Options documented: block routine tools in v2 (short term), pass refs through context (medium), replace with Mission system (long term). Co-Authored-By: Claude Opus 4.6 (1M context) --- docs/plans/2026-03-20-engine-v2-architecture.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/plans/2026-03-20-engine-v2-architecture.md b/docs/plans/2026-03-20-engine-v2-architecture.md index f02d4027..21f19c55 100644 --- a/docs/plans/2026-03-20-engine-v2-architecture.md +++ b/docs/plans/2026-03-20-engine-v2-architecture.md @@ -411,6 +411,19 @@ The web gateway is completely disconnected from engine v2. Three gaps: 3. After thread completion, write user message + response to v1 DB via `store.add_conversation_message()` 4. Gateway reads from DB as usual — no gateway code changes needed +#### Routines / Jobs (NOT HOOKED UP) + +Routines are entirely v1 — `RoutineEngine` fires via cron/event triggers and runs through `run_agentic_loop()` with its own delegate. Engine v2 routing only intercepts `UserInput` and `ApprovalResponse` in `handle_message`. Routine execution doesn't go through `handle_message`. + +**Known issue:** When a user asks "create a routine for..." as natural language, engine v2 processes it via CodeAct. The model calls `routine_create(...)` which needs `Arc` + `Arc` — these exist on the tool but the `JobContext` built by the bridge has minimal fields. This can cause crashes (observed: SIGKILL during routine creation attempt). + +**Options:** +- Short term: block routine/job tools in engine v2 (return "use /routine command instead") +- Medium term: pass `RoutineEngine` + DB refs through `JobContext.metadata` or a dedicated context field +- Long term: replace routines with engine v2 `Mission` system + +Engine v2 has `Mission` types (`MissionManager`, `MissionCadence`, `MissionStatus`) defined but not wired to trigger infrastructure. + #### Acceptance testing (NOT YET IMPLEMENTED) - Drive engine via TestRig + TraceLlm fixtures - Compare output with `verify_trace_expects()`