fix(doctor.sh): gate self-test copies the whole model directory, not just .mpr + mprcontents (#127) - #142
Draft
MendixMau wants to merge 1 commit into
Draft
fix(doctor.sh): gate self-test copies the whole model directory, not just .mpr + mprcontents (#127)#142MendixMau wants to merge 1 commit into
MendixMau wants to merge 1 commit into
Conversation
… model directory The gate self-test's scratch copy previously carried only .mpr + mprcontents/. A --target=deploy build (the same target the real gate runs, in place, against the project as it sits on disk) also resolves widget/theme/design-property references out of theme/, resources/, widgets/ and javasource/ sitting beside the .mpr — a thin copy reported hundreds to 1000+ false errors as a "dirty baseline" while the real gate passed with 0 errors on the identical model (two field reports: an Atlas project on Mendix 11.14.0, and a project with a custom theme on Mendix 11.12.4). Now copies the whole directory holding the .mpr (dirname "$MPR" — the model's own root on a single-tree checkout, or app/ on a two-tree one) minus .git/, deployment/, node_modules/ and .mpr-snapshots/, none of which mxbuild reads, and prints the copied size (du -sh) so the cost is visible. The existing real-basename fix (copying every sibling, including the .mpr, as itself) is unchanged. mxbuild --target=check was ruled out: grepped for it across bin/, project-bin/, skills/ and bug-logs/ and found no evidence it exists or is used anywhere in this toolkit — --target=deploy is the only target ever invoked. A sibling .mpr dropped into the project's own directory was also ruled out: MPR v2 stores an internal record of the model's basename in mprcontents/, and a second .mpr there would collide with the real model's own mprcontents/. Verified against two constructed fixtures (single-tree and .mpr-under-app/) with a stub mxbuild that logs the scratch directory's contents on every invocation: both layouts copy in mprcontents/, theme/, resources/, widgets/, javasource/ and the .mpr itself, exclude all four named directories (including when nested one level under app/ on the two-tree layout), report the copied size, reach a "pass" verdict, and leave no scratch directory behind afterward. Not run against a real mxbuild in this environment. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw
7 tasks
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.
What changed and why (one paragraph)
Addresses issue #127 and a second field report of the same shape (a macOS project with a custom theme on Mendix 11.12.4):
bin/doctor.sh --gate-selftestcopied only the.mprandmprcontents/into its scratch directory, so the--target=deploybuild it runs there could not resolve widgets, theme and design properties that live intheme/,resources/,widgets/andjavasource/beside the.mpr. The self-test then reported hundreds to over a thousandCould not find widgeterrors as a dirty baseline while the real gate, which builds in place, passed with 0 on the same model. The scratch copy is now the whole directory holding the.mpr(project root on a single-tree checkout,app/on two-tree) minus.git/,deployment/,node_modules/and.mpr-snapshots/, with the copied size printed. The earlier real-basename fix from #128 is kept (every sibling is copied as itself).mxbuild --target=checkwas ruled out (nothing in the toolkit has ever used it), a sibling.mprin the project dir was ruled out (collides with the project's ownmprcontents/), and symlinks were ruled out (Git Bash copies through them).Field evidence
.mprunderapp/) with all four excluded dirs nested at both levels plusmprcontents/,theme/,resources/,widgets/,javasource/, and a stub mxbuild that logs the scratch contents per invocation.bin/doctor.sh --quick --gate-selftest --no-dockerwith real java andMXBUILD_PATH=the stub: all five resource dirs copied, all four exclusions honoured in both layouts, size note printed, verdictpass (baseline=0 known-bad=1), no leftover scratch dir after either run.tests/wave2/test-doctor-gate-selftest.sh(10 cases) and the doctor case intests/run-tests.shread in full: none assert the old copy wording; not executed.Checklist
🤖 Generated with Claude Code
https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw
Generated by Claude Code