Skip to content

fix(core): reject transitions after defaults - #906

Open
Eilen6316 wants to merge 1 commit into
apache:mainfrom
Eilen6316:fix/default-transition-shadowing
Open

Eilen6316 wants to merge 1 commit into
apache:mainfrom
Eilen6316:fix/default-transition-shadowing

Conversation

@Eilen6316

Copy link
Copy Markdown
Contributor

Short description

Reject transitions added after a default transition so first-match routing cannot silently shadow later rules.

Changes

  • Validate default-transition ordering when adding transitions to GraphBuilder.
  • Reject duplicate defaults and non-default transitions after an existing default.
  • Apply the same ordering check when merging graphs.
  • Add regression tests for build-time and add-time validation.

How I tested this

  • pytest -q tests/core/test_graph.py tests/core/test_application.py
  • pre-commit run --files burr/core/graph.py tests/core/test_graph.py

Notes

The change preserves existing duplicate-default errors and only rejects transitions that would be unreachable.

@github-actions github-actions Bot added the area/core Application, State, Graph, Actions label Aug 30, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/core Application, State, Graph, Actions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant