Skip to content

Commit 190a2d7

Browse files
committed
fix(ui-loop, testing-shape): scope the restart claim to its evidence; reconcile the 403 probe with the goto row
Review of #340 (MERGE-AFTER-FIX): - ui-loop: drop "sessions live in the runtime's memory", which contradicts measured-claims.md (sessions persist in System.Session and survive a container restart). Scope to mxcli run --local and state the evidence as a timing match (7 starts vs the reports), not an inspected session table. - testing-shape 403 row: name the probe actually used (a full page.goto('<base>/')), keep the re-authenticating helper rule of the 2026-08-15 row, and amend that row with an unconfirmed cross-reference: its bounce may have been this 403 misread. - CHANGELOG headline matches. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw
1 parent 5e6bb68 commit 190a2d7

3 files changed

Lines changed: 10 additions & 8 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Sections dated before 2026-09-19 predate the cycle and stay as they are. Named m
1919

2020
## Unreleased
2121

22-
- learn(learned-detection-gaps, testing-shape, ui-loop): **a class on a snippet call never reaches the DOM; a 403 bounce and a widget-pinned session probe both read as sign-outs; every restart signs every user out.** Detection-gaps row: `Class` on a `SNIPPETCALL` is green through check, exec, mxbuild, lint and DESCRIBE, and absent in the browser ([#336](https://github.com/MendixMau/mxcli-project-toolkit/issues/336)). Testing-shape §4 gains two false-red rows: `login.html?messageCode=403` with the session kept ([#338](https://github.com/MendixMau/mxcli-project-toolkit/issues/338)), and instruments pinned to one grid name or a typed menu list (1/7 and 7/34 false FAILs after a redesign, [#339](https://github.com/MendixMau/mxcli-project-toolkit/issues/339)). ui-loop: say so before a restart while a human uses the app ([#337](https://github.com/MendixMau/mxcli-project-toolkit/issues/337)) — three-app field run, 2026-10-14
22+
- learn(learned-detection-gaps, testing-shape, ui-loop): **a class on a snippet call never reaches the DOM; a 403 bounce and a widget-pinned session probe both read as sign-outs; app restarts matched a "signs me out" report by timing.** Detection-gaps row: `Class` on a `SNIPPETCALL` is green through check, exec, mxbuild, lint and DESCRIBE, and absent in the browser ([#336](https://github.com/MendixMau/mxcli-project-toolkit/issues/336)). Testing-shape §4 gains two false-red rows: `login.html?messageCode=403` with the session kept ([#338](https://github.com/MendixMau/mxcli-project-toolkit/issues/338)), and instruments pinned to one grid name or a typed menu list (1/7 and 7/34 false FAILs after a redesign, [#339](https://github.com/MendixMau/mxcli-project-toolkit/issues/339)). ui-loop: say so before a restart while a human uses the app ([#337](https://github.com/MendixMau/mxcli-project-toolkit/issues/337)) — three-app field run, 2026-10-14
2323
- 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
2424
- 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
2525
- 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

‎skills/testing-shape.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,8 @@ so the next person argues with the incident rather than with the rule.
209209
| **UI** | **A logout helper that reports success without ending the session** turns a licence cap into a phantom product failure. Closing the browser or clearing cookies does not end a Mendix session; nor, measured 2026-09-12 on Mendix 11.14, does `POST /xas/ {action:'logout'}` — it answers **HTTP 200 and the session survives**. A helper returning `status === 200` therefore reported a clean logout it had never once performed. Sessions accumulated across runs until the trial cap refused the next login, and the runtime says so (`Maximum number of sessions exceeded! (You are currently using a trial license)` in the runtime log) while the browser shows only a generic "Sign in failed" — so the suite blamed the credentials, then the feature. The same suite leaked a second session per run at every **persona switch**, because switching identity called the login helper again and orphaned the session already on the server. | Call `mx.logout()` — the client's own call — and **return the verified outcome, not a status code**: a login form back on screen. Log out before every persona switch, not only at the end of the run. Prove it with the one check that cannot be faked: `SELECT COUNT(*) FROM System.Session` before and after a login/logout cycle, and again after a whole suite run. Zero leaked sessions is the bar; a suite you cannot run twice without restarting the runtime is leaking. |
210210
| **UI** | A login helper **silently falls back to an admin account** (a guard against lockout) — a role-scoped test then proves nothing, and neither the run nor the report looks any different (2026-08-05) | Any spec whose result depends on *who* is logged in must **assert the actual identity**, not merely that login succeeded |
211211
| **UI** | A helper **no-ops without erroring** when its expected page is absent, so the spec runs to completion against the wrong page (2026-08-05, a mobile scanning spec) | Helpers must **throw** when a precondition is missing, never return quietly. Dump live page state rather than trusting the assertion's own label. |
212-
| **UI** | A full `page.goto(baseUrl)` **silently logs the session out** once security is above `Off`. Suites that log in once and then "reset navigation" with a goto bounce to `/login.html` and every downstream assertion breaks for the wrong reason (2026-08-15, after raising `Off` → `Prototype`) | Fix at the helper, not the call site: the shared navigate-home helper detects the login form (`#usernameInput`) and **re-authenticates every time**. Never trust a cookie across `page.goto`. |
213-
| **UI** | **False red: a correct access block reads as a sign-out.** A signed-in user opening a page their role may not open is redirected to `login.html?messageCode=403`, and the stock login page shows **no message**. The session is kept (same `XASSESSIONID`; `/` loads the user's home again). A crawler or wrong-role spec that treats "landed on login.html" as "session lost" reports a security failure over a correct block, and a human calls it "the app signs me out" (2026-10-14, Mendix 11.15, [#338](https://github.com/MendixMau/mxcli-project-toolkit/issues/338)) | Classify `messageCode=403` as **blocked, session kept**, separately from a real sign-out, then prove the session: navigate to `/` and assert not-on-login plus menu present. Before calling any sign-out a product defect, check the runtime log for a restart at that time: every `mxcli run` restart ends every session ([#337](https://github.com/MendixMau/mxcli-project-toolkit/issues/337)). |
212+
| **UI** | A full `page.goto(baseUrl)` **silently logs the session out** once security is above `Off`. Suites that log in once and then "reset navigation" with a goto bounce to `/login.html` and every downstream assertion breaks for the wrong reason (2026-08-15, after raising `Off` → `Prototype`) | Fix at the helper, not the call site: the shared navigate-home helper detects the login form (`#usernameInput`) and **re-authenticates every time**. Never trust a cookie across `page.goto`. Unconfirmed: this bounce may have been the 403 one in the next row, misread (the record does not say whether the URL carried `messageCode=403`). |
213+
| **UI** | **False red: a correct access block reads as a sign-out.** A signed-in user opening a page their role may not open is redirected to `login.html?messageCode=403`, and the stock login page shows **no message**. The session is kept (same `XASSESSIONID`; a full `page.goto('<base>/')` then loads the user's home with no login). A crawler or wrong-role spec that treats "landed on login.html" as "session lost" reports a security failure over a correct block, and a human calls it "the app signs me out" (2026-10-14, Mendix 11.15, [#338](https://github.com/MendixMau/mxcli-project-toolkit/issues/338)) | Classify `messageCode=403` as **blocked, session kept**, separately from a real sign-out, then prove the session with that probe: `page.goto('<base>/')` and assert not-on-login plus menu present. A login form there is a real sign-out; the row above's re-authenticating helper still applies. Before calling any sign-out a product defect, check the runtime log for a restart at that time ([#337](https://github.com/MendixMau/mxcli-project-toolkit/issues/337)). |
214214
| **UI** | **False red: an instrument pinned to one widget name or a typed menu list fails after a redesign.** A session-alive probe that waited for one named home grid reported **6/7 "SESSION DID NOT SURVIVE"** after a home redesign moved that grid to a second tab; with the selector widened, 7/7 PASS, and the blocks had been correct throughout. A nav-crawl comparing menus to a hardcoded EXPECTED list went **7/34**: all 27 FAILs were expectation rows (20 MISSING, 6 EXTRA), none an error or a sign-out (2026-10-14, [#339](https://github.com/MendixMau/mxcli-project-toolkit/issues/339)) | A session-alive check asserts **not on `login.html` and the menu bar present**, never one page's widget. Menu expectations are **derived from the model** at test start (`list navigation menu` plus the role grants), never typed. The tell: every FAIL has the same reason, and it names the instrument's own expectation. |
215215
| **UI** | `:has-text(...)` is a **Playwright-only** pseudo-class. Inside `page.evaluate` it reaches `document.querySelector`, which throws `SyntaxError`; generic `.catch()` swallows it, so a `has_widget`-style helper evaluates **permanently false** and a visible row reads as absent (2026-08-15) | In `evaluate` context use a plain `.textContent.includes(...)` scan. Reserve `:has-text` / `:visible` for real Playwright locator strings. |
216216
| **UI** | `display: contents` elements always report `offsetParent === null` — so an `offsetParent !== null` visibility filter returns **empty** for a Data Grid 2 the user is actively looking at (browser layout quirk, not a Mendix bug) | Check the ancestor tabpanel's own `getComputedStyle(...).display`, never the row's `offsetParent`. |

‎skills/ui-loop.md‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -239,11 +239,13 @@ started it>'` once; it is remembered after that. `--dry-run` says what it would
239239
app uses `bin/test-stack-up.sh --restart` instead. This is the one restart an implementer may run
240240
without the lead (`dispatching.md`).
241241

242-
**A restart signs every user out** (sessions live in the runtime's memory), and so does the
243-
trial licence's own 2–4 h stop. If a human may be using the app, say so in chat **before**
244-
restarting. When a human reports "it keeps signing me out", compare the runtime log's
245-
`successfully started` lines with the times first: one field app showed 7 starts in ~90 min of
246-
theme work, which was the whole report (#337).
242+
**Under `mxcli run --local`, restarts matched every "it signs me out" report** in one field app,
243+
and the trial licence's own 2–4 h stop is a restart too. If a human may be using the app, say so
244+
in chat **before** restarting. When a human reports "it keeps signing me out", compare the runtime
245+
log's `successfully started` lines with the times first: 7 starts in ~90 min of theme work lined up
246+
with the reports (#337). That is a **timing match**; no session table was inspected, and sessions
247+
do persist in `System.Session` across a container restart (`measured-claims.md`), so the
248+
mechanism is open.
247249

248250
## When it finds something — which side is actually wrong
249251

0 commit comments

Comments
 (0)