You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 2ba8158
Browse filesBrowse the repository at this point in the historyBrowse files
doctor + sync: say when the speed fixes never reached a project (#597)
Older locally edited bin/exec.sh, _common.sh or lint-gate.sh without the speed-fix marker gives a Machine health warning; the Recommended fix leads with a scoped sync-project.sh --only-bin X --upgrade-bin X command (exec.sh with its _common.sh, each backed up). sync-project.sh names the speed fixes on a hand-edited exec.sh/_common.sh. speed-setup.md puts this fix first.
Review: MERGE-AFTER-FIX — printed upgrade now scoped with --only-bin (#390); re-reviewed MERGE
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013jQvaonym9V1wKKfAEPmRr
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,7 @@ Sections dated before 2026-09-19 predate the cycle and stay as they are. Named m
19
19
20
20
## Unreleased
21
21
22
+
- fix(doctor, sync-project, speed-setup): **doctor says when the speed fixes never reached a project**: `bin/exec.sh`, `bin/_common.sh` or `bin/lint-gate.sh` without the 2026-10-29 speed code (marker per file) gives a Machine health warning "speed fixes not active", and the Recommended fix leads with the exact `sync-project.sh --upgrade-bin ...` command (exec.sh always with its `_common.sh`; each copy backed up) before any other advice, because every other number measures the old scripts; `sync-project.sh` names the speed fixes on a hand-edited exec.sh / _common.sh that has the exit-code fix but not the speed work; `skills/speed-setup.md` has Claude show each local edit in one line and ask before replacing. Field: an English colleague's ExpenseTracker analysis after the toolkit update still showed a full mxbuild on every change (45.5 min, 57% of all exec time) with 15 drifted scripts in bin/; reproduced here with the real pre-#587 exec.sh / _common.sh / lint-gate.sh — doctor names all three, sync names exec.sh and refreshes the two unedited ones — Maurits (mauritscgvisser)
22
23
- fix(doctor, speed-setup): **doctor no longer says "None needed" next to a verdict of "5x slower"**: when process starts are fast but one bench step is 5x+ the reference and 2 s+ slower, the Recommended fix names that step (slow git status: `git config core.untrackedCache true` / `core.fsmonitor true`, no admin rights); a project inside a OneDrive / Dropbox / Google Drive / iCloud folder gets a Machine health warning and "move the project to a local folder" as the fix; low-memory advice now offers "restart the computer" before `--cleanup`; the bench's git step runs one untimed warm-up so a stale index after a copy or clone no longer reads as slow (field, ab-581/gk: 18.3 s cold, 31 ms warm); `skills/speed-setup.md` tells Claude never to say deno, mxbuild or helper process to a user. Field run: ab-581/gk on Linux, bench 14.7 s vs 10.9 s, "None needed" correctly; a project under a OneDrive path, move advice shown — Maurits (mauritscgvisser)
23
24
- fix(gate-check, gate-cache): **the closeout verdict cache also keys on file CONTENT, so an overwrite that keeps an old mtime (`cp -p`, `rsync -t`, `tar x`, `unzip`, `touch -d`) can no longer replay a stale verdict**: a signed triage.md copied over a FAIL one still printed the cached Stage 0 FAIL (PR #589 review); the cache now stores one `find | sort | xargs cksum | cksum` signature of the project files (skipping .git, node_modules, .mxtk, mprcontents, deployment, *.mpr, files over 1 MB) and any difference, or a signature that cannot be computed, re-evaluates; new `tests/wave2/test-gate-cache.sh` (hit, edit/delete/waiver miss, cp -p miss, TTL 0, 'not evaluated' line); `MXTK_GATE_CACHE_TRACE=1` prints `gate-cache: hit|miss` on --closeout. Field run: ab-581/base copy (197 MB, 633 hashed files) - signature 28 ms, cache hit 1464 -> 1498 ms vs 2567-2786 ms full evaluation - PR #589 reviewer, OlafFede (#583) — OlafFede (#583)
24
25
- perf(gate-check, closeout): **a Stage close starts about 70% fewer processes (Stage 3 on a small project: `--closeout` 820 -> 127 starts, `gate-check <dir> 3` 560 -> 275, no-stage run 626 -> 338; verdict lines unchanged)**: (1) `--closeout` replays the evaluation of the stage query that just ran (variables snapshotted in `<project>/.mxtk/gate-cache`, valid only while nothing under the project or the toolkit is newer than that run and the key matches; any doubt re-evaluates; `MXTK_GATE_CACHE_TTL_MIN=0` turns it off); (2) a stage query no longer evaluates obligation/artifact rows owed from later stages and says how many it skipped (the summary line is labelled the same way); (3) the register is parsed once per run instead of one awk per lookup; (4) the toolkit `git fetch` runs at most once per 15 min (`MXTK_FETCH_TTL_MIN`, `MXTK_NO_FETCH=1` unchanged); plus pure-bash trimming in the close-out block and the obligation reverse check. Reported by OlafFede (#583). — OlafFede (#583)
Copy file name to clipboardExpand all lines: bin/sync-project.sh
+8Lines changed: 8 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1145,6 +1145,10 @@ known_fix_note() {
1145
1145
page-scope.sh)
1146
1146
echo"bin/page-scope.sh predates the HEADER_WORDS fix (F-042, 2026-08-28): SHOW PAGES header columns Excluded/Folder/Params were parsed as page rows, inflating the page denominator (measured: 6 real pages counted as 13), so every consumer of page-scope.json graded against furniture. One-line fix — recommended upgrade." ;;
1147
1147
_common.sh)
1148
+
if grep -q '_mxtk_has_model'"$PROJECT_DIR/bin/_common.sh"2>/dev/null \
echo"bin/_common.sh predates the SPEED fixes (toolkit, 2026-10-29, Windows field reports): it has no quick 'mx check' gate, so every model change runs a full mxbuild (80-130 s per change on a Windows laptop). Upgrade BOTH: --upgrade-bin _common.sh --upgrade-bin exec.sh.";return
echo"bin/_common.sh predates the MULTI-APP ROOT fix (#420, toolkit, 2026-10-20): in a multi-app folder (apps/<X>/X.mpr) its root search climbed to the first ancestor holding any .mpr, so ledgers, stamps and lint landed in another folder. A hand-edited copy also holds back every older script that depends on it. Take just this file (your copy is backed up): $0$PROJECT_DIR --only-bin _common.sh --upgrade-bin _common.sh"
1150
1154
fi
@@ -1157,6 +1161,10 @@ known_fix_note() {
1157
1161
fi
1158
1162
echo"bin/_common.sh predates the WINDOWS MXBUILD GATE fix (toolkit, 2026-08-25). This is where find_sp_app/find_mxbuild, JAVA_HOME resolution and mxtk_platform actually live — exec.sh only calls them. So upgrading exec.sh ALONE does not deliver the fix, and grepping exec.sh for mxtk_platform reports 0 even on a fully patched project: grep _common.sh instead. Without this file the mxbuild gate is skipped on every Windows exec and nothing checks your builds. Upgrade BOTH: --upgrade-bin _common.sh --upgrade-bin exec.sh." ;;
1159
1163
exec.sh)
1164
+
if grep -q 'fail_rc'"$PROJECT_DIR/bin/exec.sh"2>/dev/null \
echo"bin/exec.sh predates the SPEED fixes (toolkit, 2026-10-29, Windows field reports): every model change runs a full mxbuild instead of the quick 'mx check' (the full build now runs before push and at module close), and each exec starts about 60% more processes, which costs most on Windows. Upgrade BOTH: --upgrade-bin _common.sh --upgrade-bin exec.sh.";return
1167
+
fi
1160
1168
if grep -q 'PATCH_MODE'"$PROJECT_DIR/bin/exec.sh"2>/dev/null \
echo"bin/exec.sh predates the EXIT CODES fix (#443/#448, toolkit, 2026-10-20, field project): a clean build with a lint rise exited 1 like a failed gate, and an UNVERIFIED gate exited 0 like a pass, so agents learned to ignore 1 and trust 0. Now 4 = applied, lint only; 5 = applied, unverified; 1 = not applied. Its _common.sh also retries a bundle-only mxbuild exit 3 once. Upgrade BOTH: --upgrade-bin _common.sh --upgrade-bin exec.sh.";return
Copy file name to clipboardExpand all lines: skills/speed-setup.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,7 @@ The user complains about speed, asks to update the toolkit and check whether it
10
10
1. Run `bin/doctor.sh --bench .` from the project root. It changes no project file (only git's own stat cache, as any git status does) and takes about a minute. Read the table (step, this machine, reference, factor), the "Machine health" lines and the closing "Recommended fix" block.
11
11
2. VALIDATE first: is this machine slower than it should be? Use the verdict line and the Machine health lines. If the verdict says about as fast as the reference, Machine health is clean and the block says "None needed", say so in ONE line ("This machine is already fast: <verdict>") and STOP. Do not propose a fix for a fast machine. Otherwise say the result in ONE plain sentence, from the verdict line, for example: "This machine is 6x slower than the reference, mainly because every process start takes 100 ms instead of 2 ms." If Machine health warned, say that first, in words a non-developer knows. Users do not know what deno, mxbuild or a helper process is; never use those words to them. Wrong: "47 leftover deno helpers, run --cleanup?" Right: "Mendix build processes that were left running hold 3 GB of memory. Restarting your computer clears them; or I can stop just those now, if you say yes (`bin/doctor.sh --cleanup`)." For a project in a OneDrive/Dropbox/iCloud folder, the fix is moving the project to a local folder (the Recommended fix says how).
12
12
3. Only when step 2 found a problem: carry out the "Recommended fix" with the user. It names ONE option, the first that works here:
13
+
-**Take the toolkit's current scripts** ("speed fixes not active": an older, locally edited bin/exec.sh, _common.sh or lint-gate.sh). Show the user each script's local change in one line (`diff <toolkit>/project-bin/<name> bin/<name>`), ask whether it is still needed, then run the `--upgrade-bin` command the block prints (it backs each copy up). This comes first: until then every other number measures the old scripts.
13
14
-**Remove `Gate mode: full` from PROJECT.md** (the quick `mx check` per write is the default). Show the line, ask, remove it. Nothing else changes.
14
15
-**Move the project out of a synced folder** (OneDrive, Dropbox, Google Drive, iCloud). Ask, then move or re-clone it to the local folder the block names, and reopen it there. This comes before WSL, a dev container or the cloud: a synced folder slows every option, so move first and bench again.
15
16
-**Turn on git's file cache** (git status slow, process starts fine): the `git config` lines the block prints, in the project, after asking.
printf'%s'"$OUT"| grep -q 'predates the EXIT CODES fix'&& ok "pre-fix exec.sh: the exit-code fix is named"|| bad "exit-code fix not named""$(printf '%s'"$OUT"| grep -A2 exec.sh | head -6)"
100
100
101
+
echo"== T1c: a hand-edited exec.sh from before the speed fixes (2026-10-29) is named =="
102
+
P="$(mkproj t1c)"
103
+
printf'#!/usr/bin/env bash\n# local edit; PATCH_MODE fail_rc\nexit 0\n'>"$P/bin/exec.sh"
104
+
OUT="$("$SYNC""$P"2>&1)"
105
+
printf'%s'"$OUT"| grep -q 'predates the SPEED fixes'&& ok "pre-speed exec.sh: the speed fixes are named"|| bad "speed fixes not named""$(printf '%s'"$OUT"| grep -A2 exec.sh | head -6)"
106
+
printf'%s'"$OUT"| grep -q 'predates the EXIT CODES fix'&& bad "exit-code note fired on a copy that has fail_rc"|| ok "exit-code note silent when fail_rc is present"
107
+
101
108
echo"== T2: a lost exec bit on an otherwise identical script is repaired =="
0 commit comments