#155 comfyui workflow config precedence: per-source documented order#172
Merged
Conversation
…rder `resolveComfyUIConfig` coalesced env-path, config-file-path, AND workspace-path into one `workflowPath` value checked BEFORE the config-file INLINE graph — so a stale workspace `.toony/config.json` workflow PATH silently beat the config file's inline graph, contradicting the documented order. Restructured to check each source in order: inline override > env path > config-file (inline graph ?? path) > workspace path > bundled default. The config-file inline graph is now selected before any config/workspace PATH. Test matrix (6 cases) covers all four sources, including the headline bug (config-file inline beats a stale workspace path) and config-inline-vs-config-path. Zero change to the documented header. check + test green uncached Node 20.20.2 + 24.15.0 (@toony/providers 50 -> 56). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
project7-interns
approved these changes
Jul 14, 2026
project7-interns
left a comment
Collaborator
There was a problem hiding this comment.
Verdict: APPROVE
Epic Alignment: PASS
#155 makes the actual ComfyUI workflow selection match the documented operator-facing precedence, preventing a stale lower-priority workspace path from silently winning.
Checked (evidence)
- Structural gate: live PR body has filled
## EPIC Alignmentand## Self-Verification; no Design Fidelity table is required for provider config logic. - Contract: live issue #155 requires
override > env path > config-file (inline ?? path) > workspace path. - Implementation:
packages/providers/src/comfyui-config.ts:205-229evaluates each source in exactly that sequence, with config inline checked before the config-file path and workspace path. - Regression matrix:
packages/providers/src/__tests__/comfyui-config.test.ts:173-280covers override, env, config inline, config path, workspace, and the original inline-versus-stale-workspace failure. - Riskiest part: config-file inline/path ordering; the explicit branches make the intended nullish priority auditable and remove the prior coalesced-path bypass.
- Kill-list: complete two-file diff scanned - clean; no new source, dependency, stub, or scope creep.
- CI:
gh pr checks 172-> Node 20 PASS (1m37s); Node 24 PASS (1m2s).
Findings
- None.
Decision
The code, documentation, and tests now agree on the required precedence order, including the reported regression path.
Owner
Author
|
[@re2 REVIEW — APPROVE] (marked comment — @re2 formal Review of PR #172 (#155), commit Checked (evidence)
Clean to merge on my side. No further changes. |
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.
Closes #155.
Problem
resolveComfyUIConfig(packages/providers/src/comfyui-config.ts) coalesced the env path, the config-file path, AND the workspace path into oneworkflowPathvalue, checked BEFORE the config-file inline graph:So a stale workspace
.toony/config.jsonworkflow path (documented LOWEST) silently beat the config file's inline graph (documented HIGHER) — generation ran the wrong workflow with no warning. Severity: MEDIUM.Fix
Check each source in the documented order, no coalescing:
overrides.workflow→ env path → config-file (fromFile.workflowinline ??fromFile.workflowPath) →ws.workflowpath → bundled default. The config-file inline graph is now selected before any lower-precedence PATH. The module header already documented this order (override > env > config-file > workspace); behaviour now matches it. No docs change needed beyond the corrected inline comment.Tests — precedence matrix (all four sources)
packages/providers/src/__tests__/comfyui-config.test.ts(+6): each source is marked with a unique workflowclass_typeand the winner asserted:(The bundled-default case was already covered.)
EPIC Alignment
Self-Verification
pnpm check+pnpm testgreen: uncached (turbo … --force) on Node 20.20.2 AND 24.15.0 —checkexit 0; 17/17 tasks, 0 fail (@toony/providers50 → 56).Out of scope
Any new config source or provider feature.
🤖 Generated with Claude Code