Skip to content

Commit 0d1781c

Browse files
akoclaude
andcommitted
test(doctype): stop running mx update-widgets before mx check
The doctype gate ran `mx update-widgets` after exec for any script named *page*/*widget*, to paper over pluggable-widget issues (CE0463). mxcli now emits valid pluggable-widget BSON on its own, and `mx update-widgets` has been observed to CORRUPT otherwise-valid 11.12 projects (it rewrites a widget's ConditionalEditabilitySettings.Attribute with the int32(3) list marker → a StorageLoadException). Running mx check directly on mxcli's output is both the stricter and the correct gate. Verified without update-widgets on Mendix 11.12 (both engines): 17-custom-widget, 30-pluggable-widget, 32-pluggable-widget-object-lists, and 33-alter-page all pass. (03-page still fails — a separate, real conditional-settings serialization bug the update-widgets step was not causing; tracked next.) runMxUpdateWidgets remains used by two targeted widget tests. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 54bfb61 commit 0d1781c

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

‎mdl/executor/roundtrip_doctype_test.go‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -240,11 +240,13 @@ func TestMxCheck_DoctypeScripts(t *testing.T) {
240240
// Flush to disk
241241
env.executor.Execute(&ast.DisconnectStmt{})
242242

243-
// Update widgets for scripts that create pluggable widgets (prevents CE0463).
244-
// Skip for other scripts — update-widgets can corrupt non-widget projects.
245-
if strings.Contains(name, "page") || strings.Contains(name, "widget") {
246-
runMxUpdateWidgets(t, env.projectPath)
247-
}
243+
// NB: we deliberately do NOT run `mx update-widgets` here. mxcli is
244+
// expected to emit valid pluggable-widget BSON on its own (verified by
245+
// mx check below), and `mx update-widgets` has been observed to CORRUPT
246+
// otherwise-valid projects on 11.12 — e.g. it rewrites a widget's
247+
// ConditionalEditabilitySettings.Attribute with the int32(3) list marker,
248+
// yielding a StorageLoadException. Running mx check directly on mxcli's
249+
// output is both the stricter and the correct gate.
248250

249251
// Run mx check
250252
output, mxErr := runMxCheck(t, env.projectPath)

0 commit comments

Comments
 (0)