From f0d9a9284906836ac06dc7063f526aacd0425a4e Mon Sep 17 00:00:00 2001 From: Ako Date: Mon, 14 Sep 2026 14:50:53 +0000 Subject: [PATCH 1/9] fix(check): check a user task's page and targeting microflow signatures MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A workflow user task hands work to two documents, and `check --references` resolved both by name only. A task page typed to the context entity, one with no parameters, or a targeting microflow missing the System.Workflow parameter passed check, was written by exec, and failed only in the native build. A team building workflows from MDL listed both among the reasons "a green CLI check is not evidence for workflows". Every rule is a row of an mxbuild measurement on 11.13.0, one user task per shape, verdict = the literal `mx check` line: task page, no parameters CE7410 task page, no WorkflowUserTask parameter CE7412 (multi-user too) task page, WorkflowUserTask + an extra parameter 0 errors targeting (System.Workflow, Ctx) / (Ctx, Workflow) 0 errors targeting (Workflow) / () / (Workflow, Ctx, String) CE6677 targeting (Workflow, generalization of Ctx) 0 errors targeting (Workflow, specialization of Ctx) CE6677 groups targeting same rule Three rows are clean shapes a reading of the error text would refuse — extra page parameters, reversed order, a generalization — and exec refuses on a check error, so a wrong rule would block a valid workflow rather than warn. An inheritance chain that leaves what can be resolved is "not proven", which is not a refusal. Covers CREATE WORKFLOW (nested and multi-user tasks) and ALTER WORKFLOW (inserted tasks, SET ACTIVITY PAGE / TARGETING MICROFLOW, with the context entity read off the stored workflow). Pages, flows and generalizations are resolved from the script first — they are ordinarily one script with the workflow — then the project; scriptContext now records page parameter entities and entity generalizations beside flowParams. Gated on Mendix 11, where it is measured. check --references reports before anything is written. exec calls the same function at the workflow statement, so the workflow is never written, though earlier statements in the script already are. Controls, one stub each: the page check, the targeting check, following the generalization, treating an unresolved chain as a mismatch, and the version gate — each fails exactly the cases it should. End to end on an 11.13 app: check --references reports exactly the six measured-bad shapes and none of the five clean ones, and the positive fixture execs and builds at 0 new errors. Co-Authored-By: Claude Opus 5 --- .../fix-issue/findings/mdl-executor.jsonl | 1 + ...low-task-page-and-targeting-signatures.mdl | 87 +++++ mdl/executor/validate.go | 13 + mdl/executor/validate_workflow_refs.go | 10 +- .../validate_workflow_task_signature.go | 354 ++++++++++++++++++ .../validate_workflow_task_signature_test.go | 236 ++++++++++++ 6 files changed, 699 insertions(+), 2 deletions(-) create mode 100644 mdl-examples/bug-tests/workflow-task-page-and-targeting-signatures.mdl create mode 100644 mdl/executor/validate_workflow_task_signature.go create mode 100644 mdl/executor/validate_workflow_task_signature_test.go diff --git a/.claude/skills/fix-issue/findings/mdl-executor.jsonl b/.claude/skills/fix-issue/findings/mdl-executor.jsonl index d490dadc9..0effd8834 100644 --- a/.claude/skills/fix-issue/findings/mdl-executor.jsonl +++ b/.claude/skills/fix-issue/findings/mdl-executor.jsonl @@ -613,3 +613,4 @@ {"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