Decouple the graph language from the runtime - #1500
Merged
Merged
Conversation
…executor imports) primitives.py inlines ProjectState and drops the FactoryConfig runtime type; definitions.py imports ProjectState from primitives; __init__.py no longer re-exports WorkflowExecutor/ExecutionResult. factory.workflow now imports with zero runtime deps (pydantic + stdlib). DSH is the runtime.
Sentrux Quality ReportAbsoluteDiff (vs base branch) |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1500 +/- ##
=======================================
Coverage 83.75% 83.76%
=======================================
Files 225 225
Lines 25757 25760 +3
Branches 4209 4209
=======================================
+ Hits 21574 21578 +4
Misses 3201 3201
+ Partials 982 981 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
colehurwitz
added a commit
that referenced
this pull request
Sep 15, 2026
…low.primitives (#1504) After PR #1500 decoupled the graph language from the runtime, Workflow.trigger's type signature references primitives.ProjectState, but 23 workflow/test files still imported from factory.models — creating 68 mypy arg-type errors. This changes all 23 files to import ProjectState from factory.workflow.primitives, which is the correct source for the workflow subsystem per the decoupling design. Files changed: - 3 core workflow modules (research, deep_research, deep_qa) - 11 contributed benchmark workflows - 9 contributed benchmark test files Verification: - mypy factory/ | grep arg-type → 0 results - pytest factory/workflow/contributed/ → 257 passed - ruff check → all passed Co-authored-by: Cole Hurwitz <colehurwitz@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 (1M context) <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.
What
Breaks the two runtime couplings in the graph language so
factory.workflowimports with zero runtime deps (pydantic + stdlib only):primitives.pyinlines the tinyProjectStateenum and replaces theFactoryConfigfield type onFactorywithdict[str, Any](it was never read by the language).definitions.pyimportsProjectStatefromprimitivesinstead offactory.models.__init__.pyno longer re-exportsWorkflowExecutor/ExecutionResult— DSH is the runtime, not the executor.Why
This is the first step of extracting refactory's graph semantics into a standalone language package (the PyTorch-analogy split: refactory = semantics, DSH = runtime). The runtime files (executor/skill_export/llm_loop/… ) still live in the repo and still work, but they are no longer reachable through the language import.
Tests
pytest tests/test_workflow_primitives.py tests/test_workflow_definitions.py— 95 passedpytest tests/test_outer_loop/— 563 passed