Pipeline Operations Backlog#
This page tracks runtime-service feature upgrades and the structural refactors that keep the pipeline-operations code maintainable as the service grows.
Status legend:
plannedin_progressdone
Current focus#
The U6 to U8 maintenance window is now closed.
U6is complete.U8is now complete.U10is now complete.U9andU7remain planned feature upgrades.The immediate follow-up is documentation tightening and the next operational persistence and streaming features.
Upgrade ledger#
U1modacor sessionCLI wrapper for session lifecycle and processing calls Status:doneNotes: implemented insrc/modacor/cli.pyasmodacor session ...with commands:list,create,delete,status,set-source,delete-source,process,reset,runs. Benefit: high Complexity: medium Reason: removes raw HTTP friction and improves day-to-day operator ergonomics.U2Source patch convenience endpoint (POST /sessions/{id}/sources/patch) Status:doneNotes: implemented insrc/modacor/server/api.pywith OpenAPI + docs updates. Benefit: medium Complexity: low Reason: simplifies common single-source update workflow.U3Source templates/profiles (e.g. MOUSE, SAXSess) Status:doneNotes: implemented as built-in profiles withGET /v1/source-templatesand session-levelsource_profilevalidation. Benefit: high Complexity: medium Reason: prevents misconfiguration and standardizes source expectations per instrument family.U4Dry-run endpoint for invalidation preview Status:doneBenefit: very high Complexity: low-medium Reason: immediate visibility into dirty-step decisions; improves trust and debugging without executing a run.U5Richer run summaries (dirty/skipped steps, fallback reason, timings) Status:doneNotes: run metadata now includesdirty_steps,skipped_steps,step_durations_s,elapsed_s, and fallback fields. Benefit: high Complexity: medium Reason: improves observability and post-mortem diagnostics.U6“Last sample” shortcut endpoint Status:doneBenefit: high Complexity: low Reason: maps the most frequent operation to a single focused API call. Notes: implemented asPOST /v1/sessions/{id}/sampleplus CLImodacor session set-sample ....U8Health/readiness split endpoints with runtime metrics Status:doneBenefit: high Complexity: low Reason: improves deployability and operational safety (orchestration probes, monitoring). Notes: implemented asGET /v1/healthfor liveness andGET /v1/readinessfor service usability plus runtime metrics (session_count,active_run_count,error_session_count,error_session_ids,last_updated_utc).U10Latest error diagnostics endpoint Status:doneBenefit: medium-high Complexity: low-medium Reason: speeds triage and recovery after failed runs. Notes: implemented asGET /v1/sessions/{id}/errors/latest, returning the current session error state plus the latest recorded failed-run diagnostics. The CLI wrapper now exposes the same payload viamodacor session last-error --session-id ....U9Persistent session store Status:plannedBenefit: high Complexity: medium-high Reason: preserves runtime definitions/state across restarts; requires careful state/version handling.U7Improved event streaming (persistent WS + SSE option) Status:plannedBenefit: medium-high Complexity: high Reason: valuable for real-time UIs and remote control loops but introduces more protocol/runtime complexity.
Structural maintenance window#
These tasks are intentionally scheduled between U6 and U8 so the runtime
service grows on a cleaner foundation.
S1Runtime-service module split Status:doneScope:src/modacor/server/api.pynow stays focused on FastAPI route bindings and HTTP translation, whilesrc/modacor/server/runtime_service.pyowns session orchestration,src/modacor/server/planning.pyowns dry-run and dirty step planning,src/modacor/server/io_utils.pyadapts session source registrations, andsrc/modacor/server/errors.pydefines framework-agnostic service errors. Benefit: high Complexity: medium Reason: separates transport concerns from runtime behavior and makes service logic easier to test in isolation.S2Python 3.12 floor alignment Status:doneScope: package metadata, CI, tox, and installation documentation all target Python3.12+. Benefit: high Complexity: low Reason: removes unsupported-version ambiguity and matches the codebase’s typing/runtime requirements.S3Test-package separation Status:doneScope: package-internal tests were moved out ofsrc/modacor/testsinto the top-leveltests/tree, and distribution discovery now excludesmodacor.tests*. Benefit: high Complexity: medium Reason: keeps shipped packages lean and avoids coupling runtime imports to test helpers.S4Process-step export and docs unification Status:doneScope:modacor.modules.__all__now exports every supportedProcessStep, and the module-doc generation tests assert that exported steps and generated docs stay in sync. Benefit: high Complexity: medium Reason: removes the split between runtime discovery and reference documentation.S5Shared runtime I/O helpers for CLI and service execution Status:doneScope:src/modacor/io/runtime_support.pynow centralizes source builders, sink builders, and shared HDF export handling used by bothmodacor runand the runtime service. Benefit: high Complexity: medium Reason: eliminates duplicated source/HDF handling and makes future runtime upgrades less error-prone.
Recommended next feature order#
U9(persistent session store)U7(advanced streaming)
Notes#
Upgrades are implemented incrementally, with structural maintenance work allowed between feature upgrades when it reduces future implementation risk.
This file is the source of truth for progress tracking.
Companion design notes live in
docs/pipeline_operations/runtime_service_api.md.