[bug] A bundled lint-rule refresh shows up as a lint rise on the next exec #264
Description
What broke:
At session start mxcli rewrote .claude/lint-rules (the conv010 rule, 205 lines changed). CONV010 rose 26 -> 169 on microflows no script had touched. The first exec after the refresh (a pages-only script) showed the rise, as if that script had caused it.
Command / script run (exact invocation):
Session start (mxcli rule refresh), then bin/exec.sh <pages-only script>.mdl.
Expected vs. actual:
Expected: the lint delta reflects only the model change.
Actual: CONV010 +143 attributed to an unrelated exec.
Field evidence:
A consuming project (Mendix 11.14.0, macOS, toolkit 9dd9be4, mxcli v0.25.0), 2026-10-11. The new baseline was accepted by hand with a reason.
Proposed fix (hypothesis):
When the bundled rules are rewritten, re-take the lint baseline at that moment and log it ("lint rules refreshed: CONV010 26 -> 169, no model change"), so the next exec's delta uses the new rules. Or have exec.sh's lint delta flag "rules changed since baseline".
Activity
MendixMau commentedon Oct 12, 2026
Same class, seen in another toolkit-built app (mxcli v0.25.0, toolkit 69b223c). This time it persisted for days, because nothing ran sync afterwards.
What happened:
sync-project.shcommit,.claude/lint-rules/was re-seeded. Three toolkit rules reverted to stock and lost themxtk-lint-ruleheader: conv010, data_change_microflows and entity_business_key.lint-rules/STOCK-HASHES.txt(de7463c1…, 4f8194a1…, d66528c9…).What I checked:
sync-project.shwould repair it. I ranmxtk_install_lint_rulesfrom master on a copy of that project's.claude/lint-rulesand receipt. Output:REVERTED TO STOCK … Restoring itfor conv010 and data_change,headeredfor entity_business_key, and all three md5s equal the toolkit's afterwards. So the installer is fine. The gap is that nothing notices a re-seed between syncs.Concrete proposal (extends yours): lint-gate.sh already runs on every exec. Before linting, it compares each rule listed in
.claude/.mxtk-lint-receiptwith its md5. If a file no longer matches its receipt and the header line is gone, printlint rules reverted to stock (mxcli init?): <files> — run sync-project.sh; this run's delta is not attributableand exit with the blind code, not a rise. The receipt already survivesmxcli init(verified in the installer header). That makes it the cheapest tripwire available.fix(lint-rules): the remedy lint-gate prints always clears it; delibe…
Revert FIRST-SEEN (5432345): unsafe as built, redesign in a separate PR
fix(lint-rules): re-seed check scoped to stock-seeded rules; opt-out …
fix(lint-rules): one opt-out syntax, override never baselines, capped…
Merge #308: lint gate reads the install receipt — reverted stock rule…
MendixMau commentedon Oct 14, 2026
Fixed by #308, which landed on master in the integration squash #329 (commit 31e90ae) after independent review. Closing; reopen if it still reproduces on master.
Generated by Claude Code