🚀 Feat: pipeline execution constraints + adapt pydantic objects#44
Merged
nicofretti merged 9 commits intodevelopfrom Nov 22, 2025
Merged
🚀 Feat: pipeline execution constraints + adapt pydantic objects#44nicofretti merged 9 commits intodevelopfrom
nicofretti merged 9 commits intodevelopfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces pipeline execution constraints (token limits, execution time limits) and migrates storage/API responses from dict-based to Pydantic-based data models for better type safety and structure.
Key Changes:
- New
lib/entities/pipeline.pymodule with Pydantic models:ExecutionResult,Constraints, andUsage - Constraint enforcement in two paths: multiplier pipelines (workflow.py) and normal pipelines (job_processor.py)
- Storage layer migration from dicts to
PipelineRecordandJobPydantic models - Frontend UI for setting constraints and displaying usage stats with theme-compatible styling
- Comprehensive test coverage for constraint enforcement (13 new tests in test_constraints.py)
Reviewed changes
Copilot reviewed 33 out of 33 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
| lib/entities/pipeline.py | New Pydantic models for execution results, constraints, and usage tracking |
| lib/workflow.py | Updated to return ExecutionResult, added constraint checking for multiplier pipelines |
| lib/job_processor.py | Added constraint checking for normal pipelines, usage accumulation |
| lib/storage.py | Migrated from dict returns to PipelineRecord/Job Pydantic models |
| lib/job_queue.py | Added usage tracking initialization, JSON parsing for usage updates |
| models.py | New Job and PipelineRecord Pydantic models |
| app.py | Updated endpoints to work with Pydantic models |
| tests/test_constraints.py | Comprehensive constraint enforcement tests (729 lines) |
| tests/test_*.py | Updated assertions to use ExecutionResult instead of tuple unpacking |
| frontend/* | UI for constraints configuration and usage display with proper theme variables |
| llm/*.md | Updated documentation for new constraint feature |
| debug_pipeline.py | Updated to use new Pydantic model (incomplete) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Description
Related Issue
Checklist
make formatpassesmake pre-mergepasses