Repository navigation
new(mdl-scan): flag scannable STOP-row patterns before the apply, warn-only until a field run (#349) - #355
Closed
MendixMau wants to merge 2 commits into
Closed
new(mdl-scan): flag scannable STOP-row patterns before the apply, warn-only until a field run (#349)#355MendixMau wants to merge 2 commits into
MendixMau wants to merge 2 commits into
Conversation
) bin/mdl-scan.sh greps an MDL script for the STOP rows of learned-mdl-preflight.md that a text pattern identifies and that have a captured failure in bug-logs/: rows 1 (BUG-18), 12 (BUG-142), 16 (CE0161 CurrentUser path) and 26 (dg2 quoted association path). Rules are data in bin/lib/mdl-scan-rules.tsv. exec.sh runs it first, before the lock, the commit, mxcli check and the snapshot; a hit refuses the exec. The only override is MXTK_SCAN_OVERRIDE="<reason>", printed and logged (#348 will harden it). Fixtures: tests/wave2/test-mdl-scan.sh (43 checks, keys and CE text asserted verbatim in the ledger), tests/wave2/bench-mdl-scan.sh (4/9 captured failures caught, 0/17 clean files flagged). Field evidence: captured bug-log output only; no live mxcli/mxbuild run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw
This was referenced Oct 14, 2026
…fixed
- STOP-12: a ContentParams list now ends at its matching ] by depth (in the
string-blanked line), not at the last ] on the line, so
`ContentParams: [{1} = Name], Visible: [IsActive]` (one line or two) is clean.
- STOP-1: a body-less customContent column is forgotten at the next } or at
the ) that closes its header's scope; a LAST such column no longer marks a
later container as inside it. customcontent rules match the line with
string literals blanked.
- Severity column (warn|block) in mdl-scan-rules.tsv. Every rule ships warn
(scan exit 3): exec.sh prints the hits, notes them in BUILD-LOG, goes on.
The block path (exit 1, refuse, MXTK_SCAN_OVERRIDE) is kept and tested
through a test-only rules file. Flip criterion in the rules-file header.
- Clean corpus gains the review's forms; bench reports 0/19 false positives.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw
5 of 6 tasks
MendixMau
pushed a commit
that referenced
this pull request
Oct 14, 2026
…e apply, warn-only until a field run (#349) Review: independent review MERGE-AFTER-FIX — two false hits on valid MDL (STOP-12 last-] cut; STOP-1 pending not cleared), STOP-1 evidence predates v0.24, no field run → bracket-depth and pending fixes, severity column, all four rules ship warn-only (blocking path tested via a test-only rules file); confirmation MERGE at 870c5b5: six new valid-MDL cases clean, warn-only cannot stop an exec (exit 3 guarded from set -e), BUILD-LOG readers unaffected. Bench: 4/9 captured failures caught, 0/19 false positives, ~10–30 ms per 1,000 lines. A rule flips to block only after a cited field run. Closes #349. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw
This was referenced Oct 14, 2026
MendixMau
added a commit
that referenced
this pull request
Oct 15, 2026
…journey controls, fixes) (#385) Lands #340 #363 #362 #355 #370 #368 #364 #365 #366 #372 #367 #371 #376 #369 #373 #377 #378 #380. Review: each constituent PR independently reviewed by a fresh agent that did not write it; merged into integration/2026-10-15 only on a MERGE verdict with green CI (per-PR Review lines in the integration merge commits). After-fix rounds: #373 (env-var cap, rename/skip-loops freshness), #377 (inline URI fallback), #378 (full-pack double count, slice content). Stub diet (#369/#378/#380) behaviour A/B, 5 reps x 2 drafting tasks + 5 retrieval probes x 3 reps: trimmed context no worse than master on every scored metric (planted STOP refused 20/20, parse failures page 2/5 vs 3/5, probes 15/15); mdl Stage 5 56,236 -> 30,647 words, baseline 75,028 -> 73,233. Full suites on c9bc073: run-tests 33/0, wave2 111 fixtures 0 failing. Field evidence: none yet for the instruments (#355 warn-only, #373/#377 read-only). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw
Owner
Author
|
Landed on master in #385 (squash Generated by Claude Code |
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.
Closes #349.
Review (independent review: MERGE-AFTER-FIX, addressed in 870c5b5)
This ships warn-only. All four rules are severity
warn.exec.shprints each hit as a warning, addsscan warn: STOP-…to the BUILD-LOG row, and goes on.What is still owed before any rule blocks: one field run of
exec.shon a real project, in which the rule caught a real failure and flagged nothing valid. That run is cited on the commit that flips the rule'sseveritytoblock. The criterion lives in the header ofbin/lib/mdl-scan-rules.tsv.block: STOP-12, STOP-16 and STOP-26.warn. Its StorageLoadException evidence is from v0.12–v0.13; on v0.24.0mx checkis 0 errors and Studio Pro load is untested.Fixes:
], found by bracket depth in the string-blanked line, andcodeis cut at that offset. Before, it ended at the last]on the line.dynamictext t (Content:'{1}', ContentParams: [{1} = Name], Visible: [IsActive])is now clean.], Visible: [...]is now clean.L) and are in the clean corpus.}, or at the)that closes its header's scope. When such a column was the last column, a later nestedcontainer (Visible: [...])was flagged. It is now a fixture case and is in the clean corpus. I confirmed that the previous scanner flags both review forms.mdl-scan-rules.tsvgains aseveritycolumn (warn|block).blockhit, 3 =warnhits only, 0 clean, 2 usage.[warn]or[block].FORCE_EXEC/SKIP_CHECKdo not skip it, andMXTK_SCAN_OVERRIDE="<reason>"is the override. The fixture exercises it through a test-only rules file with STOP-26 set toblock.MXTK_SCAN_OVERRIDEnow matters only forblockrules. A fixture check (W) asserts that every shipped rule iswarn.customcontentnow matches the string-blanked line. Fixture case:'visible: [never]'inside a column body is clean.Direct lane
What changed and why:
skills/learned-mdl-preflight.md's STOP table is prose, and an agent can skip it.bin/mdl-scan.sh <script.mdl> [-p <mpr>]turns each STOP row that a text pattern identifies, and that has a captured failure, into one data row inbin/lib/mdl-scan-rules.tsv.STOP-<n> <file>:<line> <message> → <fix> [warn|block].project-bin/exec.shruns the scan first, before the lock,--commit-first,mxcli checkand the snapshot.blockoverride isMXTK_SCAN_OVERRIDE="<reason>", meant for the user. A bare1/true/yesis refused, and the reason is printed and logged. Lock gate baselines against the agent: re-baselining is a human call #348 will harden it.learned-mdl-preflight.mdmarks the enforced rows with 🔎 and gains a one-line legend.Classification of every STOP row (denominator: 29 numbered rows, 14 live, 15 retired)
visible:/editable:inside a datagrid customContent columnwarn, stays warn)Editable: '<expr>'in CREATE PAGEAutoChangedByContentParamswarn, block candidate)[%CurrentUser/…%]warn, block candidate)create or modifyon a name that may existmxcli diff+ judgementDesignPropertiesthe theme does not declareAttribute:warn, block candidate)returnin a dense flowNo shipped rule uses
-p. The flag is accepted and validated.Proposed, unproven (not in the scanner): STOP-1b, 4, 18 and 24, plus the non-STOP gotchas the bench misses: quoted
$Var/"Attr",hasRole(), andcurrentDeviceType()in a nanoflow.Before/after (every number computed by
tests/wave2/bench-mdl-scan.sh, re-run after the review)blockrule / warned by awarnrulewarnhit saves the apply only when the agent fixes the script on the warning; ablockhit always does.iterative-build-loop.md→ "Gate cost" (field run 2026-09-29).mxcli checkand fail at mxbuild or Studio Pro open. Each file's CE text is asserted verbatim inbug-logs/mxcli-bugs.md.examples/stylegallery(0 errors inmx check), the corrected forms, and the review's cases.Field evidence: captured bug-log outputs only, no live run. That is why everything ships warn-only. For each rule, the fixture holds the bad MDL captured in its bug entry (
-- key:) and the CE/mxbuild output that entry cites (-- evidence:), both asserted verbatim in the ledger.No client data anywhere in the diff (leak guard clean; blocklist grep of added lines clean)
Size cap: 8 non-fixture files. Over 400 lines once the test and bench scripts count. Fixtures are excluded.
Test tier: T1, fixtures only. Against this branch's
exec.sh:test-mdl-scan.sh52/52test-exec-change-class21/21test-exec-lock-watch84/84test-bug07-0843/43test-exec-approval43/43test-shared-lock-takeover6/6Positive control: the first revision of
test-mdl-scan.shfailed 8 exec checks against master'sexec.sh.Golden input captured from the bug log (verbatim-asserted). Bash 3.2 + POSIX awk;
check-portabilityclean. Not run on macOS or Git Bash.CHANGELOG.mdline, creditedn/a new skill or bug entries
Checks:
render-routing --checkin sync,check-scripts111/111,check-portabilityclean,check-no-client-dataclean,check-no-private-citationsclean,check-pr-disciplineclean.🤖 Generated with Claude Code
https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw