Skip to content

fix: binding-context cluster — pluggable attribute scope, control-bar SHOW PAGE selection - #1525

Merged
ako merged 4 commits into
mainfrom
claude/nice-hawking-j6wtss
Oct 21, 2026
Merged

ako merged 4 commits into
mainfrom
claude/nice-hawking-j6wtss

Conversation

@ako

@ako ako commented Oct 21, 2026

Copy link
Copy Markdown
Owner

Fixes the binding-context cluster from the triage board (#1357). There are two independent fixes, one commit each, so they can be reviewed separately.

1. Pluggable attribute property bound outside the data view entity (#1502, mendixlabs#1591), 10e9d6ff

Symptom: a Custom chart eventDataAttribute: EventData inside a data view over $Entry (ChartEntry has no EventData) passed check and exec. Only mx check caught it: [CE1613] "The selected attribute 'MyFirstModule.ChartEntry.EventData' no longer exists." When the property was bound qualified, to MyFirstModule.ChartContext.EventData, describe printed it bare, and re-running the description rebound it to ChartEntry.

  • misboundAttributeError refused a bare name only when another in-scope entity declared it. A name no entity had was let through as "a typo other checks own", and no other check caught it. Now it is refused by check and exec alike, since they call the same function.
  • The generic pluggable describer (extractExplicitProperties) keeps the qualified name for an unlinked attribute property whose entity is not the enclosing container's.
  • dataSourceEntityContext returned a parameter source's name (Entry) as the context entity, the same mistake already fixed for flow and association sources. It now reads the entity stored beside the parameter name (EntityRef.Entity).

Evidence (Mendix 11.12.5): the old binary writes the binding and mx check reports CE1613. The new binary refuses it before writing. The describe → exec round trip reports Unchanged page. With the fix reverted, all four new tests fail with the reported symptoms.

Not covered: in a fresh app, the qualified binding gets CE7247 from mx check. Studio Pro stores a page-parameter binding with a Forms$PageVariable, and MDL still cannot express that for a pluggable attribute property. The ALTER SET form the reporter listed as nice-to-have is also not done.

2. Control-bar SHOW PAGE passing the grid's selection (#1224, mendixlabs#122), 36f59f70

Symptom: no form built. $currentObject is MDL-BUTTON01 (CE1571, a control bar is not row-scoped). $dgOrders, which MDL-BUTTON01's own hint suggested, was refused as MDL-PAGEARG01. No argument at all is CE1571.

  • $<grid> in that grid's control bar is now its selection. It is written as an explicit Forms$PageParameterMapping {Argument "", Variable: Forms$PageVariable{Widget: "<grid>"}}. The corpus has no Studio Pro reference for this shape (12 mappings, none naming a widget), so three mxbuild 11.12.5 builds of the same script decided it:
    • Widget slot → 0 errors
    • Argument "$dgOrders" → CE0115
    • no mapping → CE1571
  • Runtime (run --local, Playwright): the button stays disabled until a row is selected. Selecting the second row and clicking View opens the detail page with that row, with 0 console errors.
  • Check and exec share the rule (pageArgContext.selectionOf). The engine builds a widgets slot's children directly, never through the controlbar node, so the context is applied in applyChildSlots. A builder-only test passed while exec still refused; the engine-path test (TestApplyChildSlots_ControlBarHoldsTheGridSelection) covers that.
  • DESCRIBE reads the Widget slot back as $dgOrders, and the page round-trips Unchanged. MDL-BUTTON01's hint and MDL-PAGEARG01's refusal now agree, and the user manual has one new sentence.

Not changed: #1309 (mendixlabs#1379)

This is already fixed on main. The reporter's script passes check, mx check shows 0 errors, the column keeps its text filter, the binding is stored as a two-step IndirectEntityRef, and describe round-trips unchanged. A bug-test MDL and a finding already exist.

Validation

  • make build && make test && make lint pass, as do make check-mdl and make check-findings
  • Bug tests: mdl-examples/bug-tests/1591-pluggable-attribute-outside-data-view-entity.mdl and 122-controlbar-show-page-grid-selection.mdl. Both build on 11.12.5 at 0 errors.
  • One finding file per fix under .claude/skills/fix-issue/findings/mdl-executor/

Generated by Claude Code

…ssing name, describe the qualified one

A Custom chart's `eventDataAttribute: EventData` inside a data view over a
page parameter whose entity has no EventData passed check and exec and only
mx check reported CE1613. misboundAttributeError refused a bare name only
when another entity in scope had it; a name no entity has is now refused too,
by check and exec alike.

Bound to another entity (MyFirstModule.ChartContext.EventData), the property
was stored qualified but described bare, so re-running the description rebound
it to the data view's entity. The generic pluggable describer now keeps the
qualified name for an unlinked attribute of another entity, and a data view
over a page or snippet parameter puts the parameter's stored entity in scope
rather than its name.

Mirror of mendixlabs#1591 (#1502).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SiV1dB1yMWeXnjFhWFDSvg
A Data grid 2 control-bar button opening a page with the selected row had
no spelling that built: `$currentObject` is MDL-BUTTON01 (CE1571, the bar is
not row-scoped), `$dgOrders` — MDL-BUTTON01's own hint — was refused as
MDL-PAGEARG01, and no argument is CE1571.

`$<grid>` in that grid's control bar is now its selection, written as an
explicit Forms$PageParameterMapping whose PageVariable names the grid in its
Widget slot. Measured on mxbuild 11.12.5: that shape builds at 0 errors,
Argument "$grid" is CE0115 and no mapping CE1571; in the running app the
button is disabled until a row is selected and opens the selected row.

check and exec share the rule (pageArgContext.selectionOf). The engine builds
a widgets slot's children directly, so the control bar's context is applied
in applyChildSlots. DESCRIBE reads the Widget slot back as `$dgOrders`, and
MDL-BUTTON01's hint now names the show page form too.

Mirror of mendixlabs#122 (#1224).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SiV1dB1yMWeXnjFhWFDSvg

ako commented Oct 21, 2026

Copy link
Copy Markdown
Owner Author

build-and-test is red at the govulncheck step, and the cause is not this PR. It's a new standard-library advisory, GO-2026-6809 (crypto/x509, found in go1.27.2, fixed in go1.27.3). The trace it reports is internal/marketplace/client.go:316, which this diff does not touch. main is red on the same step since 7baaa5e.

The fix is #1527, which moves go.mod's toolchain and every setup-go to 1.27.3. I tried to port it into this PR, but this session isn't allowed to edit the CI workflow files. Once #1527 merges, I'll merge main into this branch to re-run CI, and merge this PR once that comes back green. Every step before govulncheck in this job passed: findings, wiki, skill MDL, conformance, migration reference, lint-go.


Generated by Claude Code

@ako
ako merged commit 039473b into main Oct 21, 2026
33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants