Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ Sections dated before 2026-09-19 predate the cycle and stay as they are. Named m
`docs/RELEASE-PROCESS.md` §8.

## Unreleased
- fix(gitignore): **`bin/doctor.sh` appends its machine-local entries (`.doctor-receipt`, `toolkit.env`, `progress-report-sessions.txt`, `.property-sets-receipt`) through `mxtk_gitignore_ensure`**: a CRLF `.gitignore` got LF lines (mixed endings) and could get an entry it already had added again; LF files get the same bytes as before, and the "(added … to the project's .gitignore)" note now prints only when a line was actually written — follow-up to the .gitignore line-ending fixes, 2026-11
- fix(journey-runner): **The HTML report now shows resolved seed values in step names, check labels, the journey title and the page-says expectations instead of `{{seed}}` (#668, the report half).** `report-render.js` resolves them for display only, on a copy, from the seeds the walk already records (`walks[].seeds`); stored names, `report.json`, ids, anchors and every join key stay raw (`report-normalize.js` still matches rows to the contract by the raw string), a placeholder with no seed stays visible as written, and a walk with no recorded seeds renders as before. `journey-runner.js` also exports `walks` (for fixtures; no behaviour change). New `tests/wave2/test-report-seeds-668.sh` on a capture from the real runner — field run, 2026-11
- fix(progress-report): **a build-plan State word the report does not define (`gate-pass`, `INCOMPLETE`, `ASSUMED`, ...) is no longer silently counted as not built (#653)**: `classify_state` returned `todo` for any unknown prefix, so a row a person had marked `gate-pass` read as open. It now returns `unread`: the row keeps its place in the phase and plan totals but has its own count (`unrecognised state N` in the legend and on the phase card) and a note `unrecognised state: <word> (phase, row)` per row; a blank State, or a cell holding only a dash, `[ ]` or TBD, still counts as not built, silently. Display only: no verdict, gate or exit code reads the todo count. `build-plan-status.sh` already reported these as unreadable. Covered by `test-progress-report.sh` T18. — field run, 2026-11
- fix(contract-check): **`check` and `--impact` now report inline `call rest service` activities per app instead of letting 0/0 read as "no consumers" (#674)**: a separate mxcli call (`refresh catalog full` + `catalog.activities` where `ActionType = 'RestCallAction'`; the 13-query call and every committed baseline are unchanged) prints `inline: N inline REST call(s) in <app> not checked (<microflows>)`, `inline: 0 inline REST calls in <app>`, or `not measured` when the call fails or the activities table is empty — never 0 by absence. Informational only: the `denominator:` line, verdicts and exit codes do not change; matching the call URL to a publisher is not done ("WHAT IT CANNOT SEE" says so). Captured with mxcli v0.28.0 from toolkit-built demo apps — field run, 2026-11
- fix(doctor,test-scratch): **a cached Mendix runtime that is incomplete is now named, with what it lacks and the repair**: mxcli accepts `~/.mxcli/runtime/<v>/runtime` on `launcher/runtimelauncher.jar` alone, so a cache without `bundles/org.osgi*.jar` killed `test --local` at startup (`NoClassDefFoundError org/osgi/...`) with no test verdict and a green mxbuild check above it; `bin/doctor.sh` and `test-scratch.sh` (before the build) now warn, also for the `mxbuild/<v>/runtime` link, point at a complete matching Studio Pro `Contents/runtime` on macOS, else name the download (`mxcli setup mxruntime -p <app>.mpr` for `~/.mxcli/runtime/<v>/`, `mxcli setup mxbuild -p <app>.mpr` for `~/.mxcli/mxbuild/<v>/`, per `setup --help`), and carry on (never blocks, exit codes unchanged, silent when complete; #692) — field run, 2026-11

Expand Down
33 changes: 22 additions & 11 deletions bin/doctor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,21 @@ if [ "${2:-}" = "--property-sets-apply-step" ]; then
fi

TOOLKIT_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
# CRLF-safe .gitignore appends (mxtk_gitignore_has / _ensure). doctor.sh always runs from the toolkit
# clone (it also sources lib/portable.sh unconditionally), so bin/lib/ is always reachable.
. "$TOOLKIT_ROOT/bin/lib/gitignore-ensure.sh"
# gi_add <entry> <comment> — append "# comment" + entry to the project's .gitignore unless the entry is
# already a line there, in the file's own line ending. 0 = appended, 1 = already listed, 2 = not writable.
# The blank separator line is what the old printf wrote; it is skipped when the file's last line was
# unterminated (the old code's leading "\n" only completed that line), so LF files get identical bytes.
gi_add() {
local _f="$PROJECT_DIR/.gitignore"
if [ -s "$_f" ] && [ -n "$(tail -c 1 "$_f")" ]; then
mxtk_gitignore_ensure "$_f" "$1" "$2" "$1"
else
mxtk_gitignore_ensure "$_f" "$1" '' "$2" "$1"
fi
}
PROJECT_DIR=""
INSTALL=0
ASSUME_YES=0
Expand Down Expand Up @@ -347,8 +362,7 @@ ps_write_receipt() {
printf 'mxcli: %s\n' "$PS_VER"
} > "$(ps_receipt)" 2>/dev/null || true
if [ -d "$PROJECT_DIR/.git" ] && ! git -C "$PROJECT_DIR" check-ignore -q .claude/.property-sets-receipt 2>/dev/null; then
printf '\n# Machine-local toolkit marker (doctor.sh property-set check)\n/.claude/.property-sets-receipt\n' \
>> "$PROJECT_DIR/.gitignore" 2>/dev/null \
gi_add /.claude/.property-sets-receipt '# Machine-local toolkit marker (doctor.sh property-set check)' \
&& note "(added /.claude/.property-sets-receipt to the project's .gitignore — the receipt is machine-local)"
fi
}
Expand Down Expand Up @@ -2419,23 +2433,20 @@ if [ -n "$PROJECT_DIR" ] && [ -d "$PROJECT_DIR" ]; then
# trips clean-tree hooks on an untracked file doctor itself wrote (field case: a stop
# hook demanding it be committed, 2026-09-02).
if [ -d "$PROJECT_DIR/.git" ] && ! git -C "$PROJECT_DIR" check-ignore -q .claude/.doctor-receipt 2>/dev/null; then
printf '\n# Machine-local toolkit marker (doctor.sh preflight receipt)\n/.claude/.doctor-receipt\n' \
>> "$PROJECT_DIR/.gitignore" 2>/dev/null || true
note "(added /.claude/.doctor-receipt to the project's .gitignore — the receipt is machine-local)"
gi_add /.claude/.doctor-receipt '# Machine-local toolkit marker (doctor.sh preflight receipt)' \
&& note "(added /.claude/.doctor-receipt to the project's .gitignore — the receipt is machine-local)"
fi
# toolkit.env holds this machine's paths — never something to commit.
if [ -d "$PROJECT_DIR/.git" ] && ! git -C "$PROJECT_DIR" check-ignore -q .claude/toolkit.env 2>/dev/null; then
printf '\n# Machine-local tool locations (bin/doctor.sh / project-bin/_common.sh)\n/.claude/toolkit.env\n' \
>> "$PROJECT_DIR/.gitignore" 2>/dev/null || true
note "(added /.claude/toolkit.env to the project's .gitignore — it holds this machine's paths)"
gi_add /.claude/toolkit.env '# Machine-local tool locations (bin/doctor.sh / project-bin/_common.sh)' \
&& note "(added /.claude/toolkit.env to the project's .gitignore — it holds this machine's paths)"
fi
# The progress report's session cache holds absolute session-log paths (user name, session ids).
# -e, not -d: in a git worktree .git is a file. --no-index: a tracked file is never "ignored" otherwise,
# and the line would be appended again on every run.
if [ -e "$PROJECT_DIR/.git" ] && ! git -C "$PROJECT_DIR" check-ignore -q --no-index .claude/progress-report-sessions.txt 2>/dev/null; then
printf '\n# Machine-local progress report session cache (absolute session-log paths)\n/.claude/progress-report-sessions.txt\n' \
>> "$PROJECT_DIR/.gitignore" 2>/dev/null || true
note "(added /.claude/progress-report-sessions.txt to the project's .gitignore — the cache is machine-local)"
gi_add /.claude/progress-report-sessions.txt '# Machine-local progress report session cache (absolute session-log paths)' \
&& note "(added /.claude/progress-report-sessions.txt to the project's .gitignore — the cache is machine-local)"
fi
if [ -e "$PROJECT_DIR/.git" ] && git -C "$PROJECT_DIR" ls-files --error-unmatch .claude/progress-report-sessions.txt >/dev/null 2>&1; then
note "(.claude/progress-report-sessions.txt is already tracked by git; untrack it with: git rm --cached .claude/progress-report-sessions.txt)"
Expand Down
Loading
Loading