Repository navigation
refactor!: always rename flow ids that name their source and target, drop the keep-flow-ids mode - #127
Merged
emaarco merged 1 commit intoOct 28, 2026
Conversation
…drop the keep-flow-ids mode BREAKING CHANGE: --keep-flow-ids, --no-keep-flow-ids, BPMN_KEEP_FLOW_IDS, the library option keepFlowIds and W_FLOW_ID_STALE are removed. Closes #126
emaarco
deleted the
emaarco/refactor-always-rename-flow-ids-that-name-their
branch
October 28, 2026 21:12
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
bpmn-cli had two flow-id modes: rename (default) and keep (
--keep-flow-ids). Two modes meant two code paths through every command that changes a flow's ends, a stale-id warning, an env var and a lot of docs. With one mode, agents get a single contract: a flow whose id names its source and target always follows them.What
--keep-flow-ids,--no-keep-flow-ids,BPMN_KEEP_FLOW_IDS, the library optionkeepFlowIds,W_FLOW_ID_STALEwithStaleFlowReport, the CLI's "flow ids kept" note and itsE_NOT_FOUNDhint.MovedFlows(putting a moved node's out-flow back with its id) and the flow-reuse paths inElementMove,NodePlacement,SequenceFlowsandFlowBridge.Doc.followFlowEndsstays, without CLI or API surface.BatchDrawing.isEngineOwnedmatches edges by flow id after removing undrawn nodes, so renaming bridged flows there would wrongly make an engine-made drawing look hand-made.renamed from …report, and ids in other forms (Flow_0yq6cfd) are never renamed.Verification
flow-ids-follow-ends.test.tscovers each path from the issue:add --after/--before/--flow,set source=/target=, remove with bridging,split,move(single and chained), and an id in another form staying put. Onlyset source=can change a flow's source; the other commands only retarget it.npm test(2350 passed),npm run typecheck,knip: clean. The chained-move result was compared againstmainand is identical.Breaking changes
The flag, the env var and
keepFlowIdsare gone, with no deprecation release. Users who treat flow ids as an API (generated code, process tests) now get renames and must follow therenamed:report. A leftover--keep-flow-idsis rejected as an unknown option; a leftoverBPMN_KEEP_FLOW_IDSis ignored.Out of scope / Follow-ups
Closes #126