Runtime Execution — From Workflow to Run
The Run button creates/updates a runtime snapshot derived from the workflow, which your backend uses to perform scraping.
Derivation flow
- UI reads current workflow via
SettingsStore getRuntimeDataFromWorkflow()extracts runtime fields and deep-copiesaiConfig- UI validates subreddits/flairs are selected
- Snapshot is written to
users/{uid}/workflows/{workflowId}/runtime/current
Runtime document
Contains the effective runtime config:
- Subreddits and selected flairs
- Window and cadence fields
- Comment collection config
- AI configuration snapshot
The runtime doc is the single source of truth for an individual run; it’s intentionally duplicated from the workflow.
Error handling
- UI blocks run when no subreddits/flairs are selected
- Errors are surfaced with friendly messages and enhanced context
Next steps
- Use the runtime doc to kick off the scraping loop
- Optionally log results with Node Focus to analyze thresholds and model usage