Re-check saved workflows when a connector's capabilities change #2091

Closed
opened 2026-11-21 07:30:46 +00:00 by sam · 2 comments
Owner

Follow-up to #2087. Saved workflows are checked against a connector's declarations when they are saved, but when a connector later loads with different declarations (an update, a restart that declares something else), nothing re-checks them: a workflow can keep calling an action or channel the connector no longer declares, and the breakage only shows when a run fails.

Done when

  • When a connector's stored declarations change, every saved workflow that references that connector is re-checked against the new declarations.
  • If a saved workflow would become invalid, the new declarations are refused (the connector fails to start with a clear reason, and the previous declarations stay in force), the same way bad settings are refused at accept time.
  • A table test in modules/runs covers a saved workflow whose action or chat channel is no longer declared, and one that still is.
  • task check passes.
Follow-up to #2087. Saved workflows are checked against a connector's declarations when they are saved, but when a connector later loads with different declarations (an update, a restart that declares something else), nothing re-checks them: a workflow can keep calling an action or channel the connector no longer declares, and the breakage only shows when a run fails. ## Done when - When a connector's stored declarations change, every saved workflow that references that connector is re-checked against the new declarations. - If a saved workflow would become invalid, the new declarations are refused (the connector fails to start with a clear reason, and the previous declarations stay in force), the same way bad settings are refused at accept time. - A table test in `modules/runs` covers a saved workflow whose action or chat channel is no longer declared, and one that still is. - `task check` passes.
sam added the featuremedium labels 2026-11-21 07:30:46 +00:00
sam self-assigned this 2026-11-21 07:30:46 +00:00
sam added the in-progress label 2026-11-21 07:35:23 +00:00
Author
Owner

Landed in 592d36e0d.

  • connectors.Module takes a Recheck hook (Use), called from launch after the connector starts and before its declarations are stored; wired in internal/app/archie to runs.Engine.RecheckConnector.
  • RecheckConnector re-checks every saved workflow that references the connector against the new declarations (recheckWorkflows, pathed workflow.steps[i]...). Any problem returns an InvalidError, the connector is stopped and marked failed, and the previous stored declarations stay in force, so saved workflows never silently lose what they call.
  • Table test TestRecheckingSavedWorkflowsOnCapabilityChange in modules/runs covers a removed action, a removed chat delivery, still-covering declarations, and an unreferenced connector; verified to fail with the check disabled. task check passes.
Landed in 592d36e0d. - `connectors.Module` takes a `Recheck` hook (`Use`), called from `launch` after the connector starts and before its declarations are stored; wired in `internal/app/archie` to `runs.Engine.RecheckConnector`. - `RecheckConnector` re-checks every saved workflow that references the connector against the new declarations (`recheckWorkflows`, pathed `workflow.steps[i]...`). Any problem returns an `InvalidError`, the connector is stopped and marked failed, and the previous stored declarations stay in force, so saved workflows never silently lose what they call. - Table test `TestRecheckingSavedWorkflowsOnCapabilityChange` in modules/runs covers a removed action, a removed chat delivery, still-covering declarations, and an unreferenced connector; verified to fail with the check disabled. `task check` passes.
Author
Owner

Landed in 592d36e0d. Closing without the manual check; it moves to #2096.

Landed in 592d36e0d. Closing without the manual check; it moves to #2096.
sam closed this issue 2026-11-21 15:01:52 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sam/archie#2091