You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit a725383
Browse filesBrowse the repository at this point in the historyBrowse files
feat(describe): Mode 2 — describe crossed branches faithfully by default
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 #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
Copy file name to clipboardExpand all lines: .claude/skills/fix-issue/findings/mdl-executor.jsonl
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -610,3 +610,4 @@
610
610
{"area": "mdl-executor", "date": "2026-09-13", "symptom": "DESCRIBE silently deletes an ExclusiveMerge: describe -> exec leaves the microflow with fewer merge nodes than the stored graph, with no warning, no MDL-FLOW01 and mx check clean", "cause": "The nested describer walks straight through a merge with a single incoming path without emitting anything for it, so the rebuild has no reason to create it. Only two merge shapes were represented: a split's join point (rendered by `end if`) and a labelled error rejoin (`merge <label>`).", "file": "mdl/executor/cmd_microflows_show_merge.go", "fix": "droppedMergeWarnings() emits a describe-time warning for any ExclusiveMerge that is neither a split join point, nor a labelled error rejoin, nor has in-degree >= 2. Wired into both describe paths beside irreducibleGraphWarnings.", "insight": "The obvious rule (represented == the join point findSplitMergePoints pairs with a split) is WRONG on real code and produces a false positive on ordinary Marketplace microflows. findMergeForSplit needs a join common to ALL branches, so a split where one branch returns pairs with nothing -- yet its merge is still emitted as the continuation after `end split` and survives with its $ID intact (Administration.ManageMyAccount). The in-degree clause is what separates the two. Establish the rule by CORRELATING survival with structure over a corpus rather than reasoning from the describer's code: measuring merge $IDs before and after a round trip over 21 microflows gave in-degree=1 deleted 7 of 7, in-degree>=2 survived 6 of 7. The one exception is a merge lost to flattening in an irreducible graph, which MDL-FLOW01 already owns with a stronger message. Also: count-based comparison cannot tell 'preserved' from 'deleted and recreated' -- compare $IDs. And when scanning describe output for your own warning, grep a string unique to it: MDL-FLOW01's text also contains 'is not represented', which faked a false positive for one round of measurement."}
611
611
{"area":"mdl-executor","date":"2026-09-13","symptom":"DESCRIBE renders a microflow whose branches cross as `c1 and c2` when the activity actually runs on `not(c1) or c2` — a program that always logs described as one that never does, with mx check clean","cause":"Nested if/then/else is single-entry/single-exit; a Mendix microflow is an arbitrary digraph. When an inner split's branch lands where an outer split's branch lands, the describer walks the graph as a tree and emits the conjunction of the guards along one path.","file":"mdl/executor/cmd_microflows_normalize.go","fix":"DESCRIBE MICROFLOW ... NORMALIZED (Mode 3): fold the branch guards into one condition via mdl/microflownorm and rewrite a COPY of the graph into the equivalent nested one, then let the existing describer render it. Refuses per-decision when the region holds an activity, a rule-based split, or genuinely interleaved branches.","insight":"Do not write a second describer for a second rendering mode — rewrite the GRAPH and reuse the one describer, or the two drift and every activity renderer is implemented twice. Two verification lessons. (1) A boolean simplifier needs a truth-table equivalence test over generated formulas, not per-rule unit tests: an unsound rewrite produces a pretty WRONG guard, which is the original bug from the other direction. Run it with a rule deliberately broken as the control — mine caught it at the first assignment. (2) Algebra is not behaviour: build the original and the microflow rebuilt from its normalized description side by side and compare return values over the whole input truth table on a real runtime. The rows that matter are the ones the OLD rendering got wrong, so make the fixture's return value distinguish them (a `log` activity is invisible to a test; a `$Result` string is not). Also: the fold leaves the entry merge with in-degree 1, which describe->exec would then silently delete, so splice it out in the transform — otherwise Mode 3's output does not describe the graph its own re-execution builds."}
612
612
{"area":"mdl/executor","date":"2026-09-13","symptom":"CATALOG.GRAPH_CYCLES returns 0 rows on a project whose CATALOG.GRAPH_MODULE_COUPLING lists mutual Source/Target module pairs, so a user reads 'no circular dependencies' from a table that was never computed (mendixlabs/mxcli#1060)","cause":"graph_cycles_data is written only by the graph-analysis pass (REFRESH CATALOG COMMUNITIES), while graph_module_coupling is a plain SQL view over refs that any full-mode catalog answers. GRAPH_CYCLES and its four siblings appeared in neither fullOnlyTables nor sourceOnlyTables, so no warning fired; and the recorded build mode is only fast/full/source, so a communities-augmented cache is indistinguishable from a plain full one — which also let a later `refresh catalog full` drop the graph tables silently","file":"`mdl/executor/cmd_catalog.go` (`communitiesOnlyTables`, `warnIfCatalogModeInsufficient`, `tableRequiredMode`, `carryGraphAnalysis`, `cachedCatalogInfo`), `mdl/catalog/catalog.go` (`MetaGraphAnalysis`), `mdl/catalog/builder_graph.go`, `mdl/catalog/builder.go`","insight":"**An empty analytic table is only an answer once something distinguishes 'computed and empty' from 'never computed'.** The mode ladder could not carry that bit: fast/full/source is a LEVEL, and the graph pass is orthogonal to it (it augments any level), so folding it in makes 'source' and 'full+graph' incomparable — it has to be a flag, not a rank. Guard it by MEASUREMENT, not a second hand-written list: run the pass on a synthetic refs graph and diff which tables went from empty to non-empty, then compare that set to the classification map. Shape the fixture so every table fills — two clusters for the community split and the integration surface, one MUTUAL pair for cycles — or the guard silently skips the very table the bug was about","fix":"Record MetaGraphAnalysis/MetaGraphResolution when the pass runs; classify the six tables in communitiesOnlyTables and warn 'requires refresh catalog communities (not run for this catalog)'; report it in SHOW CATALOG STATUS; re-run the pass when a full rebuild replaces a cache that had it"}
613
+
{"area":"mdl-executor","date":"2026-09-14","symptom":"DESCRIBE flattens a microflow whose branches cross into nested ifs that mean something else, and warns MDL-FLOW01 'must not be re-executed' instead of describing it","cause":"Nested if/then/else is single-entry/single-exit. A merge reached by branches of two different splits has no place in a tree, so the describer walked past it and emitted the conjunction along one path.","file":"mdl/executor/cmd_microflows_show_crossed.go","fix":"Mode 2: label the shared-suffix entry AND the split's post-dominator, emit `join <label>` at every branch end, then declare each merge as a top-level section after the traversal. MDL-FLOW01 is retired per decision when the description actually declared the merge.","insight":"Three traps, each of which produced plausible-looking output. (1) A crossed merge must be emitted the OPPOSITE way from an error-rejoin merge -- rejoin is DECLARED where the traversal meets it, crossed is JOINED by each branch and declared once afterwards -- so the label alone cannot drive emission; carry a crossed set beside the names. (2) Emit the join BEFORE the visited guard: arriving twice is what 'crossed' MEANS, and the guard silently swallows the second branch's join, leaving that path falling off the end. (3) Retire a warning 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 MDL-FLOW01 on Administration.ManageMyAccount, whose description is byte-identical with and without the feature. That forced warnings to be computed AFTER the body instead of before it. Method: keep a baseline binary (git stash -u; build) and diff `describe` over every microflow in a corpus -- the refactor step should be byte-identical (it was, 18 of 18) and the feature step should change only the microflows it targets (2 of 18). Anything else changing is the bug."}
0 commit comments