Treat prompts and source media as user-owned inputs, keep MediaHub credentials/config/execution in one reusable middle block, and reserve outputs for Preview/Save nodes. Constraint: Samples must show users exactly which block to copy into an existing workflow. Rejected: Classifying API Key and execution nodes as inputs or outputs | exposes internal mechanics and weakens sample readability. Confidence: high Scope-risk: narrow Directive: Keep sample responsibilities separated and all connections flowing left to right. Tested: 124 pytest tests; JavaScript syntax; Python compilation; JSON validation; live ComfyUI accepted all eight prompt structures. Not-tested: Manual visual import of all eight revised examples.
2.2 KiB
2.2 KiB
Provider Isolation Retrospective
Last updated: 2026-06-13
What Worked
- Provider adapters are isolated packages behind registered operations.
- Provider config nodes own documented provider parameters.
- Generic execution nodes keep API keys and ComfyUI media conversion outside provider request builders.
- Live probes resolved ambiguous Agnes image and video behavior before release.
- Architecture tests enforce provider and media-family boundaries.
What Needed Correction
- The first workflow generator reused the API fixture's mechanical row-major grid. It produced valid workflows but obscured data flow with uniform node sizes, wrapped connections, and an oversized API Key node.
- API fixtures and user-facing workflows serve different purposes and must not share a visual-layout standard.
- The API Key visibility control originally consumed a second widget row. A compact inline password field and toggle is clearer.
Current Workflow Standard
- Left region: only prompt and source media nodes already owned by the user's workflow.
- Middle region: the complete portable MediaHub integration block: API Key, provider config, and generic Generate/Submit/Resolve execution nodes.
- Right region: only Preview/Save output nodes.
scripts/layout_examples.pyapplies the canonical layout, and tests lock it.
Media-Family Isolation
- Image and video have separate result contracts, services, typed ComfyUI requests, execution nodes, provider operations, workflows, and tests.
- They share only provider-neutral request/job routing and the operation registry.
- Music/audio must be added as an independent vertical slice rather than as a branch inside image or video services.
nodes.pyandmediahub/providers/__init__.pyremain shared composition roots, so additions there must be registration/export-only changes.
Next-Agent Standard
- Save dated official documentation and probe ambiguous live behavior.
- Implement one complete, isolated provider capability.
- Create API fixtures and separately designed user-facing workflows.
- Run unit, architecture, static, JSON, and restarted ComfyUI smoke tests.
- Manually inspect at least one image and one async workflow when applicable.