The rule
The engine resolves a handler by
(type, version). An old flow definition names
the version it was built against, so it keeps reaching the handler it was designed
for, while new flows get the current one.
supportedVersions()
supportedVersions() declares which node versions a handler can execute. It is
usually just the current version:
What counts as breaking
The test is not “did the code change” but “would a flow configured against the old contract still do what its author meant”. Removing a config field is breaking. Renaming one is breaking. Changing the meaning of an existing value is breaking, even when the field name and type are identical. Adding an optional field with a default is not.Sessions hold their definition
A running flow session snapshots itsflow_definition_id and keeps it until the
session finishes. Publishing a new version of a flow therefore does not rewrite
what an in-flight conversation is doing — it changes what the next conversation
starts with.