Skip to content

[EPIC][P0] Production Loop to Runtime execution, routing, concurrency and evidence #696

Description

@wesleysimplicio

Mission

Finish the production integration between Simplicio Loop and Simplicio Runtime without changing the portable nature of Loop.

Loop must continue to operate standalone. When the runtime-backed profile is explicitly selected, Runtime becomes the single governed executor for effects, processes, validation evidence and delivery receipts. The coordinator/LLM remains responsible for semantic reasoning; Runtime never becomes the cognitive owner.

Current verified gaps

  • RuntimeBridge exists and is tested, but is not the main runner's production effect path.
  • RuntimeBridge defaults to simplicio-runtime while the published binary is simplicio.
  • One global lock serializes unrelated workspaces.
  • simplicio.execution-route/v1 exists but is not a required runner stage.
  • The full installed Loop -> Runtime -> Mapper -> Dev CLI -> watcher -> HBP chain is not release-proven.
  • Runtime/Loop documentation and capability lists drift from compiled behavior.
  • Internal JSON migration is already tracked separately and must not be duplicated here.

Child issues

Related existing programs

Runtime:

  • wesleysimplicio/simplicio-runtime#2983 — warm persistent integration and self-exec removal
  • wesleysimplicio/simplicio-runtime#3043 — authoritative CLI/MCP capability manifest
  • wesleysimplicio/simplicio-runtime#3134 — coordinator/runtime ownership
  • wesleysimplicio/simplicio-runtime#3218 — EffectTransaction/v1
  • wesleysimplicio/simplicio-runtime#3459 — loop-execution/v1 consumer
  • wesleysimplicio/simplicio-runtime#3570 — fail-closed receipt durability
  • wesleysimplicio/simplicio-runtime#3571 — compiled policy as documentation source

Loop:

Delivery order

Phase 0 — baseline and contracts

  1. Freeze installed release versions and source SHAs.
  2. Capture process trace, p50/p95 latency, tokens, RSS and current direct-effect paths.
  3. Define standalone versus runtime-backed profile behavior.
  4. Freeze minimum Runtime capability and EffectTransaction versions.
  5. Add failure-state vocabulary: unavailable, incompatible, denied, uncertain, evidence-incomplete, cancelled and verified.

Phase 1 — reliable bridge

  1. Implement [P0][Runtime Bridge] Resolve the canonical simplicio binary and verify MCP capabilities before effects #692 binary identity/capability negotiation.
  2. Implement [P0][Concurrency] Replace the global RuntimeBridge lock with bounded per-workspace sessions #691 per-workspace lifecycle, queues and locks.
  3. Prove reconnect, cancellation, bounded output and zero orphan processes.
  4. Make cold CLI fallback explicit and observable; never silent.

Phase 2 — routing and executor integration

  1. Implement [P0][Routing] Integrate worker-agent-hybrid execution decisions into the production runner #694 before any production work item is dispatched.
  2. Implement [P0][Integration] Make RuntimeBridge the production effect executor for Runtime-backed Loop runs #695 as the only runtime-backed effect adapter.
  3. Carry run/turn/item/attempt/lease/fence/idempotency/deadline IDs end to end.
  4. Reject direct filesystem/process bypass in runtime-backed mode.
  5. Preserve standalone Loop behavior.

Phase 3 — evidence and recovery

  1. Correlate Mapper, Dev CLI, Runtime, watcher and Loop receipts.
  2. Require HBP durability for VERIFIED mutation delivery.
  3. Reconcile uncertain effects instead of replaying.
  4. Ensure corrupt, stale or incomplete evidence never becomes success.
  5. Verify loop-execution/v1 through Runtime.

Phase 4 — installed E2E and rollout

  1. Implement [P0][E2E] Prove installed Loop to Runtime MCP execution through Mapper, Dev CLI, watcher and HBP #693 outside source checkouts.
  2. Test minimum/latest package compatibility.
  3. Test two independent coordinator hosts.
  4. Run cold/warm and one/many-workspace benchmarks.
  5. Publish raw evidence and negative results.
  6. Enable runtime-backed profile only after release gate passes.

Global acceptance criteria

  • Loop works standalone with no Runtime installed.
  • Runtime-backed mode resolves the published simplicio binary automatically.
  • Every runtime-backed effect passes through one persistent Runtime session.
  • No silent direct mutation/process fallback exists.
  • Independent workspaces run concurrently within bounds; conflicting writes are fenced.
  • Every work item has an execution-route receipt.
  • Deterministic work can complete with zero LLM calls.
  • Agent escalation is evidence-driven and coordinator-neutral.
  • Runtime verifies the final Loop contract as VERIFIED only with complete HBP evidence.
  • Crash/reconnect/cancellation cannot duplicate effects.
  • Installed Linux/macOS/Windows paths are proven or explicitly reported unavailable.
  • p50/p95 latency, tokens, process count, CPU/RSS and evidence bytes are measured from raw data.
  • Missing metrics are null with machine-readable reason.
  • No paid GitHub Actions is required.
  • Documentation, CLI status and compiled capabilities agree.

Definition of done

This epic cannot close because child code exists or unit tests pass in isolation. It closes only after #693 proves the installed default and failure lanes, all child issues are re-fetched as closed, and the final Runtime verification receipt is VERIFIED.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status
    In progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions