Sync ako/mxcli: pluggable widget action variables, ALTER pluggable property kinds, Starlark API docs - #1208
Conversation
…e whole surface
The write-lint-rules skill is what Starlark rules are written from, and it
had drifted from the API:
- seven query functions were missing (java_actions, documents,
documentable_elements, navigation_targets, queues, module_cycles,
database_connections), four of them used by shipped rules;
- get_option() and struct() were missing from the helper table;
- scheduled_event lacked repeat, on_overlap and time_zone, and
project_security lacked anonymous_user_role.
Document all of them, and add a test that holds the skill to the API as
registered in code:
- every name in buildPredeclared() must appear as `name(` in the skill;
- every struct built with starlarkstruct.FromStringDict (found by parsing
the package source, including dicts built in a local variable) must have
a table listing exactly its fields.
Structs documented another way are named in explicit maps: violation and
location as helper parameters, cycle and module_cycle as inline struct{...}
rows, and entity_permission in the shared permission table.
Follow-up to mendixlabs#1178, whose test covered only the entity and
microflow tables.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011AvRv9GAQJbrHgrgMmfsBM
…mendixlabs#1201) `ALTER PAGE … SET ImageUrl = … ON img1` printed "Altered page" and changed nothing. setPluggableWidgetPropertyMut wrote every value to PrimitiveValue; the pluggable Image's imageUrl is a TextTemplate, which DESCRIBE, mx check and the runtime read instead. The setter now reads the property's declared ValueType.Type and dispatches through columnValueField, the same schema dispatch the DataGrid 2 column setter already uses: TextTemplate updates the template text, Expression writes Expression, primitives keep PrimitiveValue. Kinds a plain value cannot express (Action, DataSource, Image, Icon, Attribute, Widgets, …) are refused instead of reported as success, as is a list value (mendixlabs#750) and a null (hidden, #574) text template. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01H79ZLyf5E4LuV48TmbDdq9
docs(lint): document every Starlark builtin and struct field; test the whole surface
…ixlabs#1200) A pluggable widget built from its .mpk wrote every action property's ValueType with an empty ActionVariables list, so the stored widget Type disagreed with its package and mx check reported CE0463 on every page carrying it, even with no action configured (Signature 2.1.0, Calendar 2.6.0 on Mendix 11.12.2). The .mpk parser now reads <actionVariables><actionVariable key type caption/> (top-level and nested object-list properties), and the generator writes them as CustomWidgets$WidgetActionVariable entries (Caption, Key, Type), the shape Studio Pro stores in the embedded Combobox template. Reconcile brings an embedded template's list in line with the installed package, rewriting it only when it disagrees so an agreeing template keeps its entries and $IDs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01H79ZLyf5E4LuV48TmbDdq9
Critique of the whole MDL language against ADR-0003 before the alpha to beta transition, with verified before/after examples, twelve consolidation rules, the changes that cannot be bridged by an alias, a two-mode (MDL-first / data-first) editing model with content-addressed ALTER MICROFLOW, and a phased implementation plan. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- create or modify is the one idempotent create, with minimal-change semantics: an unchanged definition writes nothing; implemented as diff-then-patch on the same splice engine as alter. - show is dropped in favour of list (and describe for single things). - microflow list operations mirror Studio Pro's List operation and Aggregate list activities, one statement per activity. - PedApp may be committed as the round-trip fixture. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…proposal Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tion Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… modes ADR-0010: one canonical form governed by rules R1-R12 (extends ADR-0003, amends its verb inventory: show is dropped). ADR-0011: spelling changes become registered deprecated aliases; meaning changes apply only under the mdl <n> language header. ADR-0012: MDL-first and data-first editing share one syntax and one patch engine; create or modify is diff-then-patch; round-trip laws; optional @base optimistic locking. Cross-references: ADR index, ADR-0003 status note, proposal frontmatter, CLAUDE.md pointer. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds the R1-R12 canonical rules and alias/versioning checks, and fixes examples that contradicted the grammar (rename ... as, entity grant order) or the new rules (show, filter). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ew until beta Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fix(alter): write a pluggable property to the field its kind declares (mendixlabs#1201)
fix(widgets): carry an action's <actionVariables> from the .mpk (mendixlabs#1200)
…-syntax CLAUDE.md is at its context budget (TestRepoClaudeMDStaysWithinItsContextBudget). The rule applies only when designing syntax, so the design-mdl-syntax skill, which already carries R1-R12 and the versioning checks, is its home. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AI Code ReviewReview SummaryThis PR syncs three commits from
What Looks Good
Minor Issues
RecommendationApprove. The changes are:
No blocking issues found. The PR successfully resolves CE0463 for Signature/Calendar widgets and fixes broken ALTER PAGE SET for pluggable properties while improving lint rule author experience. Automated review via OpenRouter (Nemotron Super 120B) — workflow source |
…nd CI validation Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docs: MDL beta syntax proposal and ADR-0010..0012
AI Code ReviewLet me analyze this pull request based on the provided context and checklist. The PR is titled "Sync ako/mxcli: pluggable widget action variables, ALTER pluggable property kinds, Starlark API docs" and includes:
Let me review against the checklist: Overlap & duplication
MDL syntax design
Full-stack consistency
Test coverage
Security & robustness
Scope & atomicity
Code quality
Bugs & correctness
Let me look more closely at the specific changes: For the pluggable widget action variables (#1200):
For the ALTER PAGE pluggable property kinds (#1201):
For the Starlark API documentation:
Additionally, the PR includes:
Let me check if there are any issues with the proposal and ADRs: The proposal PROPOSAL_mdl_beta_syntax_freeze.md discusses MDL language critique and beta syntax freeze. It mentions decisions ADR-0010, ADR-0011, ADR-0012 which are being added in this PR. This seems consistent - the proposal is proposing these decisions, and the ADRs are recording them as accepted. Looking at ADR-0010 (0010-mdl-canonical-syntax-rules.md):
ADR-0011 (0011-mdl-language-versioning.md):
ADR-0012 (0012-mdl-first-and-data-first-editing.md):
These seem to be legitimate architecture decisions being recorded. Now, let me check against the specific review checklist items from CLAUDE.md: Working Rules for a ChangeSince this isn't a bug fix (it's a feature fix and documentation), I'll look at the general requirements:
Scope & atomicity
Code quality
MDL syntax designSince no new MDL syntax is being added, this section doesn't apply significantly. However, the proposal document discusses syntax rules, so let me check if it violates any:
Full-stack consistencySince no new MDL syntax is being added, this doesn't apply. The fixes are to existing functionality. Let me check if there are any red flags:
One thing to check: in the ALTER PAGE pluggable property fix, there's this comment: This references issue #574, which seems to be about conditional visibility. The fix correctly refuses to write to a null/hidden template rather than creating it in a hidden slot, which would be incorrect. Another thing: in the same function, there's: And then it refuses kinds like Action, DataSource, etc. This seems correct - you shouldn't be able to set complex properties with simple values. For the action variables fix, the comment explains: This shows they're being careful to only update when necessary to preserve $IDs, which aligns with the GUID preservation principles in CLAUDE.md. Let me check if the PR follows the "Definition of Done" from CONTRIBUTING.md (referenced in CLAUDE.md):
The PR also mentions:
These are concrete symptoms that were fixed. Let me check if there's anything that violates the MDL syntax design guidelines mentioned in CLAUDE.md:
Since no new MDL syntax is being added, these don't directly apply to the code changes. The proposal document discusses these guidelines but doesn't violate them. One potential issue: I should check if the proposal document or ADRs introduce any syntax that violates these guidelines, but they're documentation, not executable MDL. Let me look at one specific part of the proposal that might be concerning: From PROPOSAL_mdl_beta_syntax_freeze.md: This is discussing a syntax rule, not implementing it. The actual implementation would be in the code, but I don't see changes to the grammar or visitor that implement this rule in this PR. The PR is adding documentation about the rule, not implementing the rule itself. Actually, looking more carefully, the PR is adding the ADRs that record decisions about these rules, but the actual implementation of the rules would be in other PRs. This PR is just documenting the decisions. This seems appropriate - first document and decide on the changes, then implement them in follow-up work. Let me check if there are any missing pieces: For the pluggable widget action variables fix:
For the ALTER PAGE pluggable property kinds fix:
For the Starlark API documentation:
One thing I noticed: in the Starlark skill coverage test, there's this line: This suggests they expect at least 10 builtins, which seems reasonable. Let me check if there are any testability concerns:
One potential improvement: in the pagemutator/pluggable_property_kind_test.go, there are tests for refusing structured kinds, but I don't see a test for what happens when you try to set a list value. Wait, actually there is: So that's covered. Let me check if the changes align with the architecture described in CLAUDE.md: From CLAUDE.md:
The fixes are in:
The documentation changes are in:
Everything is in the right place. Let me check for any violations of the "Critical" concepts from CLAUDE.md: GUID preservation:
ID preservation:
Automated review via OpenRouter (Nemotron Super 120B) — workflow source |
Syncs
ako/mxcli:mainintomendixlabs/mxcli:main: 3 commits since #1204, landed in the fork through PRs ako#699–#701.Pluggable widgets
<actionVariables>from the .mpk (Pluggable widgets built from the .mpk lose their<actionVariables>: the action's ValueType is written with an empty ActionVariables list, andmx checkreports CE0463 #1200). Widgets built from their .mpk wrote every action property with an empty ActionVariables list, so mx check reported CE0463 on every page carrying them, even with no action configured (Signature 2.1.0, Calendar 2.6.0 on 11.12.2). The parser now reads them, including nested object-list properties, and the generator writesCustomWidgets$WidgetActionVariableentries. Reconcile rewrites an embedded template's list only when it disagrees with the installed package, so an agreeing template keeps its entries and$IDs.ALTER PAGE … SET ImageUrl = … ON <image>reports "Altered page" and changes nothing: the pluggable setter writesPrimitiveValueinto a TextTemplate-kind property, so DESCRIBE,mx checkand the runtime never see it #1201).SET ImageUrl = … ON img1printed "Altered page" and changed nothing: every value went to PrimitiveValue, while the Image's imageUrl is a TextTemplate. The setter now dispatches on the declared type (TextTemplate, Expression, primitive). Kinds a plain value cannot express, a list value and a null text template are refused instead of reported as success.Lint