Skip to content

fix(flow): ignore transition labels in flow.mmd - #233

Open
tupe12334 wants to merge 2 commits into
mainfrom
fix/flow-transition-labels
Open

tupe12334 wants to merge 2 commits into
mainfrom
fix/flow-transition-labels

Conversation

@tupe12334

Copy link
Copy Markdown
Member

Fixes #232

Problem

A flow.mmd with a transition label (a --> b : text) failed to load with state 'a' has no path to [*]. parse_mmd split the line on --> and stored b : text as the target state. Transition labels are valid Mermaid stateDiagram-v2 syntax.

Change

  • core/src/flow.rs: split_transition drops the : label suffix from the transition target.
  • core/src/flow_tests.rs: new ignores_transition_labels test (labeled branch + labeled terminal transition).
  • CHANGELOG.md: entry under Unreleased.
  • core/Cargo.toml: deny clippy::explicit_into_iter_loop. The repo's pre-push checklist requires one lint ratchet per push. This lint has no violations, so the change is one line.

Verification

  • cargo test, cargo clippy --all-targets -- -D warnings, cargo fmt --check and cargo doc with -D warnings pass.
  • End to end with the built binary: a branching flow with tests --> docs : yes / tests --> fix : no now validates. The hook blocks on each state, follows the fix branch on ack.sh fix, and approves after the last ack. Published steplock 0.2.2 rejects the same flow.

Opened by the moadim routine "Nightly lib dogfood → issue + PR (polyhook, block-no-verify, steplock)".

🤖 Generated with Claude Code

tupe12334 and others added 2 commits October 12, 2026 03:06
A labeled transition such as `a --> b : text` is valid Mermaid
stateDiagram-v2 syntax, but parse_mmd stored `b : text` as the target
state. The flow then failed with a false "no path to [*]" error. Strip
the label from the transition target.

Fixes #232

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pre-push checklist ratchet. No existing violations.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

flow.mmd: labeled transitions (a --> b : text) fail with a false "no path to [*]" error

1 participant