Skip to content
Closed
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Sections dated before 2026-09-19 predate the cycle and stay as they are. Named m

## Unreleased

- process(context): **stories and old measurements move out of four always-loaded skills; baseline 75,028 → 74,223 words (−805).** Verbatim moves into `process/baseline-incident-history.md` (new sections UI1–UI4, TO1–TO3, MF1, MP1), each leaving a one-line pointer: `ui-preflight-pages.md` (the 2026-09-09 design-reach story, the ToeicBuddy fidelity numbers, the fidelity-vs-checklist table, the repeated 2026-08-31 A/B paragraph), `tool-output-is-not-ground-truth.md` (the three 2026-07-29 instance narratives, the `$?` instance table, the Part 3 workflow story), `microflow-preflight.md` (`mxcli layout` probe history) and `learned-mdl-preflight.md` (#879 re-probe numbers). Rules, STOP rows and their numbers, denominators and one-line failure examples stay in place. New `bin/check-moved-text.sh` makes the #315 line-by-line review mechanical: every removed line must be found with `grep -F` in its new home (83 of 83 here). It exits 2 on a source with no diff or on 0 removed lines (never "0 of 0" green), lists lines under 15 characters as trivially found, and has a fixture (`tests/wave2/test-check-moved-text.sh`). Behaviour A/B still owed before merge. — T4 of the stub-diet research report
- process(build): **Stage 5 drafts the ready set in parallel and applies serially.** The runbook dispatch row said "sequential within a module", which serialised drafting even for independent scripts; it now points to `iterative-build-loop.md` → Gate cost, the single statement of the rule. The unit is the build-plan row: every `BUILD` row whose "Depends on" rows are all applied, minus overlapping writers (two rows that replace, alter or drop+create the same document never share a ready set, and no row is drafted while it overlaps a queued unapplied one; `brd-to-build-plan.md` has Produces name every document a row writes), runs at once, its scripts in order, one `mdl-agent` per script. Applies stay one at a time through `bin/exec.sh`, and the ready set is recomputed after each. A queued draft made before a sibling apply landed is re-checked with `mxcli diff --format struct` (preflight STOP rule 23); any removal line (checked against `describe` per BUG-146) or STOP rule 21 target means re-draft, never patch, because a stale restatement of a shared document is exactly rule 21's silent seed-call loss and passes `check --references`. Report `ready set N, drafted N, applied k`; the `mdl-agent` template says a drafter never applies and never depends on an unapplied draft. Field evidence: none yet. — MendixMau
- fix(platform-link): **CLI commits now show their changed documents in Studio Pro History.** Studio Pro's History → Model changes pane reads a `ModelChanges` array from the commit's `refs/notes/mx_metadata` note. Trap 6c's hand-written template set it to `[]`, so every mxcli/agent commit showed "Model changes 0" (field project: 270 of 270 notes empty). New `project-bin/mx-metadata-note.py` (stdlib only) computes the array from the commit's changed `.mxunit` files, in Studio Pro's entry shape: Status, UnitID, UnitType, UnitName and Module (walked up the `.mpr` Unit tree). It has `changes` / `write` / `backfill` / `sync <remote>` subcommands. `install-project-hooks.sh` now also installs post-commit and post-rewrite hooks that write the note and never block, and `--check` covers them, so `sync-project.sh` rolls them out to wired projects. Notes are published with `mx-metadata-note.py sync <remote>` after the branch push. Push config is never touched. With mxcli v0.26+ in the project root the hooks call `mxcli git note --write` instead (mendixlabs/mxcli#1337); the Python script is the fallback for older pins, and on 160 field commits both wrote the same 3,594 entries. Trap 6c rewritten. Measured against Studio Pro's own notes, 51 commits in 5 apps: 3387/3389 entries exact on all five fields. Field run on a 357-commit Mendix 11.15.0 app: 158 notes backfilled and pushed, and Studio Pro History lists the documents per revision. Review fixes: an earlier revision added `HEAD` + the notes ref to `remote.<r>.push`. It was dropped because any push refspec replaces `push.default`. A branch tracking a differently named upstream got a new same-named branch on Team Server where `simple` refuses, a missing local notes ref failed the whole push, and nobody knows whether Studio Pro's own push reads that config. The installer now only fetches the remote's notes (non-forced). It removes that exact `HEAD` + notes pair if present, and leaves and reports any other entry. `sync` handles a remote with no notes ref (it used to exit 1) and retries a rejected push once after re-merging. A note that already lists changes (Studio Pro's) is never overwritten by `write`/`backfill` without `--force`, and `sync` keeps a colleague's non-empty note over ours. The mxcli probe greps `git note --help` for `--write`. Hooks and docs call the script through `resolve_py`. Fixture `tests/wave2/test-mx-metadata-note.sh` (40 cases, over real captured template units; single- and two-tree layouts, amend, backfill and `--force`, push exit codes identical to a no-hooks clone, leftover-refspec cleanup, sync to an empty remote and its retry, notes fetch at install, a diverged notes merge; green under `init.defaultBranch` master and main). — field project (Mendix 11.15 app), MendixMau
- learn(fixture-seeding): **explore the data structure first, choose rows by use case, scan actions for resets before any run.** Two seeding runs on public template apps: seeding raised journey passes 33 -> 58 and 20 -> 51 of the same sets (FAIL 93 -> 68, 163 -> 132; INVALID unchanged), and a "Reset all demodata" journey wiped accounts so 104 of 127 journeys reported `The username or password you entered is incorrect`, identical on empty and seeded databases. Skill gains three questions a seed must answer, a use-case checklist, a destructive-action scan, a generic traps table with symptoms, measured expectations and a denominator checklist; routing trigger now fires on seed/test/demo data and empty pages. Independent review fixes: object ids follow the Mendix bigint pattern with a business-key guard (no uuids), associations are seeded where the page's path stores them, four new traps (enum names, inheritance chain, calculated attributes, view/external entities), and the port-offset and container-label traps moved to `harness-architecture.md`. — MendixMau
Expand Down
90 changes: 90 additions & 0 deletions bin/check-moved-text.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
#!/usr/bin/env bash
# check-moved-text.sh — prove a "move, never delete" trim lost no line.
#
# WHY. CLAUDE.md "Always-loaded skill text — the word budget": room in the baseline is made by
# MOVING stories, examples and old numbers to an on-demand file, never by deleting the rules.
# The first such trim (#315) was checked by hand, line by line. This makes the mechanical half of
# that review a command: every line the diff removes from the source files must still exist,
# verbatim, in the file it moved to. What it cannot judge is whether a line that stayed behind
# should have — that half stays with the reviewer.
#
# bin/check-moved-text.sh [--base <ref>] <destination-file> <source-file>...
# bin/check-moved-text.sh process/baseline-incident-history.md skills/ui-preflight-pages.md
#
# Compares the working tree against merge-base(<ref>, HEAD) (default ref origin/master), so it
# runs the same before and after the commit. A removed line counts as found when `grep -F` finds
# it (trailing whitespace trimmed) anywhere in the destination's working-tree copy. Blank lines
# are not counted. Each line not found is printed for hand review — a line rewritten in place
# (a sentence kept, its neighbour moved) shows up here, and the PR says why.
#
# LIMIT. `grep -F` matches substrings, and a line that occurs twice in the sources is satisfied
# by one copy in the destination. So a very short line (`|---|`, "```", "---") is found almost
# anywhere and proves nothing. Lines under 15 characters are listed separately as "trivially
# found, review by hand"; they count as found, but the reviewer reads them.
#
# A named source with no diff (a mistyped path, or a file nothing was removed from) exits 2,
# and so does a run that removed 0 lines in total: "0 of 0 found" is not a pass.
#
# Field run: the T4 stub-diet trim, 2026-10-14 (four baseline skills into
# process/baseline-incident-history.md).
#
# Exit: 0 every removed line found · 1 some not found, listed · 2 could not run, a source with
# no diff, or nothing removed at all.
set -u

BASE="origin/master"
if [ "${1:-}" = "--base" ]; then BASE="${2:-}"; shift 2; fi
DEST="${1:-}"
[ -n "$DEST" ] && [ "$#" -ge 2 ] || { grep '^# bin/check-moved-text.sh' "$0" | sed 's/^# *//' >&2; exit 2; }
shift
[ -f "$DEST" ] || { echo "check-moved-text: destination '$DEST' not found." >&2; exit 2; }
MB="$(git merge-base "$BASE" HEAD 2>/dev/null)" || {
echo "check-moved-text: no merge base with '$BASE' (fetch it first)." >&2; exit 2; }

TOTAL=0; FOUND=0; MISSING=""; SHORT=""; NODIFF=""
for SRC in "$@"; do
REMOVED="$(git diff --no-color -U0 "$MB" -- "$SRC" | awk '
/^--- (a\/|\/dev\/null)/ { next }
/^-/ { print substr($0, 2) }')"
if [ -z "$(printf '%s' "$REMOVED" | tr -d '[:space:]')" ]; then
NODIFF="${NODIFF} ${SRC}
"
continue
fi
while IFS= read -r line; do
t="$(printf '%s' "$line" | sed 's/[[:space:]]*$//')"
[ -n "$(printf '%s' "$t" | tr -d '[:space:]')" ] || continue
TOTAL=$((TOTAL + 1))
if grep -F -q -- "$t" "$DEST"; then
FOUND=$((FOUND + 1))
if [ "${#t}" -lt 15 ]; then SHORT="${SHORT} ${SRC}: ${t}
"; fi
else
MISSING="${MISSING} ${SRC}: ${t}
"
fi
done <<LINES
$REMOVED
LINES
done

if [ -n "$NODIFF" ]; then
echo "check-moved-text: no removed lines in these source(s) — mistyped path, or nothing moved:" >&2
printf '%s' "$NODIFF" >&2
exit 2
fi
if [ "$TOTAL" -eq 0 ]; then
echo "check-moved-text: 0 removed lines in total — nothing was checked, which is not a pass." >&2
exit 2
fi
echo "check-moved-text: $FOUND of $TOTAL removed non-blank line(s) found verbatim in $DEST."
if [ -n "$SHORT" ]; then
echo "Trivially found (under 15 characters, a substring match proves little — review by hand):"
printf '%s' "$SHORT"
fi
if [ -n "$MISSING" ]; then
echo "Not found (review by hand; each needs a reason in the PR):"
printf '%s' "$MISSING"
exit 1
fi
exit 0
Loading
Loading