Skip to content

Commit ec3cc44

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/bootstrap-prompt-smaller-37u3fu
# Conflicts: # CHANGELOG.md
2 parents 40b2ecd + 55e9714 commit ec3cc44

35 files changed

Lines changed: 2285 additions & 161 deletions

‎.claude/skills/fix-issue/findings/cmd-mxcli.jsonl‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,3 +106,4 @@
106106
{"area": "cmd/mxcli", "date": "2026-09-11", "symptom": "`.claude/bootstrap-mxcli.sh` (the SessionStart hook) re-downloads ~85 MB of mxcli on EVERY fresh session in an environment where mxcli is already installed on PATH", "cause": "The script gated only on `[ ! -x ./mxcli ]` and never consulted PATH, while the bootstrap skill tells you to `rm -f <AppName>/mxcli` after moving the project to the repo root \u2014 so in a session image with mxcli pre-installed the guard could never be satisfied by the binary already present, forever", "file": "`cmd/mxcli/init_hook.go` (`bootstrapScriptTemplate`)", "insight": "**A guard that asks 'is the artifact HERE' rather than 'is it AVAILABLE' pays full cost for something already on the machine.** Hardlink a PATH copy in first (what `mxcli new` itself does), falling back to symlink across filesystems then to a copy, and only download when none of those work \u2014 every path leaves ./mxcli working, which the rest of the script and the generated project CLAUDE.md both assume. Keep BOTH controls when testing: nothing on PATH must still download (not silently no-op), and an existing ./mxcli must be left untouched. Reported by ako/ChipCoV1", "refs": ["ako/ChipCoV1 FINDINGS.md"]}
107107
{"area": "cmd/mxcli", "date": "2026-09-11", "symptom": "`mxcli theme create --from <design.css>` seeds the palette and nothing else: the scaffolded brand theme still described itself in `theme list` as 'Cool slate, one teal signal colour' with Signal's six swatches, and vendored ~500 KB of IBM Plex woff2 the seeded --mxt-font never names, plus a SIL OFL licence for fonts it does not use. Separately, the primary button was never the brand colour: Atlas derives --btn-primary-bg from --brand-primary-600 = color-mix(brand, contrast 20%), so a brand blue #10069F rendered rgb(21,13,140)", "cause": "`manifest()` copied the base theme's Summary and Colorway verbatim and the walk copied every file unconditionally. The Atlas map pinned `--btn-primary-color` to `--mxt-brand-ink` \u2014 an ink each theme picks to sit on `--mxt-brand` (console pairs near-black #04211d with bright teal #2dd4bf) \u2014 while leaving the background to Atlas's derivative, so the pairing the theme designed for was never the pairing that rendered. The map's own comment already called it 'a brand-filled button'", "file": "`cmd/mxcli/theme/create_seeded.go`, `create.go` (`manifest`, the scaffold walk), `assets/*/files/theme/web/_mxcli-atlas-map.scss`", "insight": "**Inheriting a statement ABOUT the base theme into a theme whose palette is no longer the base's is a confident lie; derive it or drop it.** Two traps in the font half. (1) The decision must be made BEFORE the walk: it is taken by reading the partial and applied to files elsewhere in the tree, so doing it inline depended on WalkDir's lexical order putting `_mxcli-<name>.scss` before `mxcli-fonts/` \u2014 true only because of the leading underscore. (2) It touches two halves \u2014 the @font-face rules and the woff2 files \u2014 and getting either alone wrong is silent: a surviving rule for a deleted file 404s, a surviving file nothing loads is the dead weight being removed. Unit tests on each half cannot catch a mismatch; the guard is an integration assertion that a scaffolded theme ships exactly the fonts it loads (control: stubbing the file half fails it with 'X is shipped but no @font-face loads it'). Reported by ako/ChipCoV1", "refs": ["ako/ChipCoV1 FINDINGS.md"]}
108108
{"area": "cmd/mxcli", "date": "2026-09-13", "symptom": "`mxcli run --local --ensure-db` cannot provision PostgreSQL in a non-root devcontainer (Debian/Ubuntu base, remoteUser vscode): reported as a bare \"PostgreSQL did not become ready at 127.0.0.1:5432 within 20s\", or as `exec: \"initdb\": executable file not found in $PATH`. Fires on every fresh Claude Code session in an initialized project, since `mxcli init` wires `run --local --setup --ensure-db` into the SessionStart hook", "cause": "THREE independent defects on one path, each sufficient to block it. (1) `service postgresql start` ran unelevated: Debian's /etc/init.d/postgresql runs under `set -e` and calls create_socket_directory FIRST, which chmods /var/run/postgresql — refused for a non-root user, so the script aborts before it looks at a single cluster. (2) The #823 user-owned-cluster fallback was INERT on Debian/Ubuntu: postgresql-common wraps only the CLIENT tools (psql, pg_isready, pg_ctlcluster) into /usr/bin, while initdb/pg_ctl live in /usr/lib/postgresql/<major>/bin — so the safety net for a failed service start could never deploy on the platform that needs it most. (3) `resolveSuperuser` used `sudo -n -u postgres psql`, but mcr.microsoft.com/devcontainers/base grants its user sudo to root ONLY (`vscode ALL=(root) NOPASSWD:ALL`, confirmed in devcontainers/features main.sh) — so the target is refused even though the user is effectively an administrator. Plus a diagnostic defect: the 20s readiness timeout discarded the service-manager output the package had already collected", "file": "`cmd/mxcli/docker/ensuredb.go` (`serviceStartAttempts`, `postgresServerBinDir`/`postgresTool`, `superuser.viaRoot`, `withServiceDiag`)", "insight": "mxcli GENERATES the broken environment — `generateDockerfile` emits that exact base image, installs postgresql, and runs as vscode — so this was not user misconfiguration, and fixing it in code (not the template) also repairs projects already scaffolded. Root may target any account, so `sudo -n -- sudo -n -u postgres` reaches postgres under a root-only sudoers policy; try the direct form first and nest only on refusal. Resolve initdb and pg_ctl from the SAME bin directory and rank majors NUMERICALLY — a lexical sort puts \"9\" above \"16\", and a data directory made by one major cannot be started by another. **Measurement trap that cost the most time**: reasoning about which error the user would see is unreliable here — four plausible code paths produce four different messages, and the reported wording was reproducible by none of them on Ubuntu 24.04/PG16. What settled it was building a harness that calls `EnsureDatabase` directly and running it as a real non-root user with the real sudoers rule, then isolating each defect with a one-variable control (widen sudoers to `(ALL)` and nothing else changes → provisioning succeeds; prepend /usr/lib/postgresql/16/bin → the fallback completes). Each of the four fixes was reverted individually and its test re-run: two controls initially failed to COMPILE rather than reproducing the symptom, which proves nothing — they were redone faithfully before being believed", "refs": ["mendixlabs/mxcli#984", "#823"]}
109+
{"area": "cmd/mxcli", "date": "2026-09-13", "symptom": "`build-and-test` fails in CI on `TestSettleSourceReturnsPromptlyForOneChange` \u2014 \"a quiet source took 196.975373ms to settle, want under 100ms\" \u2014 while the SAME tree passes in another run of the same workflow minutes earlier", "cause": "The test bounded elapsed wall-clock time as a multiple of the poll interval (`poll * (sourceSettleWindow + 3)`, 100ms against a nominal 40ms). settleSource waits on `time.After(poll)`, which guarantees AT LEAST the duration and nothing about the upper bound, so a loaded runner blows the budget with no defect present.", "file": "cmd/mxcli/docker/runlocal.go (settleSourceWith, the injected tick), cmd/mxcli/docker/runlocal_settle_test.go", "insight": "The property being guarded was a POLL COUNT, not a duration \u2014 'a quiet source costs one extra poll' \u2014 so the fix is to make polls countable (inject the timer) rather than to widen the budget, which only moves the flake threshold. Diagnosis shortcut worth reusing: the same workflow ran twice on the same tree, once from the push event and once from the pull_request merge commit, and disagreed \u2014 two runs of one tree is direct evidence of nondeterminism and cheaper than reading the test. Two things the controls settled that reasoning did not: (1) the assertions are written in terms of `sourceSettleWindow`, so WIDENING that constant leaves both tests green \u2014 they assert the loop honours whatever window is declared, never the number itself, and the real control is a loop that costs one poll MORE than it declares (both fail). (2) Each tick call must return a freshly-armed channel; returning one shared channel makes the multi-file test HANG rather than miscount, so the re-arm is load-bearing and not a style choice. The seam also made a previously untestable guarantee expressible: the window must be sourceSettleWindow CONSECUTIVE quiet polls, and dropping `quiet = 0` from the change branch was green against every pre-existing test in the file.", "refs": ["ako/mxcli#449"]}

‎.claude/skills/fix-issue/findings/mdl-executor.jsonl‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -599,3 +599,4 @@
599599
{"area": "mdl/executor", "date": "2026-09-12", "symptom": "`describe widget datagrid -p app.mpr` — the command the MDL-WIDGET26/29 messages and the docs all point at for \"what does this widget's body take?\" — does not mention that a column can hold a filter. `Body containers` lists `column`, `controlbar`, `emptyplaceholder`, and the column's `items:` line lists only its scalar sub-properties", "cause": "`describeContainers` looped `ol.ItemProperties` and never `ol.ItemSlots`, so the two WIDGETS-typed slots of a DataGrid column (`content`, `filter`) were invisible — even though the property dump higher up in the same output shows them as `widgets`. The generated MDL example had the matching hole: it emitted `column item1 (showContentAs: 'attribute')` with no body, so nothing suggested a column takes one", "file": "`mdl/executor/widget_describe.go` (`DescribedItemSlot`, `describeContainers`, the container printer, and the object-list branch of the example generator)", "insight": "**An incomplete description was worse here than no description.** The only filter-shaped container it named was `controlbar` — the grid-WIDE filter bar — so an author asking this command where the column filter goes was steered to the one place that renders \"Unable to get filter store. Check parent widget configuration.\" That closes a loop with MDL-WIDGET29: the refusal names what the parent declares and says to look here, so the answer had to actually be here. **Say how a widget REACHES the slot, not just that the slot exists**: the useful line is `slot filter -> filter: textfilter | numberfilter | datefilter | dropdownfilter`, because AcceptedChildTypes is precisely what makes the filter go in the column's own braces with no wrapper. Both the accepted types and which slot is the default come from the engine (`itemSlotAcceptedChildTypes`, `defaultItemSlotKey`) rather than being restated — a second copy of the routing rule is the #1036 defect one layer up. Control: a widget whose containers are plain child slots (Gallery, Timeline) must report no item slots, and stubbing the loop makes all four tests fail with `got map[]`. Tests `widget_describe_item_slots_test.go`. Found by asking whether `describe widget` answered the question behind ako/view-entity-examples FINDINGS §2 — it did not", "refs": ["ako/view-entity-examples", "#1036"]}
600600
{"area": "mdl/executor", "date": "2026-09-12", "symptom": "A view entity cannot be given an association to a persistent entity. Three separate failures: (a) `mxcli check` misreports types — with the id column first, \"attribute 'TotalKwh': declared as Decimal but OQL expression returns Integer\"; with it last, \"OQL select has 4 columns but 3 attributes declared\"; (b) `exec` writes the view entity and creates NO association member, so the build fails CE1613 \"The selected association 'X' no longer exists\" (11.13/11.14) or CE6770 \"View Entity is out of sync with the OQL Query\" (10.24); (c) adding it by hand with `create association` gives CE6771 \"It is not possible to create associations to/from View Entities\"", "cause": "Selecting a persistent entity's id under an alias gives a view entity an ASSOCIATION whose name is the alias — the column IS the declaration, and Studio Pro creates the member when the column is added. mxcli modelled the select list as attributes only. (a) columns are aligned with declared attributes BY POSITION, so an unrecognised id column SHIFTS every attribute after it; (b) nothing created the member; (c) the association Studio Pro writes carries `Source: {$Type: DomainModels$OqlViewAssociationSource, Reference: <alias>}` and mxcli wrote `Source: null` — the `default:` arm of the source switch in both engines' association serializers", "file": "`mdl/executor/oql_view_associations.go` (new), `mdl/executor/cmd_entities.go` (execCreateViewEntity), `mdl/executor/oql_type_inference.go` (extractAliasMap, the two alignment sites), `mdl/executor/cmd_associations.go` + `validate.go` (CE6771 refusal), `sdk/domainmodel/domainmodel.go` (OqlViewAssociationSource, Association/CrossModuleAssociation.ViewSourceReference), `sdk/mpr/{parser,writer}_domainmodel.go`, `mdl/backend/modelsdk/{domainmodel,domainmodel_write,association_move_write}.go`", "insight": "**One field clears two errors, and measuring that first was the whole plan.** Before writing any Go: build the broken model with mxcli, apply the reporter's python patch that adds only the Source subdocument, re-run `mx check` — 2 errors (CE6771 + CE6770) to 0 on 11.13.0. That proves the target shape AND proves the association is also what makes the id column legal on the view entity, which no amount of reading would have settled. **Derive the association from the OQL rather than inventing syntax**: the column is the declaration, so describe → exec round-trips with no second statement to keep in step (verified: describe into a fresh project, 0 errors). **Correction to the report**: it says Studio Pro writes a `CrossAssociation`; that is true only when the target is in ANOTHER module — same-module is a plain `Association`, and both needed the field, so a fix pinned to CrossAssociation alone would have worked for one project layout and not the other. **The read path is not optional**: `create or modify association` round-trips through the semantic model and wrote `Source: null` back, silently converting a working project into CE6771 — A/B'd (pre-fix `Source = null`, fixed `Unchanged association`). The ALTER path does NOT lose it, because it gen-mutates the stored document, so the loss is narrower than the report implies but real. **Two alias-resolution gaps found by running the reporter's own example**: `extractAliasMap` matched neither `join r/Mod.Assoc/Mod.Target as m` (association-path join — the ordinary way to reach a related entity) nor `from Mappings.\"Order\" as o` (a quoted reserved word — the only way to write that entity), so the reported case resolved to nothing and produced no association at all. Run the reporter's literal example, not a tidied one. **`cast(m.ID as string)` must NOT be treated as an association** — it is a legitimate flat design (one query instead of two, no objects materialised in the client), so detection is the bare `<alias>.ID` form only. Measured on 11.13.0, both engines, 0 errors; controls: pre-fix binary on the same script gives 2 × CE1613, and re-running is `Unchanged`. Example `mdl-examples/bug-tests/view-entity-association.mdl`; tests `oql_view_associations_test.go`, `sdk/mpr/writer_domainmodel_test.go`. Reported by ako/view-entity-examples FINDINGS §1", "ce": ["CE6770", "CE6771", "CE1613"], "refs": ["ako/view-entity-examples"]}
601601
{"area": "mdl/executor", "date": "2026-09-12", "symptom": "A rule that consults the script's own definitions fires for a project object but not for one the SAME script creates — e.g. the CE6771 \"no association to a view entity\" check passed on a script that created the view entity and the association together, which is the ordinary shape", "cause": "`scriptContext` had TWO parallel collectors — `collectDefinitions` (whole program) and `collectSingle` (one statement) — switching over the same statement types and kept in step by hand. They were already out of step before this fix: `collectSingle` had no `CreateConstantStmt` case. Adding view-entity tracking to one left the other silent", "file": "`mdl/executor/validate.go` (`collectDefinitions` is now a loop over `collectSingle`)", "insight": "**Two lists that must agree are one list waiting to happen** — the third occurrence of this shape in the executor (see the `Associations`/`CrossAssociations` findings). The tell is a switch statement duplicated with a different signature; diff them before adding a case, because the drift is already there. Collapsing `collectDefinitions` into a loop over `collectSingle` removed the class, and picked up the pre-existing constants gap for free. Found because a new rule tested fine against a project and silently did nothing in a one-script repro", "refs": ["ako/view-entity-examples"]}
602+
{"area": "mdl/executor", "date": "2026-09-13", "symptom": "Two microflows with DIFFERENT runtime behaviour describe to the SAME MDL, and executing that MDL produces one of them. Repointing FeedbackModule.SUB_Feedback_SendToServer's error edge from the tail merge to the merge before the AppId split (\"on error, return empty\" -> \"on error, re-enter the split\") gave byte-identical DESCRIBE output bar one @merge layout annotation, no warning; exec reproduced the tail-merge graph in both cases. mxcli check clean, project opens, mxbuild 0 errors", "cause": "MDL had no way to say where an error path rejoins. `collectErrorHandlerStatements` stopped at the first ExclusiveMerge and emitted an empty `on error { }`; the builder's rule for an empty handler is \"fall through to the enclosing branch's continuation\", so every rejoin collapsed to that one target. MDL-FLOW01 could not flag it either: `successors()` in mdl/microflowgraph/structure.go drops every IsErrorHandler edge before building the graph, so the whole population scores zero in the prevalence scan", "file": "`mdl/executor/cmd_microflows_builder_merge.go` (new, build side), `mdl/executor/cmd_microflows_show_merge.go` (new, describe side), `mdl/grammar/domains/MDLMicroflow.g4` (`mergeStatement`/`joinStatement`)", "insight": "**A round trip that is a fixed point on the cases you have is not evidence the round trip is faithful.** The real corpus microflow round-tripped correctly by luck: its rejoin target happened to be exactly where an empty handler falls through to. Every fixture agreed, and the bug was invisible until a graph was CONSTRUCTED that disagreed — repoint one BSON pointer in a copy and re-describe. When a feature's correctness rests on an inference rule (\"an empty handler means X\"), the test that matters is one where the stored graph means something OTHER than X; the corpus will not supply it, because the rule was reverse-engineered from the corpus. Also: an ExclusiveMerge has no Name, so the label has to be minted at describe time — and minted from POSITION, not map order, or every re-describe is a diff", "refs": ["ako/mxcli#923", "docs/11-proposals/PROPOSAL_structured_microflow_description.md"]}

0 commit comments

Comments
 (0)