Skip to content

Codegen: history node under a parallelFlow is generated as a region and crashes the builder #20

Closed

Description

@rinekri

A history / deepHistory node declared as a direct child of a parallelFlow is treated by the codegen as one of the parallel's regions. The generated node builder then fails as soon as the parallel flow is entered.

Repro:

digraph Repro {
  package = "repro"

  main [type = flow]
  tabs [type = parallelFlow]
  left [type = flow]
  right [type = flow]
  tabsHistory [type = deepHistory]

  main -> start
  main -> tabs
  tabs -> left -> leftScreen
  tabs -> right -> rightScreen
  tabs -> tabsHistory
}

Navigating to tabs throws:

illegal path build requested for "tabs" node: tabs.tabsHistory

Expected: history children of a parallel are not regions. The schema's regions and the generated builder should only list left and right, and tabsHistory should only produce a HistoryTarget accessor. Parser.kt explicitly allows parallel-parented history nodes (see the check around "history node ... is under a root parallel"), so the declaration is valid but the runtime path is broken.

Found while building DSL parity in #18. The way-dsl Graph excludes history nodes from regions, and its nested-parallel parity test checks a deep history of a parallel restoring nested regions.

Activity

  1. added a commit that references this issue on Nov 9, 2026
  2. rinekri commented on Nov 9, 2026

    @rinekri
    ContributorAuthor

    Fixed in #23 (1d25d49), released in 0.13.0.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions