Skip to content

Sync ako/mxcli: Windows junction fallback, drop reflection-data references - #1360

Merged
ako merged 10 commits into
mendixlabs:mainfrom
ako:main
Oct 9, 2026
Merged

ako merged 10 commits into
mendixlabs:mainfrom
ako:main

Conversation

@ako

@ako ako commented Oct 9, 2026

Copy link
Copy Markdown
Collaborator

Syncs ako/mxcli:main into mendixlabs/mxcli:main: 2 commits since #1359, landed in the fork through ako#1075.

Windows

Docs

  • References to the closed-source reflection-data library are removed. Docs pointed contributors at a reference/ path nobody can populate. Living docs and skills now point at the vendored metamodel types in modelsdk/gen and at Studio Pro-authored documents, which win on disagreement.
    • cmd/codegen -input no longer defaults to the library's path and is required. The CLAUDE.md codegen example used a nonexistent -reflection-dir flag.
    • At the maintainer's request, ADR-0008, one finding, the wiki sync log and gittree.txt are reworded too (wording only)

stagknee and others added 4 commits October 9, 2026 12:18
…dows refuses a symlink (closes mendixlabs#1286)

An ordinary Windows user cannot create a symlink without
SeCreateSymbolicLinkPrivilege, so the first run --local / test --local
for a new Mendix version failed linking the runtime into the mxbuild
cache. linkDir tries os.Symlink and, on ERROR_PRIVILEGE_NOT_HELD, falls
back to a directory junction (cmd /c mklink /J); both directory-link
sites (ensureMxBuildRuntimeSibling, ensurePADFiles) use it. os.RemoveAll
of the cache dir removes the junction, not the runtime behind it; a test
pins that.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…1074)

The reflection data comes from an internal Mendix library that is not
publicly distributed, so docs pointing contributors at its directory
under reference/ sent them to a path nobody can populate. Living docs
and skills now point at the vendored metamodel types in modelsdk/gen
(types.go for storage names, refs.go for reference kinds) and at
Studio Pro-authored documents, which win on disagreement.

cmd/codegen's -input no longer defaults to the library's path and is
now required; CLAUDE.md's codegen example used a nonexistent
-reflection-dir flag and now uses -input.

At the maintainer's request, ADR-0008, the 2026-04-21 finding, the wiki
sync log and gittree.txt are reworded too (wording only).

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

`retrieve $u from $task/System.owner;` passed check and exec, then mxbuild
failed with [CE0136] "Retrieve object must specify the 'Entity' property."
(mendixlabs#1358). owner and changedBy are entity flags, not modelled
associations: mxbuild resolves the name but derives no entity from it, with
or without `owner: AutoOwner` (measured on 11.12.2; System.changedBy alike).

check and exec now refuse it and name the form that builds clean:
`retrieve $u from System.User where [id = $task/System.owner] first;`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P3PcLf2tEE4sTP5eamiVpt
fix: link the runtime into the mxbuild cache with a junction when Windows refuses a symlink (mendixlabs#1286)
@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown

AI Code Review

Review Summary

This PR introduces two main changes: Windows symlink fallback for local runtime linking and removal of closed-source reflection-data references. Both changes are well-implemented and tested.

What Looks Good

  • Windows symlink fallback: Properly handles ERROR_PRIVILEGE_NOT_HELD by falling back to directory junctions (mklink /J), which requires no special privileges. The implementation is secure (uses exec.Command with separate args to avoid injection) and well-tested.
  • Test coverage: New linkdir_test.go comprehensively tests:
    • Link readability through symlink/junction
    • os.Stat follows links correctly
    • RemoveAll removes links without damaging targets
    • Windows fallback behavior when symlink privilege is missing
  • Documentation cleanup: Thoroughly removes all references to the obsolete reference/mendixmodellib/reflection-data/ path and replaces them with correct references to vendored metamodel types (modelsdk/gen/). Updates are consistent across:
    • CLAUDE.md, CONTRIBUTING.md
    • Documentation files (docs-site, docs-wiki, proposals)
    • Code generator flags (-input now required)
    • Git metadata (.gitignore, gittree.txt)
  • Atomic commits: Each change (Windows fallback, doc updates) is in separate commits as part of the sync.

Minor Issues

  • Scope overlap: The PR combines two unrelated changes (Windows fallback + doc cleanup). While the doc updates were maintainer-requested and trivial, ideal practice would split these into separate PRs per the checklist's "single feature or concern" guideline. However, given the maintainer's explicit request for the doc updates and their trivial nature, this is acceptable.

Recommendation

Approve. The PR solves a real Windows user issue (#1286) with robust fallback logic, eliminates dangerous dependencies on closed-source code, and includes comprehensive test coverage. All changes align with project architecture and documentation standards. No blocking issues found.

Note: Generated ANTLR parser files (mdl/grammar/parser/) were correctly noted as noise and skipped during review.


Automated review via OpenRouter (Nemotron Super 120B) — workflow source

claude and others added 4 commits October 9, 2026 12:09
…meout (closes mendixlabs#1329)

After the project file changed, show references / search / show callers /
show impact rebuilt the stale catalog at its cached source mode inside the
statement's wall-clock guard. On a large app the default 5m fired mid-build
("statement timed out after 5m0s"); the unfinished build was never saved, so
every later call repeated it. REFRESH CATALOG was exempt from the guard
(#651) by statement type; the same build reached implicitly was not.

ensureCatalog now marks its rebuild as untimed work, and Execute's timer
subtracts that time from the statement's clock (chained through nested
EXECUTE SCRIPT). An explicit MXCLI_EXEC_TIMEOUT still caps it, as it caps
REFRESH CATALOG, and a timeout that cuts a rebuild off now says so and
points at REFRESH CATALOG FULL SOURCE.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WzwbPBB3HkMhu7c9bzTGqy
…#1307)

`Tooltip:` on an actionbutton/linkbutton passed check and exec but was
never stored: buildButtonV3 did not read it, so the codec always wrote an
empty Texts$Text. describe had no reader for it, and
`alter page … set (Tooltip: …)` fell through to the pluggable setter and
was refused with "property \"Tooltip\" is not a property of this built-in
widget".

- builder: write the tooltip as a Texts$Text in the authoring language
- describe: read the button's Tooltip and emit `Tooltip: '…'`
- alter: a `tooltip` case that sets the stored Texts$Text (creating one
  when null) and refuses widgets without a Tooltip slot

Verified on a fresh 11.12.5 app: exec -> describe shows the tooltip,
alter sets it on a button that had none, mx check reports 0 errors.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PCo8XKGihSdss7DQsL6Fdo
Reject retrieve by association over System.owner/changedBy (CE0136)
@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown

AI Code Review

Review Summary

This PR contains two distinct changes: a Windows symlink privilege fix and documentation updates removing reflection-data references. Both changes are well-implemented with appropriate tests and documentation updates.

Critical Issues

None found.

Moderate Issues

None found.

Minor Issues

None found.

What Looks Good

  • Windows symlink fix: Properly implements junction fallback for Windows users lacking symlink privileges, with comprehensive tests covering normal operation, privilege failure, and cleanup behavior. The fix is isolated to the docker package with appropriate build tags.
  • Microflow validation: Adds MDL-RETRIEVE02 rule to prevent invalid retrieves over System.owner/System.changedBy, with corresponding tests, example MDL files, and documentation updates.
  • Documentation cleanup: Thoroughly removes all references to the closed-source reflection-data library and points users to the correct sources (vendored metamodel types in modelsdk/gen/ and Studio Pro-authored documents). Updates are consistent across CLAUDE.md, CONTRIBUTING.md, skills, and various documentation files.
  • Test coverage: Adds tests for both the symlink fallback (linkdir_test.go) and the new validation rule (validate_microflow_retrieve_system_assoc_test.go), plus example MDL files for the bug scenario.
  • Atomicity: The PR consists of two logical commits (Windows fix and documentation updates) that each address a single concern.

Recommendation

Approve the PR. The changes are correct, well-tested, and improve both Windows usability and documentation accuracy without introducing any regressions or violations of project guidelines.


Automated review via OpenRouter (Nemotron Super 120B) — workflow source

ako added 2 commits October 9, 2026 14:59
Fix: Store and describe action button tooltips (issue mendixlabs#1307)
Exclude implicit catalog rebuilds from statement timeout
@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown

AI Code Review

Moderate Issues

  • Scope & atomicity: The PR combines multiple unrelated changes: Windows junction fallback (feature/bugfix), documentation cleanup (removing reflection-data references), and three distinct bug fixes (action button tooltip, implicit catalog rebuild timeout, retrieve over System.owner/System.changedBy association). The PR description only mentions the first two, omitting the bug fixes. Per the checklist, independent features/bugfixes should be in separate PRs. The description needs "and" between unrelated items and is incomplete.

What Looks Good

  • Windows junction fallback: Well-implemented with proper fallback to junctions on Windows when symlink privileges are missing. Tests verify correct behavior (including cleanup via RemoveAll not damaging the target) and handle edge cases like paths with spaces.
  • Documentation updates: Accurately removes references to the closed-source reflection-data library and redirects users to vendored metamodel types (modelsdk/gen) and Studio Pro-authored documents. Updates to cmd/codegen/main.go correctly make -input required (no misleading default).
  • Bug fixes:

Automated review via OpenRouter (Nemotron Super 120B) — workflow source

@ako
ako merged commit bb4f581 into mendixlabs:main Oct 9, 2026
15 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.

3 participants