Skip to content

Commit 67796b6

Browse files
committed
Merge remote-tracking branch 'origin/master' into triage/348-baseline-loosen-lock
# Conflicts: # CHANGELOG.md
2 parents 820f538 + 1ad83ab commit 67796b6

2 files changed

Lines changed: 72 additions & 0 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ Sections dated before 2026-09-19 predate the cycle and stay as they are. Named m
2020
## Unreleased
2121

2222
- fix(lint-gate, conformance-check): **loosening a ratchet baseline needs the user's own command (#348)**: `--approved-in-chat` was a flag the agent whose script caused the rise could type itself. Now `lint-gate.sh --update-baseline` that raises any rule count, and `conformance-check.sh --update-baseline` that turns an OK row into a non-OK one, ask for `loosen` typed at a terminal; an agent's tool call (and Claude Code's `!` prefix) has none, so it is refused with the exact command for the user to run in their own terminal window. Deleting the baseline first no longer dodges it: the write is compared with the one git HEAD holds. Tightening, a first baseline, newly seeded conformance rows and check runs are unchanged; `--approved-in-chat` still parses and is ignored. No terminal (cloud/web session): the user edits the baseline file and commits it — the commit is the approval, and a committed baseline is the bar with no prompt. The prompt times out after 300s (`MXTK_LOOSEN_TIMEOUT`) and refuses, so a pty-backed harness (Cursor / VS Code) cannot hang on it; a conformance check run with its baseline deleted says `git checkout -- <baseline>` first. Stale `--approved-in-chat` / agent-runs-it hints dropped from the SEC014 notice, `lint-rules/`, the rename notes and `doctor.sh`. Not covered: a pty wrapper faking a terminal, or an uncommitted hand edit of the baseline (git shows it). New fixture `tests/wave2/test-baseline-loosen-lock.sh` (24 checks; 6 of the review-fix cases fail before them). Smaller rewrite of #375 — external reviewer feedback (2026-10-14)
23+
- process(roadmap): **RM-02 — every toolkit release is measured for build speed and token cost**: a parked roadmap entry from cook-off ProcureFlow run 2 (2026-10-26/27: 0.93 scripts per plan row, 18.3 min of lint + score after every exec, 40,161 tokens of fixed load per call with 0 Skill and 0 MCP calls), with what to build (a per-release speed benchmark, a cost and reader per exec step, cadence over repetition, quiet output, lean sessions), its trigger and exit bar; its Assets table records what has already landed (#581, #582, #586, #587, #589–#591, #596, #597). On-demand file, 0 baseline words — MendixMau (#580)
2324
- docs(doctor-triage): **the `~/.mxcli/mxbuild/` cache lane is no longer called Linux-only**: on macOS it held a working Mach-O arm64 build for 11.14.0, while 10.24 and 11.12 downloads were ELF. The lane table now says to run `file` on the cached `mx` before calling the lane unavailable (#525). — AlvinnYeo (report)
2425
- fix(_common): **an `export KEY=value` line in `toolkit.env` now sets KEY**: `mxtk_load_env` squeezed all whitespace out of the key, so `export MENDIX_APP=...` set a variable named `exportMENDIX_APP` and the override did nothing, although the function's own comment says that form works. `KEY = "value"` also kept its quotes (the quote strip ran before the trim); the trim now runs first. Pure bash, no extra process per line. Fixture `tests/wave2/test-common-windows.sh` case 4b (#579). — triage of #579
2526
- fix(exec): **a write no longer leaves units that changed only in XPath whitespace for the reviewer to read.** mxcli v0.27.0's `alter entity … rename attribute` rewrote 135 units in 20 unrelated modules that way (mendixlabs/mxcli#1596; fixed upstream in v0.29.0, ako/mxcli#1506, so this is insurance for projects on v0.27–v0.28). `exec.sh` now runs `model-scope.py restore` after the write (MDL and `--patch`) and before the mxbuild gate, so the gate checks the final model; it prints the real changes per module and puts a `scope:` note in the BUILD-LOG row. It never blocks: a failure is a warning, `MXTK_NO_SCOPE=1` skips it, and it is skipped when `FORCE_EXEC` let the write run over uncommitted model changes. No pre-commit refusal (maintainer decision on #593): `model-scope.py check --staged` stays available to run by hand. Fixture `tests/wave2/test-model-scope.sh` section F. Ported from #593 onto current master — saingge

‎process/roadmap.md‎

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,3 +121,74 @@ something to generalise from a single session.
121121
vendor's docs are unreachable from the sandbox these assessments were written in. Cost
122122
is metered per spec run, and nobody has measured what one of this pipeline's stages
123123
costs. Both figures are for the field run to supply.
124+
125+
---
126+
127+
## RM-02 — Every toolkit release is measured for build speed and token cost, so a regression is caught in a week, not a cook-off
128+
129+
**Status:** PARKED — the fixes the run pointed at have landed (see Assets); the per-release
130+
benchmark (items 1, 2, 4 and 5 below) does not exist yet. This line is as of 2026-11-03; what
131+
has landed since is in `CHANGELOG.md`, which is where shipped status is tracked.
132+
133+
**The regression nobody spotted.** Between the copy a cloud build used (`247729fd`, 2026-09-21)
134+
and master at `6615869d` (2026-10-24), 215 commits landed on master, 36 of them in `project-bin/exec.sh` (819 → 2,289 lines). Each
135+
added a check after a real failure — lint per exec (`8d70fbda`), score per exec (`a7221405`), the
136+
chat-approval baseline refusal (`b6a13380`), the row as the unit of work (`a7653197`) — and none was
137+
ever removed or re-costed. No release measured what the sum did to a build. A cook-off did
138+
(run 2, ProcureFlow, 2026-10-26/27, arm C = mxcli + that snapshot):
139+
140+
| Measured | Value |
141+
|---|---|
142+
| Scripts per build-plan row | 0.93 (the cloud build: 0.34) — every row paid the full exec chain |
143+
| Lint + score after every exec | 18.3 min; the ratchet read ROSE on 123 of 147 rows and nobody read it — while 6 real SEC010 warnings sat in it |
144+
| Checks that never ran | `verify-module`, `gate-check`, the LOOK ledger: 0 runs (nothing calls them) |
145+
| `mxcli docker reload` | failed every time (curl not in the JRE image) → a container restart per change |
146+
| Outcome | stopped by the user after 10 h 50 min at row 121 of 147, no acceptance test; the HAM arm finished 137/137 and 12/12 in 602 min |
147+
| Lead tokens | 2,878 model calls, median 139,895 tokens of context per call, 399 M input tokens in total |
148+
| Fixed load per call | 40,161 tokens, incl. 188 skills, 7 user plugins and 4 MCP servers — **0** Skill and **0** MCP calls in the whole run |
149+
150+
**Assets (2026-11-03):**
151+
152+
| Asset | Path | State |
153+
|---|---|---|
154+
| Fixes from the run (arm D of the cook-off) | `project-bin/reload.sh` (hot reload), `project-bin/module-close.sh` (lint, score, check, verify-module, LOOK once per module), `project-bin/row-groups.sh` + the `exec.sh` row-group gate, `skills/iterative-build-loop.md` (row groups), lint per exec showing only new findings | merged in #581, follow-ups #582, #586; measured in run 3 arm D (the #581 CHANGELOG lines) |
155+
| Exec and gate speed | `mx check` gate by default, fewer process starts per exec and per closeout, `bin/doctor.sh --bench` (a per-machine bench, not the per-release benchmark below), `skills/speed-setup.md` | merged in #587, #589, #590, #591, #596, #597 |
156+
| Lean session switches | `claude -p --setting-sources project,local --strict-mcp-config [--mcp-config .mcp.json]` → 37,536 tokens per call (from 40,161); with `--disable-slash-commands` 33,329 | measured once, one call; not wired into any toolkit script |
157+
| Run analysis | the cook-off's observer notes (O-49 … O-56) live outside this repo; the public trail is PR #581 and its CHANGELOG lines | written |
158+
159+
**What to build:**
160+
161+
1. **A speed benchmark per release.** A small fixed reference build (a slice of a real build plan,
162+
~10 rows, one module) run headless on each release candidate. Record: execs per row, instrument
163+
seconds per exec, minutes per row, model calls, median context tokens per call, fixed load per
164+
call. Compare with the previous release; a rise of more than 15% on any of these blocks the
165+
release until it is explained in the CHANGELOG.
166+
2. **Every check carries its cost and its reader.** A new step in `exec.sh` (or any per-exec hook)
167+
states in its header: seconds per exec, tokens of output per exec, and who reads the result and
168+
when. A check whose output no step reads is moved to a cadence (per module, per checkpoint) or
169+
removed. Review the list at each weekly toolkit review; removing is a normal outcome.
170+
3. **Cadence over repetition.** Per exec: what protects the model (check, apply, mxbuild gate) and
171+
lint — kept per exec by decision (2026-10-27: deferring it risks missing findings), but it prints
172+
only the NEW warnings in the documents this script wrote, so it is read, not skimmed past as ROSE.
173+
Per module: score, verify-module, LOOK (`module-close.sh`). (Lint diff and module close: landed, #581.) Per checkpoint: docker
174+
check/build, the test suite. A check that "must" run is called by a gate, never only by a prompt.
175+
4. **Quiet by default.** `exec.sh` prints the verdict and the errors; the long form goes to a log
176+
file. Every line printed is re-read on every later model call until the next compaction.
177+
5. **Lean sessions by default.** Headless and build sessions start with the project's settings only:
178+
the project's own MCP servers (`.mcp.json`) stay, so teams that use an MCP server keep it; user
179+
plugins, user skills and connectors a build never calls are left out.
180+
181+
**Start when:** the next toolkit release (`bin/cut-release.sh`). The other trigger, arm D's numbers,
182+
has fired: run 3 arm D was measured and its fixes merged (#581).
183+
184+
**Exit bar:** the benchmark runs on every release and its table is in the release notes; `exec.sh`
185+
lists cost and reader for each step; new lint warnings are shown per exec and acted on; score/verify-module run at module close under a gate
186+
(not a prompt), with a non-zero run count in a field build; a headless build's fixed load per call
187+
is reported and below 35k tokens.
188+
189+
**Explicitly out of scope:**
190+
191+
- **Removing lint, the score or the mxbuild gate.** They find real defects (the 6 SEC010 above).
192+
The fix is when they run and who reads them, not whether they exist.
193+
- **Tuning for one arm of the cook-off.** The benchmark measures the toolkit on a fixed plan; it is
194+
not a race against HAM or the cloud build.

0 commit comments

Comments
 (0)