Revisions, versions and conflicts
Choose the correct concurrency token for graphs, definitions, notes and durable data.
ONF uses explicit concurrency tokens to protect saved work. Different entities have independent counters. Read the selected entity before a mutation and supply the corresponding expected field.
| Entity | Guard |
|---|---|
| Workflow graph/settings | expectedRevision |
| Existing immutable library definition | expectedVersion |
| Workspace/workflow/frame notes | Independent document expectedRevision |
| Workspace variable | Variable expectedRevision |
| Library pack/organization | Metadata expectedRevision |
| Workspace pack installation | Workspace-library expectedRevision |
| Durable storage object | Storage expectedVersion |
Graph revision versus definition version#
A workflow can move from revision 7 to 8 while every node stays pinned to definition version 2. Publishing version 3 does not change that saved graph or its execution code. Upgrading one graph instance is a separate guarded edit. Custom types, executor wrappers and nested subflows also retain exact dependency pins.
This distinction matters during diagnosis. A run's historical snapshot records what executed; latest library code may differ. Reading latest documentation never silently changes a runtime pin. See versioning.
Resolve a conflict deliberately#
A stale token normally returns 409 and leaves the conflicting operation unapplied. Do not fetch the new revision and immediately resend a complete replacement. Instead:
- Read the current entity.
- Compare fields relevant to the intended change.
- Check that the requested action still applies.
- Preserve unrelated edits and reconcile overlapping changes.
- Preview or validate the revised operation where available.
- Submit using the token from that reconciled read and inspect the saved result.
Fetch notes independently after changing a graph. Supplying a workflow revision to onf_update_context_documentation is incorrect even if the numbers happen to match.
Creation and independent metadata#
Variables and connection profiles require expectedRevision:0 on creation. An existing variable's workspace and declared type remain immutable. Pack installation replaces the intended packIds array; retain other installed packs unless removal is requested. Codec pairing checks both organization revisions atomically.
Revision guards prevent stale local replacements. They do not provide exactly-once execution across providers. A response lost after a write, run request or credential refresh requires readback and domain-level reconciliation. Changing an expected number or inventing a new deduplication key can duplicate an already accepted effect.
Keep local concurrency repair separate from external outcome recovery. Read execution and diagnosis and durable storage for agents before designing an automatic retry strategy.
Source provenance
Reviewed against maintained source and topic documentation on 23 October 2026. This is a source snapshot; installed versions and provider access may differ.
docs/MCP.mddocs/API.mddocs/VARIABLES.mddocs/LIBRARY-PACKS.mddocs/CONTEXT-DOCUMENTATION.md