Skip to content

[Epic] Inference-aware orchestration with cache locality, fair backpressure and semantic convergence #674

Description

@wesleysimplicio

Objective

Extend simplicio-loop so multi-task orchestration can exploit Runtime-managed local inference efficiently while preserving its optional-Runtime contract, evidence-gated completion, worktree isolation and bounded execution.

Why Loop benefits

Local inference has scarce stateful resources: model processes, slots, KV caches, RAM/VRAM and bounded queues. A scheduler that ignores slot locality can continually evict cache state, duplicate prompts, overload the backend and make parallel work slower. Loop should use inference metadata when available, but remain fully functional without Runtime.

Scope

  1. Consume an optional versioned Runtime inference-capacity snapshot.
  2. Schedule resumptions with session/slot affinity when beneficial.
  3. Apply fair queueing, admission control and resource backpressure.
  4. Prevent duplicate work and duplicate inference across equivalent active tasks.
  5. Promote semantic progress from a prompt warning into a loop-level convergence signal.
  6. Escalate, reroute, drain or stop based on evidence instead of iteration count alone.
  7. Benchmark throughput, latency, cache reuse, fairness and solution quality under controlled workloads.

Constraints

  • Runtime integration remains optional.
  • No scheduler decision may bypass action gates, worktree isolation or evidence requirements.
  • Cache locality must not starve older or lower-priority work.
  • Unavailable capacity telemetry must be represented as unknown, never zero.
  • A local model outage must degrade to configured alternatives or block honestly.
  • No unbounded queue, retry storm or automatic worker multiplication.

Child issues

Epic acceptance criteria

  • Loop behaves exactly as today when Runtime inference capabilities are absent.
  • With Runtime available, resumable tasks preferentially reuse their healthy slot/cache.
  • Queue saturation produces bounded backpressure rather than process explosion.
  • Equivalent active work is detected before duplicate inference is issued.
  • No-progress decisions reference concrete evidence and follow a bounded escalation ladder.
  • Controlled benchmarks demonstrate whether locality improves or regresses end-to-end work.
  • Fairness and starvation tests cover multi-session workloads.
  • Local test evidence is sufficient; paid GitHub Actions are not required.

Source evaluated

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status
    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions