Skip to content

fix(main): report transition-assertion failures on the inbound link#362

Merged
jp-fizzbee merged 1 commit into
mainfrom
user/jp/fix-transition-assertion-reporting
May 22, 2026
Merged

fix(main): report transition-assertion failures on the inbound link#362
jp-fizzbee merged 1 commit into
mainfrom
user/jp/fix-transition-assertion-reporting

Conversation

@jp-fizzbee
Copy link
Copy Markdown
Collaborator

CheckTransitionInvariants stores its failure metadata on the inbound link (node.Inbound[0].FailedInvariants) rather than on the node's Process.FailedInvariants — see processor.go where the write happens. The failure-reporting branch in modelCheckSingleSpec only looked at the Process field, with these wrong consequences:

  • Simulation mode: a transition-assertion failure fell through to "FAILED: Model checker failed. Deadlock/stuttering detected", which is misleading (deadlock_detection: false in the spec confirms it was not a deadlock).
  • Model-checking mode: nothing about the failure was printed at all, only the raw trace dump from dumpFailedNode.

Now: if the node has no Process.FailedInvariants, check the inbound link. Print "Transition Invariant: " if found. Add a generic "Model checker failed (no failed-invariant metadata...)" fallback for model-checking mode so silence never happens.

Reproducer: a spec with a transition assertion that the model checker finds violating — previously misreported. Confirmed both modes now print the assertion name (TerminalStatesRemainTerminal in the test spec).

CheckTransitionInvariants stores its failure metadata on the *inbound
link* (node.Inbound[0].FailedInvariants) rather than on the node's
Process.FailedInvariants — see processor.go where the write happens.
The failure-reporting branch in modelCheckSingleSpec only looked at
the Process field, with these wrong consequences:

- Simulation mode: a transition-assertion failure fell through to
  "FAILED: Model checker failed. Deadlock/stuttering detected", which
  is misleading (deadlock_detection: false in the spec confirms it
  was not a deadlock).
- Model-checking mode: nothing about the failure was printed at all,
  only the raw trace dump from dumpFailedNode.

Now: if the node has no Process.FailedInvariants, check the inbound
link. Print "Transition Invariant: <name>" if found. Add a generic
"Model checker failed (no failed-invariant metadata...)" fallback for
model-checking mode so silence never happens.

Reproducer: a spec with a `transition assertion` that the model
checker finds violating — previously misreported. Confirmed both
modes now print the assertion name (TerminalStatesRemainTerminal in
the test spec).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@jp-fizzbee jp-fizzbee merged commit acda3dd into main May 22, 2026
1 check passed
@jp-fizzbee jp-fizzbee deleted the user/jp/fix-transition-assertion-reporting branch May 22, 2026 08:48
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.

2 participants