fix(check-design-reaches-app): resolve the model dir via find_model_dir; unreadable knob file is a FAULT, never clean - #177
Merged
Conversation
…ts; unreadable knob file is a FAULT, never clean On a two-tree checkout (model under app/) the script read theme/web/custom-variables.scss, theme/web/, themesource/ and deployment/ from the working directory, found nothing, and printed "knobs bound 0 of 0" under a clean verdict (exit 0); the dead-SCSS-bridge pass was silently skipped too ($use-css-variables read 'unknown'). - Model directory from find_model_dir (_common.sh: PROJECT_ROOT, MPR_FILE, app/ probe), with an app/ directory probe when no .mpr is found; design/ and mdlsource/ from the repo root. - Missing knob file, or one declaring no knobs: FAULT, knobs UNMEASURED, exit 2. - Knob file accepted as a third argument as well as CUSTOM_VARS. - Fixture cases 9-10: both layouts (with and without an .mpr), two-tree dead bridge, missing and empty knob file, both overrides. CAPTURE.md records the real two-tree layout. Field run (2026-09-28, Mendix 11.14.0, model under app/, run from the repo root with no arguments): master 0 of 0 knobs, clean; this commit 26 of 30 knobs bound, 157 of 157 tokens, 239 of 269 classes, $use-css-variables: true. CUSTOM_VARS=<missing> -> exit 2. Replayed on current master: #162 had added a one-level app/*.mpr probe to the same lines; this supersedes it with find_model_dir. Re-run on a scratch Mendix 11.13 app, both layouts: master prints a clean exit 0 with the knob file missing; this exits 2 with FAULT UNMEASURED. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw
MendixMau
marked this pull request as ready for review
September 29, 2026 23:49
… all Unreleased lines) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw
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)
The knob pass read
theme/web/custom-variables.scssrelative to the working directory. When it found nothing it printed "knobs bound 0 of 0" underclean, exit 0. #162 added a one-levelapp/*.mprprobe to the same lines, which fixes the common two-tree case. This PR replaces that probe withfind_model_dirfrom_common.sh($PROJECT_ROOT,$MPR_FILE, theapp/probe), and adds anapp/theme/app/deploymentprobe for a tree with no.mpr. It also covers what #162 did not: a missing knob file, or one that declares no knobs, is nowFAULT … UNMEASUREDand exit 2. The knob file can also be passed as a third argument. This replays branchfix/design-reaches-app-two-tree(b773795) on current master, keeping #162's pass 2b (tokens valued) intact. The old branch is left untouched.Field evidence
Original run (from the source branch): a Stage 5 obligation pass on a two-tree Mendix 11.14 app. With no arguments, knobs went from 0 of 0 before to 26 of 30 after, and tokens were 157 of 157.
Re-run on current master, against a scratch Mendix 11.13 app with a real mxbuild-compiled
theme.compiled.css(never a real project model):.mprunderapp/.mprapp/deployment, knobs 0 of 46, exit 1That last row is the defect: a pass that read nothing, reported as clean. When violations exist too, exit 1 wins over the fault, as before. Both results are non-green.
Checklist
tests/wave2/test-design-reaches-app.shcome from the source branch and run in CIfixtures/design-reaches-app/CAPTURE.md(rule 1); field run cited (rule 4)🤖 Generated with Claude Code
https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw
Generated by Claude Code