feat(describe): Mode 2 — describe crossed branches faithfully by default - #1098
Merged
Merged
Conversation
A merge reached by branches of two different splits has no place in a tree, so DESCRIBE walked past it and emitted the conjunction along one path: the reporter's activity ran on `not($A) or $B` and described as `$A and $B`. Phase E made an ERROR path's rejoin sayable; this says the other half with the same vocabulary, and it is the shape mendixlabs#923 was actually reported for. The default rendering is now faithful — every branch ends in `join <label>` and the shared part follows as `merge <label>` sections — so MDL-FLOW01's "this description is NOT equivalent and must not be re-executed" is retired for the recombinable class. That sentence was the point: it sent people to Studio Pro for an edit they could have made in MDL. Three traps, each of which produced plausible output: - A crossed merge is emitted the OPPOSITE way from an error-rejoin merge. A rejoin is DECLARED where the traversal meets it; a crossed merge is JOINED by each branch and declared once afterwards. The label alone cannot drive that, so mergeLabels carries a crossed set beside the names (a pure refactor, verified byte-identical over 18 microflows before any behaviour changed). - The join is emitted BEFORE the visited guard. Arriving twice is what crossed MEANS, and the guard silently swallowed the second branch's join, leaving that path falling off the end of the description. - MDL-FLOW01 is retired on what was EMITTED, not on what was labelled. An inheritance split has its own traversal that walks through a labelled merge without emitting a join, so the label goes unused and the reader still gets the nested rendering. Suppressing on the label alone silenced the warning on Administration.ManageMyAccount, whose description is byte-identical with and without this change — which is why warnings are now computed after the body. (Its MDL-FLOW01 is a pre-existing classifier false positive: the shared entry is the split's own join. Left alone rather than silenced by accident.) The post-dominator is labelled as well as the shared entry, and that is not belt-and-braces. mxcli permits fall-through into a `merge`, so an EMPTY branch — split2's false arm — would fall into the shared merge instead of past it, silently describing a different graph. Explicit joins everywhere is what the proposal's Mode 2 sketch wanted fall-through banned for. Interleaved graphs are untouched and keep MDL-FLOW01: they overlap at more than one entry, and nesting needs a duplicated activity or an invented boolean (Boehm-Jacopini). The warning is now a true statement about them rather than a blanket one. Verified: 16 of 18 microflows describe byte-identically against a baseline binary, and the 2 that change are the 2 genuinely crossed ones. Both round-trip with their merge $IDs intact, converge after one step, and a re-exec is elided (Unchanged). Behaviour checked on a real runtime across the whole truth table — the two `$A = false` rows are the ones the old flattening got wrong. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018hifgRSawfaRWXS44YKtSJ
feat(describe): Mode 2 — describe crossed branches faithfully by default
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
x