Skip to content

feat(inferno): extract inference orchestration into core/inferno/orchestrator.py#307

Merged
slomin merged 1 commit intomainfrom
feat/issue-297-extract-orchestrator
Apr 8, 2026
Merged

feat(inferno): extract inference orchestration into core/inferno/orchestrator.py#307
slomin merged 1 commit intomainfrom
feat/issue-297-extract-orchestrator

Conversation

@slomin
Copy link
Copy Markdown
Collaborator

@slomin slomin commented Apr 8, 2026

Summary

  • Extract health probing, readiness state machine, process restart coordination, inference tick decision logic, mmproj/no-mmap resolution, and activation runtime prep from core/main.py into core/inferno/orchestrator.py
  • Orchestrator accepts primitives, dicts, and callbacks — no FastAPI dependency. Launch arg assembly and runtime env building stay in main.py where RuntimeConfig is available. The tick receives launch callbacks so main.py controls process spawning while the orchestrator owns the decision logic.
  • Rollback hardening: failure counter tracks runtime family alongside model path, tick skips spawning when runtime switch lock is held, activation delegates compatibility pre-check to prepare_activation_runtime before any state mutation
  • 43 new orchestrator unit tests including pinpoint regression tests for termination failure propagation and missing-script readiness downgrade

Test evidence

$ uv run python -m pytest tests/unit tests/api -q -n auto
895 passed in 10.28s

$ npx playwright test tests/ui/ --reporter=dot --timeout=15000 --workers=75%
173 passed (38.8s)

Pi QA

Required — model/runtime switching must be validated on real hardware.

Closes #297

@slomin slomin force-pushed the feat/issue-297-extract-orchestrator branch from 66fd27a to c932e9d Compare April 8, 2026 08:27
Moves inference lifecycle orchestration out of core/main.py into core/inferno/orchestrator.py so readiness probing, process restart coordination, launch decisions, and activation runtime preparation are owned by the Inferno boundary.

Keeps Potato's product lifecycle wiring in main.py while preserving runtime-aware failure tracking, activation compatibility checks, and launch prerequisite handling so restart and readiness state stay consistent during runtime and model changes.

Adds focused unit coverage for orchestration state transitions, restart behavior, launch retry paths, and readiness refresh.

Closes #297
Refs #264
@slomin slomin force-pushed the feat/issue-297-extract-orchestrator branch from c932e9d to 96bb795 Compare April 8, 2026 08:34
@slomin slomin merged commit 46da4da into main Apr 8, 2026
2 checks passed
@slomin slomin deleted the feat/issue-297-extract-orchestrator branch April 8, 2026 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(inferno): extract inference orchestration from core/main.py

1 participant