Repository navigation
Sync ako/mxcli: CDC service authoring, widget hide rules from editorConfig, readable domain-model layout, test --attach and round-trip fixes - #1938
Merged
Conversation
…ht where they can be Phase 2 of PROPOSAL_domain_model_readable_layout.md. mxcli layout moved entities and kept each association's stored connection points, chosen for the old positions; Studio Pro's default (mid-height on both boxes) slants every line between boxes of different heights, and every referrer of a tall entity met it at one point. dmlayout.Anchors places both ends of each association between two different entities, and a full layout writes them (--only-overlapping keeps the stored ones): - the sides that face each other (top/bottom when the boxes overlap horizontally, left/right otherwise); - straight where the boxes share a span: in the header when it is in the span, else its middle, on the longer box's whole-percent grid so the integer percentages Mendix stores do not tilt the line; - not straight through another box (columns that are not adjacent); - the k-th association between one pair 20 px further along the span; - the rest spread evenly along their side in the order of their far ends, clear of the straight ends and off the corners. Tests: each behaviour stubbed in turn fails its test (straight lines, longer-box grid, spreading, its order, self-associations, parallel offset, path check), and the command writes the points then a second run changes nothing (with a never-write control). On a copy of ako/PizzaV1, a second `mxcli layout` reports every module already laid out, so the points survive the write and read back. In Fulfilment nine of twelve lines are straight, where before every referrer of Order met it at one point. Lines still crossing a box run between non-adjacent columns (Catalog's Product_Allergen, RecipeItem_Ingredient): ordering, phase 4. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011oK82s49BaVGmKAnsWx6iR
Phase 3 of PROPOSAL_domain_model_readable_layout.md. Studio Pro draws a cross-module association from the left side of each local end, the target included, straight to the canvas edge (x = 0), n of them at i/(n+1) of the box height; the points are not stored and cannot be moved. The line runs through whatever is to its left. - CrossLinesFor collects, per entity, the cross-module lines drawn at it: its module's own associations and every other module's whose ChildRef names it, so the project's domain models are read. - PlanWith(dm, cross) places such an entity, in its column, at the first y where every line (label height included) misses the boxes to its left; column 0 starts far enough right for its labels; an isolated entity with such a line gets its own row at the left of the band. Plan(dm) is PlanWith(dm, nil). - mxcli layout, MPR020 and the exec reminder use the cross-aware plan, so layout still clears MPR020. Each behaviour stubbed in turn fails its test (band placement, left margin, isolated rows, the module prefix, target ends). On a copy of ako/PizzaV1, 28 of 39 cross-module lines ran through a box after phase 2, 0 after this; straight in-module lines 22 -> 21 of 29; a second layout changes nothing and MPR020/MPR016 are clean. The cost is height: a module where most entities have cross-module lines becomes a staircase (Shop 2292 -> 3717 px), the trade #1929's priority order asks for; crossings left are phase 4. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011oK82s49BaVGmKAnsWx6iR
A lookup (an entity referencing nothing in its module) always went in column 0, stacked from the top. One used only by an entity several columns in had a line across everything between, and once phase 3 pushed referrers down for their cross-module bands, lookups were left high above them: Catalog's Category sat at the top-left, Product three columns away and far below. - Layering: a lookup takes the column just left of its nearest referrer. Only lookups move, so every other entity stays one column past what it references. - pullLookups: after placing, each lookup moves to the median row of its referrers when that is free in its column, keeps its own cross-module lines clear, stays out of the lines of entities to its right, and is closer than where it was. Tests first; each behaviour stubbed in turn fails its test (column choice, row pass, others' lines, its own lines). TestPlan_LayersTheModel asserted the old rule and now asserts the new one. The locality test said "at most a quarter of the model moves"; with lookups sharing columns, adding an entity shifts its own column (4 entities in the fixture) and the band, so it now states that contract exactly: nothing outside the new entity's column and the isolated band moves. On a copy of ako/PizzaV1: Catalog 8 of 10 lines straight (was 6) and 160 px shorter, Category beside Product; no cross-module line blocked; other modules unchanged; a second layout changes nothing; MPR020/MPR016 clean. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011oK82s49BaVGmKAnsWx6iR
…operties (#1776) Hide rules were read from a widget's editorConfig.js source one JavaScript shape at a time: 96 of 170 measured widget versions had hide calls the reader could not state, a widget with its own hide helper (ChessClock, #2507) had none, and guards on Studio's `target` were applied in Studio Pro. mxcli now runs the package's getProperties(values, defaultProperties, "desktop") in goja (pure Go; no file, network or process access; fresh runtime, 1s limit, recovered panics) for the widget's actual values, and replaces the top-level read rules with always/never rules for that configuration. check (MDL-WIDGET10, required properties), exec (hidden resets, null hidden text templates) and widget describe use it. Read rules remain the fallback and the source for object-list item properties. ADR-0016. Closes #1776 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011oK82qrr1WnXxq1eRn7qRJ
…rioritization-24rqgv
… node CE0463) NullTemplatesOfUnsetDataSources (#1967) nulled an unset text template bound to an unset data source whatever the data source's required flag; #1967 was measured on an optional one. For a required data source Studio Pro and mx update-widgets keep the empty template, so a Tree node created without a data source failed with CE0463 instead of the CE0642 check warns about. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011oK82qrr1WnXxq1eRn7qRJ
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011oK82qrr1WnXxq1eRn7qRJ
…24rqgv Decide hidden widget properties by running the widget's editorConfig getProperties
…rioritization-24rqgv
…i-n64mx1 # Conflicts: # CHANGELOG.md
…24rqgv Keep the text template of a required, unset data source (Tree node CE0463)
…them Phase 4 of PROPOSAL_domain_model_readable_layout.md (rule 1 of mendixlabs#1929), the layout half. - dmlayout.Lines / Crossings: segments for associations (from their anchors; StoredAnchors reads them with Studio Pro's default), generalizations (centre to centre) and cross-module lines (left side to x = 0); lines crossing lines (not when they share an entity) and lines through a box (not along an edge). - PlanWith searches the order within each column: swap two neighbours, keep the swap when the full placement scores strictly better (lines + 2 x through a box), repeat within a budget of 8 swaps per entity. Never worse than the layering's order; deterministic. - mxcli layout prints `crossings A -> B (...; estimated)` per module. The barycentre sweeps the proposal planned were built and measured first, and dropped: on PizzaV1 and on ~7,000 random models they never found a better order (row alignment and the cross-module bands decide most positions). The swap search did: PizzaV1 Catalog 8 -> 6. The test fixture is that Catalog module; without the search it fails. Each geometry rule stubbed in turn fails its test (crossing, shared end, line through a box, cross-module lines left out). On a copy of PizzaV1, from the generated grid: Catalog 30 -> 6, Fulfilment 13 -> 3, Shop 30 -> 8; a second layout changes nothing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011oK82s49BaVGmKAnsWx6iR
…oes not connect Phase 4 of PROPOSAL_domain_model_readable_layout.md, the lint half. An association (stored connection points), a generalization arrow or a cross-module line (Studio Pro's fixed left-side-to-edge line, from either end's module) that runs through an entity box it does not connect. A warning, with dmlayout's geometry so layout and lint agree; a line is reported only when it passes through the box inset by 8 px, because box sizes are estimates and a line grazing an estimated edge may clear the real one. Each guard stubbed in turn fails its test (the inset, cross-module lines, reporting at all). PizzaV1: 27 findings as generated, 1 after mxcli layout (Catalog's Product_Allergen). pedapp and testapp-views: none. TestApp: 1, checked by hand to be a real line through SaveOrder in a hand-arranged diagram. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011oK82s49BaVGmKAnsWx6iR
) describe -> exec rewrote unchanged pages: a widget's stored TabIndex (int64 1 or -1) came back as 0, and an input widget's label template parameters were dropped (a check box labelled '{1}' would read "{1}"). CarryUnexpressed keeps both from the stored element. Measured on AgentCommons 4.4.0 and MxGenAIConnector 7.4.0 (11.16.1): 4 rewritten pages, now 47 of 47 in sync. Closes #2106 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011oK82qrr1WnXxq1eRn7qRJ
… MDL SEC005 said strict mode enforces XPath constraints and tied it to CVE-2023-23835. Strict mode restricts the client API instead: data.action, create, commit, remove and rollback are disabled and data.get works only by GUID. CVE-2023-23835 is fixed by a runtime update. The rule's link went to an unrelated advisory. - Message and description say what strict mode restricts; the link is Mendix's strict mode page. - The suggestion is `alter app security ( StrictMode: true );` (the old `ALTER PROJECT SECURITY STRICT MODE ON;` is MDL-DEPR554), with what can break: JavaScript actions using those APIs, File Uploader's delete, Web Actions' Take picture. - Silent under the classic web client, where strict mode cannot be enabled. - lint --help, the lint command docs and the Starlark rules page no longer say "XPath constraint enforcement". - The new rule version is added to lint_rules_shipped.txt. Fixes #2550 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011oK82qTgUsRMETmzvjS27w
…24rqgv describe → exec keeps a widget's TabIndex and an input label's parameters
…primitives only (#2548) Regression from #2546: build step 4.10 ran getProperties with the builder's primitive values, so an attribute the statement binds looked unset and a rule such as `!isSet(values.evaluation)` hid -- and nulled -- a text template the script had set; check, which passes the whole configuration, said nothing. Step 4.10 now uses configurationValues(primitives, script values), as the hidden-property resets and check do. Closes #2548 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011oK82qrr1WnXxq1eRn7qRJ
…24rqgv exec evaluates a widget's editorConfig with the bound values, not primitives only
Every call in a generated endpoint test microflow got an ON ERROR handler that read the raised message into a variable; mxbuild --serve's incremental build rejects any use of such a variable (CE0108; a full build accepts it), so --attach fell back to a cold build it cannot apply and ran no test. The endpoint path generates no handler now: the error leaves the test microflow, the endpoint reports its message, and toResult gives the verdict the handler gave (FAIL "exception during execution: <msg>", or PASS/FAIL against @throws). The serve recovery prints the incremental CE0108 lines. Closes #2331 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011oK82qrr1WnXxq1eRn7qRJ
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011oK82qrr1WnXxq1eRn7qRJ
…24rqgv test --attach runs tests that call a microflow: the endpoint reports errors, not a generated handler
…s hide it (#2549) Regression from #2546: getProperties was asked about target "desktop" only, and Tree node hides advancedMode for every target but "web", so check and exec refused a valid `advancedMode: true`. Measured on 11.16.1: mxbuild enforces neither of Tree node's target-dependent branches (both pass mx check, update-widgets resets neither), while a target-independent hide is CE0463. The evaluator now runs both targets and intersects; ADR-0016, the guide and the skill are corrected. Closes #2549 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011oK82qrr1WnXxq1eRn7qRJ
… lookups in their referrer's column Two refinements from reviewing the ako/PizzaV1 renders. Unconnected entities (no association in the module) went in a band under the graph; Shop's TrackView, taller than the whole graph, doubled the height. They now fill the free space right of the graph or below it, at the candidate position that keeps the diagram closest to a landscape frame (max(w, 1.5h)), clear of every box, with their cross-module lines clear and out of the lines of entities to their right; those with lines shortest first, so taller ones' lines run under shorter neighbours. Shop 3717 -> 2408 px tall, PizzaChat 1216 -> 728. A lookup alone in its column may share its nearest referrer's column, kept when it has fewer crossings, or as many and the diagram is narrower and no taller, and never when it adds a line through a box (on Shop it put MenuView_Cart through HomeView). Above or below is the swap search's call. Catalog: Allergen with Ingredient (above, 1 crossing; below, 3), crossings 6 -> 2, 317 px narrower. Ranking the swaps by size as well was tried and dropped: it reshuffled columns for a few pixels and broke locality. Tests use PizzaV1's real Catalog and Shop modules as fixtures; every guard fails its test when stubbed (the region, own lines, others' lines, landscape cost, shortest first, the lookup move, lone-column, no taller, no new line through a box). Three tests that encoded the band underneath now state the new contract. Cross-module lines through a box on PizzaV1 stay at 0; a second layout changes nothing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011oK82s49BaVGmKAnsWx6iR
…24rqgv A widget property is hidden only when both editorConfig targets hide it
An Agent Editor document keeps its references as {documentId,
qualifiedName} pairs inside one JSON string (Contents), which the
reference sweep never looked into: renaming or moving a tool microflow
left the agent naming the old one, and dry run did not list it. Studio
Pro re-syncs these through its agent-editor extension, which mx and
mxbuild never load, so mx check stays green.
The rename and move sweeps now rewrite matching qualifiedName values in
place, keeping documentId and layout, count them as hits, and keep
Contents out of the expression sweep so prompt text is unchanged. Lint
MPR022 reports a stored agent-document reference that resolves to
nothing.
Closes #2265
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011oK82qrr1WnXxq1eRn7qRJ
LIST CHANGE DATA CAPTURE SERVICES [IN Module] and DESCRIBE CHANGE DATA CAPTURE
SERVICE Module.Name. Part A2 of
docs/11-proposals/PROPOSAL_kafka_event_integration.md: mxcli knew the
ChangeDataCapture$* types but had no statement that reached them, so `list
change data capture services` was a parse error rather than an empty result.
Read-only on purpose. The document is two-sided -- Sources is the live model,
Baseline the copy Studio Pro's "accept changes" froze -- and the baseline names
what it tracks by GUID, the identity the runtime keys the database on. A write
path that minted those instead of reading them from the domain model would lose
a table's rows on the next deploy with no build error, so it is part C and not a
by-product of this. The GUIDs are carried into the semantic model verbatim
rather than resolved to names, so the write path's hardest invariant stays
visible.
DESCRIBE reports what is stored as comments, because there is no CREATE for this
document yet and emitting MDL would hand the reader a script that cannot run --
the same choice the consumed business event describe made before its grammar
landed. It prints each source's revision and its Kafka topic,
cdc.<AppName>.<ExposedName>.<Major>.{space}: every segment but the last is a
model value, so a major bump, an AppName change or a rename starts a NEW topic,
and downstream a new table with no history.
Evidence
--------
The backend read is exercised against the unit Studio Pro wrote (TestApp
619864b, Mendix 11.16.1), inserted verbatim with AddRawUnit. That matters more
than convenience: an element mxcli created has GUID == $ID from birth, so a GUID
defect is undetectable on it (CLAUDE.md). Verified on this fixture before
relying on it -- every entity's GUID differs from its $ID as raw bytes, and the
baseline references the GUID for the entity, all four attributes and the
association, the last matching DomainModels$Association.GUID exactly.
Controls, each failing a different assertion: baseline mapping dropped ->
"Baseline is nil"; EntityGUID read as empty (the #2395 defect) -> both
entity GUIDs reported empty; the major hardcoded in the topic -> the Customer
topic assertion. A control also pins the version gate: the same unit on the
11.6.6 fixture is refused, naming Baseline (11.10.0+), ServiceName (11.8.0+) and
EntityChangeSource.ExposedName / .Properties (11.9.0+). §5.2's "Mendix >= 11.10"
is therefore enforced by storage, not by a check of ours.
Against a project holding the fixture, the computed topics reproduce the two
values the proposal records from Studio Pro's editor exactly:
cdc.TestApp.Order.1.{space} at revision 1.1 and cdc.TestApp.Customer.1.{space}
at 1.0.
CAPTURE is a new token, so it is in the `keyword` rule: `Capture` still lexes as
an element name, which is the #2389 lesson.
Not in this change: the catalog tables, the RefKinds that would let `show
callers` and impact analysis see CDC exposure, and the CatalogSchemaVersion bump
-- the rest of §5.4's A2, separately testable and left for a follow-up.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011oK82qQLKUyoXXGmbmX68t
…24rqgv Rename and move update agent document references; lint MPR022
feat(cdc): read entity change data capture services
…producer Everything in the Kafka proposal's §3-§5 was read off fixtures. A running app (ako/TestApp at 619864b, Mendix 11.16.1, booted with mxcli run --local against a DuckGraphLake broker) published real change events for the first time, and corrected three things fixtures could not. New §1a records the run and its measurements. The corrections it forced: - **The topic's second segment is the CDC document's AppName, not the module name.** Entities of module CdcPublish publish to cdc.TestApp.*, because the service's AppName is "TestApp". §5.2's template was right and describe's computed topic matches the runtime exactly; what was wrong was the fixture producer, which used the module name and so produced to topics no Mendix app writes to. The shape was right, the name was not, and only a runtime could tell the difference -- a hand-built producer reproduces whatever its author believed. Fixed in produce_cdc.py, which now lives beside the fixtures it belongs with rather than in a scratch directory. Verified: its rows land in the same topic as the runtime's, beside them. - **The consumer group id has the space in it**: <projectId>-<space>- <serviceName>-<eventName>, not <projectId>-<serviceName>-<eventName> with the space as a "prefixed variant". §1 corrected, with the observed value. - **ServerUrl and ChannelName/EventBrokerSpace stop the app booting**, not just consuming. §5.1 gains a check rule: without either, StartupBusinessEvents throws in the after-startup action and the runtime shuts down. A warning rather than an error, since both are per-environment values. Two more worth keeping, both in §1a: CDC publishes fine on HSQLDB despite the degraded-snapshot-protection warning, so a dev loop needs no PostgreSQL; and object-id type codes are not a sequence (Order 1, Customer 60 in one module), so a fixture using plain small integers makes every entity share code 0 and the lake resolves associations to the wrong entity. §8's runtime item is marked done for the CDC half; the consumer half -- inject an event, assert the handler ran -- is still open. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011oK82qQLKUyoXXGmbmX68t
feat(layout): readable domain model layout, phases 2–4 (lines, cross-module bands, lookups, compaction, fewest crossings, MPR021)
fix(lint SEC005): explain strict mode as Mendix does, suggest current MDL
…producer (#2559) docs(kafka): record what a running app measured, and fix the fixture producer
Grammar, AST and visitor for the statement §5.2 of
PROPOSAL_kafka_event_integration.md designs:
create or modify change data capture service CdcPublish.OrdersCDCService
( ServiceName: 'OrdersCDCService' )
{
entity CdcPublish.Order (OrderId, Price as 'PriceAmount', Order_Customer);
entity CdcPublish.Customer as 'Client' (CustomerId, Address);
};
drop change data capture service CdcPublish.OrdersCDCService;
Only the live side is authored. The baseline -- the frozen copy Studio Pro's
"accept changes" writes, which names what it tracks by the GUIDs the runtime
keys the database on -- is computed by the write path, never typed. A GUID an
author could write is a GUID an author could get wrong, and a wrong one
silently detaches a table from its data.
Members are named, not typed: each resolves to an attribute or an association
of that entity and its CDC type comes from the domain model. That mapping is
now settled rather than guessed -- mxbuild ships Studio Pro's CDC editor as
readable JavaScript (modeler/ide-client/change-data-capture-editor/editor.js)
and it carries the switch verbatim: Binary/Boolean/DateTime/Decimal to
themselves, Enumeration to Enumeration, Integer to Int32, Long and AutoNumber
to Int64, String and HashedString to String, an association to ArrayOfInt64.
Those ten cases are every Mendix attribute type, so §9.3's seven unmeasured
types need no Studio Pro export after all.
Four guards, each with a reason an author can act on:
- `id` listed is refused: Studio Pro shows it as a checked, disabled row and
stores no property for it, so writing one would break CLAUDE.md's rule 4.
- `AppName` is refused *with the explanation*, not as an unknown property --
it is the topic's second segment, so setting it would re-point every topic
the service publishes to.
- Two sources sharing an exposed name are refused, naming the topic they would
collide on, since the exposed name is the topic's third segment.
- A source left with no members after `id` is dropped is refused.
NOT shippable alone, and deliberately not pushed as its own PR: a statement
that parses and then fails at exec is worse than no statement, because an agent
will generate it. This goes up with C2's write path.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011oK82qQLKUyoXXGmbmX68t
CREATE [OR MODIFY] / DROP CHANGE DATA CAPTURE SERVICE now write the document, completing the statement C1 parsed. With A2's LIST/DESCRIBE already in, a project can declare what it streams to a lake without Studio Pro. Only the live side is authored. Every GUID the baseline stores is READ from the domain model and none is minted: the runtime keys mendixsystem$entity.id and mendixsystem$attribute.id on them, so an invented one detaches a table from its rows on the next deploy, with no build error and nothing in a diff to see. canon gains ElementGUIDs for that, because nothing above raw BSON exposed a GUID -- the generated domain-model types have no accessor -- and it belongs in the package that already owns what a GUID costs rather than in a second reader that can drift from it. The strongest check available says the writer is right: `create or modify` over Studio Pro's OWN OrdersCDCService reports **Unchanged**. The rebuild is therefore byte-identical to Studio Pro's after normalisation -- GUIDs, property sets, both list markers and the cross-pointers included -- and the storage-GUID guard, which UpdateRawUnit runs via canon.Reconcile, did not refuse it. Independently: an MDL-authored service passes `mx check` with 0 errors, and the control (baseline omitted) fails it. Two shapes only a real document could have told us, and one measurement: - The two sides use DIFFERENT list markers: live 3, baseline 2. Nothing about the shapes suggests it; a writer using one for both produces a document Studio Pro rejects (the #1640 class). - The service carries `Excluded` even at its default. The shape test caught that, not a reviewer (CLAUDE.md rule 4, canon.CompletePropertySets). - An ABSENT baseline makes mx check CRASH (`The given key '<guid>' was not present in the dictionary`), where CE1585 is what an inconsistent one reports. Recorded in §6; the control asserts the crash, not CE1585. §9.3 is answered without a Studio Pro export: mxbuild ships Studio Pro's CDC editor as readable JavaScript and it carries the attribute-type mapping as an explicit switch. All ten cases implemented, which is every Mendix attribute type, so the mapping is total. §5.2's version policy (C3) is implemented and still INFERRED from one document (§9.2 wants a Studio Pro session): unchanged keeps its version, an addition is minor+1, a removal/rename/type change is major+1, a new source starts at 1.0 without bumping the service. Verified live: removing a property took Order from 1.1 to 2.0 and its topic to cdc.TestApp.Order.2.{space} -- a NEW topic, which is why the rule matters more than mxbuild's indifference to the numbers suggests. A view entity is refused. It reports Persistable = true, so the flag alone let it through; Source is what tells it apart, and a view has no rows of its own to capture. My own test caught that. The repo's coverage guards asked for eight registrations on the way -- the if-not-exists target, the documentation carry, the duplicate classification and its name set, the drop classification, the drop syntax topic, the registry snapshot and a version gate. The gate is the substantive one: §5.2's "Mendix >= 11.10" is now a check-time error naming the baseline type, instead of a storage-layer refusal after the fact. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011oK82qQLKUyoXXGmbmX68t
feat(cdc): author change data capture services in MDL (part C)
A skill for the doctype MDL can now author, written from what the last few changes established rather than from the design: the CDC type mapping taken out of Studio Pro's own editor, the topic template confirmed against a running app, and the runtime recipe that actually produced rows in a lake. What it carries that no --help does: - The full attribute-type to CDC-type table, measured, so nothing has to be guessed and nothing is unmappable. - Why only the live side is authorable: the baseline names what it tracks by the GUIDs the runtime keys the database on, so a GUID an author could write is one they could get wrong. - That `create or modify` over a Studio Pro-authored service reports Unchanged, and that `Modified` on an untouched service means something has drifted -- the most useful single check a reader can run. - The topic template, and that a major bump starts a NEW topic and a new table downstream with no history. - The version policy, marked INFERRED from one document, with what to compare it against in Studio Pro. - The two constants that make the app fail to BOOT rather than merely consume nothing, which cost two failed boots to learn. - Three things that cost time: hsqldb is enough for CDC despite its degraded snapshot warning, a snapshot is sent once per revision so data predating the first run never arrives, and Mendix 11.14+ needs JDK 25. It also says plainly that CDC is publish-only in 11.16 and points at the three read paths that exist instead, since that was the first thing to go looking for and not find. The conformance gate asked for two corrections on the way: `[in Module]` placeholder notation inside an MDL fence (written as real statements now, as the other skills do) and the missing `mdl 1;` header. Worth noting that the reduced doc-only gate would not have caught either -- a skill is embedded in the binary, so it is not a docs-only change. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011oK82qQLKUyoXXGmbmX68t
…ed (#2568) docs(skills): a change-data-capture skill, from what this work measured
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.
Syncs
ako/mxcli:maininto upstream: 20 commits since the last sync (#1930) — pluggable-widget hide rules decided by running the widget's own editorConfig, change data capture services you can list, describe and author, readablemxcli layoutdiagrams with a crossing lint, atest --attachfix, describe → exec round trips that no longer rewrite unchanged pages, and agent-document references kept through rename and move.Fixes #1874.
Pluggable widgets
getProperties(ADR-0016). Hide rules were read fromeditorConfig.jsone JavaScript shape at a time: 96 of 170 measured widget versions had hide calls the reader could not state, and a widget with its own hide helper had none. mxcli now runs the package'sgetPropertiesin goja (pure Go; no file, network or process access; a fresh runtime per call, a 1 s limit, panics recovered) for the widget's actual values, for both thedesktopandwebtargets, and treats a property as hidden only when both hide it — mxbuild enforces neither of a target-dependent pair, while a target-independent hide is CE0463. check (MDL-WIDGET10, required properties), exec (resetting hidden properties, nulling hidden text templates) andwidget describeuse it; the source reader remains the fallback and the source for object-list item properties. exec evaluates with the values the statement binds, not primitives only, so a text template the script set is no longer nulled by a rule such as!isSet(values.evaluation).mx update-widgetskeep it empty.Round trips
{1}would read "{1}"). Both are now kept from the stored element. Measured on AgentCommons 4.4.0 and MxGenAIConnector 7.4.0 (11.16.1): 47 of 47 pages in sync, was 43.MPR022. An agent document keeps its references as{documentId, qualifiedName}pairs inside one JSON string, which the reference sweep never looked into, so renaming or moving a tool microflow left the agent naming the old one andmx checkstayed green (Studio Pro re-syncs these through an extension mx never loads). The sweeps now rewrite matching names in place, keep prompt text unchanged and count the hits in dry run; MPR022 reports a stored agent-document reference that resolves to nothing.Testing
test --attachruns tests that call a microflow (test --attachruns no test when a test calls a microflow: incremental build reports CE0108, fallback full build passes but needs a runtime restart #1874). Every call in a generated endpoint test microflow got anon errorhandler reading the message into a variable, which the incremental build ofmxbuild --serverejects (CE0108, though a full build accepts it), so--attachfell back to a cold build it cannot apply and ran no test. The endpoint path generates no handler now and gives the same verdicts; the serve recovery prints the incremental CE0108 lines.Change data capture
list change data capture services [in Module]anddescribe change data capture service Module.Name. It was a parse error.create [or modify]/drop change data capture servicewrite the document, so a project can declare what it streams without Studio Pro:Only the live side is authored. Members are named, and each one's CDC type comes from the domain model, using the mapping Studio Pro's own CDC editor ships. The baseline (the frozen copy Studio Pro's "accept changes" writes) names what it tracks by GUID, the identity the runtime keys the database on, so every GUID is read from the domain model and none is minted (
canon.ElementGUIDs).create or modifyover Studio Pro's own service reports Unchanged, so the rebuild matches Studio Pro's after normalisation; an MDL-authored service passesmx checkwith 0 errors, and the control (baseline omitted) fails it.The Kafka proposal records what a running app (11.16.1) published: the topic's second segment is the service's AppName, not the module name, and the consumer group id includes the space. The fixture producer is fixed to match.
Domain model layout
Phases 2–4 of the readable-layout proposal (rules from #1929):
--only-overlappingkeeps the stored ones.mxcli layoutprints the estimated count per module (one module 8 → 2).MPR021warns about an association, generalization or cross-module line drawn through an entity it does not connect, with the same geometry as layout. The test app went from 27 findings as generated to 1 aftermxcli layout.Lint
alter app security ( StrictMode: true );with what can break, and the rule is silent under the classic web client.Dependencies
github.com/dop251/goja(pure-Go JavaScript engine) for the editorConfig evaluation, with its indirect dependencies