Skip to content

Type an emitting rule's binding from its status equations - #94

Merged
yavorpanayotov merged 1 commit into
mainfrom
xmodule-trigger-payload
Aug 23, 2026
Merged

Type an emitting rule's binding from its status equations#94
yavorpanayotov merged 1 commit into
mainfrom
xmodule-trigger-payload

Conversation

@yavorpanayotov

@yavorpanayotov yavorpanayotov commented Aug 22, 2026

Copy link
Copy Markdown
Collaborator

Why

When a system is split into one spec per service, the checker reads them together and one service's rule can move something another service defined. For that to be recognised, the event carrying the item across has to know its type. If the sending rule only knew the item's type from a status check, that type was lost at the boundary, and the receiving service's step was not counted. The lifecycle then looked stuck, so the checker wrongly warned of a dead end.

What I did

The sending rule now works out the item's type from its status checks too, the same way the rest of the checker already does. So the event carries the type across, the receiving step counts, and a lifecycle that spans two specs is no longer flagged as stuck. Checking a single spec is unchanged, and real dead ends are still caught.

Covered by a new test that fails without the change and passes with it.

Cross-module witnessing credits a transition when an importer's rule handles an
imported event and moves the imported entity. That relies on the emitted event
carrying its payload entity type across the boundary. The producer-side collector
typed the emitting rule's binding only from a transition trigger or a surface
parameter, so a rule whose binding is typed only by a status equation
(requires/ensures binding.status = value) contributed no payload type. The
importer's witness was then not credited, and a lifecycle whose exit spans the
two modules was falsely reported as a deadlock, status.noExit or
status.unreachableValue.

Enrich the emitting rule's binding types with status-equation inference, using
the same case-insensitive and unique-target fallbacks the consumer-side
resolvers already apply (resolve_binding_entity_from_status). Multi-file only;
single-file analysis is unchanged, and genuine dead ends are still reported.

Covered by a new witness_matrix scenario (emission_status_typed) that fails
without this change (SPLIT != SINGLE) and passes with it. Spec updated.
@yavorpanayotov
yavorpanayotov merged commit 898da49 into main Aug 23, 2026
2 checks passed
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.

1 participant