refactor(engine): redesign pipeline graph with typed action nodes#48
Open
refactor(engine): redesign pipeline graph with typed action nodes#48
Conversation
… phase ordering Replace the generic Source/Action/Target node model with a strongly-typed GraphNodeKind enum where each variant carries its own configuration struct. Split action configs into dedicated files (context, extraction, recognition, refinement, lifecycle). Add phase-based pipeline ordering validation, action- level config validation, and structural checks (self-loops, duplicate edges). Move Compiler into DefaultEngineInner for reuse across runs. Rename error.rs `source` parameter to `component` to align with the internal field name. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…m graph types - Rewrite runs/mod.rs to pure data types (RunSnapshot, NodeSnapshot, RunStatus, NodeStatus, RunSummary, RunFilter); delete RunManager - Add Runs trait (get_run, list_runs, cancel_run) and implement on DefaultEngine with internal RunEntry + RwLock<HashMap> state - Wire run lifecycle (Pending→Running→Succeeded/PartialFailure/Failed) into Engine::run() with CancellationToken passed to run_graph - Add cooperative cancellation via tokio::select! in execute_node - Make confidence_threshold optional on NamedEntityRecognition (None disables filtering) - Remove Action suffix from all graph config structs (LoadContextAction → LoadContext, etc.) - Remove RunOutput from EngineOutput (query via Runs::get_run instead); make NodeOutput/RunOutput pub(super) - Move compiler/ → graph/, pipeline/runs.rs → runs/mod.rs, config.rs → config/mod.rs, add pipeline/plan/ module Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…tor, move config into engine - Merge process handlers into runs: POST /runs (full pipeline), POST /runs/scan (read-only), removing /process/* endpoints entirely - Add ActorId custom header extractor (X-Actor-Id) replacing ActorQuery params and actor_id request body fields across all handlers - Move RuntimeConfig into DefaultEngine (with_config builder), removing it from ServiceState and per-handler State extraction - Remove redundant data_dir field from ServiceState, delegate to Registry::base_dir() - Rename request/process.rs → request/runs.rs, delete response/process.rs (RunResult merged into response/runs.rs) - Use derive_more for Deref/Display on ActorId - Simplify EngineInput: replace ocr/llm/stt/tts fields with config: Option<RuntimeConfig> for per-request overrides Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…d code Wire Import/Export dispatch in NodeExecutor with Arc<DocumentEnvelope> channels, populate EngineOutput from collected envelopes, and connect the analytics endpoint to live engine run data. - Add NodeExecutor struct replacing free execute_node/execute_action fns - Add EngineAnalytics trait + AnalyticsSnapshot in pipeline/analytics module - Rename Runs → EngineRuns, Analytics → EngineAnalytics for clarity - Remove dead ExecutionPlan fields (index_map, phases, roots, leaves) - Remove PhaseGroup type and phase.rs, phase field from ResolvedNode - Remove unused Explainable/Explanation (covered by provenance module) - Make pipeline::policy private, re-export compiled types - Flatten config/mod.rs → config.rs - Wire server analytics handler via EngineAnalytics::snapshot() Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ze policy extraction Make Registry a required constructor parameter for DefaultEngine instead of an optional field set externally. The engine now owns all its dependencies and auto-extracts retry/timeout policies from RuntimeConfig in with_config(), removing that responsibility from the server. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.