Skip to content

perf(ui-loop): test-stack-up recognises mxcli run --local; restart builds once - #225

Closed
MendixMau wants to merge 7 commits into
masterfrom
perf/stack-up-local-loop
Closed

MendixMau wants to merge 7 commits into
masterfrom
perf/stack-up-local-loop

Conversation

@MendixMau

Copy link
Copy Markdown
Owner

Direct lane

What changed and why (one paragraph):
test-stack-up.sh becomes a thin layer over the CLI's own loop instead of a parallel one. A live mxcli run --local (its .mxcli/run-local.json beside this project's .mpr, pid alive) is now published as APP_OWNERSHIP=verified, APP_SOURCE=run-local. Before, it was an unverified port-scan hit that the e2e harness refused without ALLOW_UNVERIFIED_APP=1. Staleness knows the loop: with --watch, a model edit reads watch (ready); without it, the edit reads APP UP BUT STALE — restart mxcli run --local with --watch. Two-tree checkouts (app/X.mpr, with or without a root symlink) resolve the handshake and the model dir correctly. The docker path uses docker run --wait instead of the 240s poll, and --restart no longer runs the build twice (a bug from #220). The ownership check and stale detection are kept. The adminPass from the handshake is never copied or printed.

Stacks on #220 (base perf/faster-ui-loop); retarget to master once #220 merges.

Field evidence — field run 2026-10-07, existing app:

  • mxcli run --local cold boot took 181s. The script went from unverified → verified on the same app and port.

  • With --watch, a touched model read watch; a page change applied in ~20s, a security/nav change in ~60s.

  • Stopping the loop removed the handshake, and the script fell back to the scan.

  • The golden tests/wave2/fixtures/run-local/run-local.json was captured from that run, with every value replaced and the layout kept.

  • No client data anywhere in the diff (leak guard passes; added lines grepped for private names)

  • Size cap: 8 files, ~316+/40− (fixture + golden ~170 of that)

  • Test tier: T2 (field run above, root layout). New fixture tests/wave2/test-stack-up-local.sh (T0 golden shape, live watch, dead pid, stale, watch, app/, root symlink) is bash -n clean and runs in CI as T3

  • Golden captured, not hand-written. Both layouts are covered by fixture cases T5/T6. Windows: liveness uses tasklist, but --watch detection via ps is unknown there, so it degrades to "stale" advice

  • New skill: n/a

  • CHANGELOG.md line under ## Unreleased, credited — MendixMau

  • Bug entries: n/a

🤖 Generated with Claude Code

https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw


Generated by Claude Code

claude added 6 commits October 7, 2026 10:13
…e, legible screenshots

- exec.sh skips the pre-flight baseline mxbuild when the model is unchanged
  since its last clean pass (stamp gains errors:, check --clean).
- New tests/e2e/settle.js replaces fixed sleeps in journey-runner and
  page-audit; SETTLE_MODE=fixed restores the old waits for an A/B run.
- page-audit saves a viewport shot beside the full-page one; ui-loop.md
  says to look at viewport shots.
- shrink-image-read.sh works off macOS (ImageMagick/Pillow, no-jq path).

Field run 2026-10-07, requirements-driven build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw
…order

- test-stack-up.sh: record the model the app was built from; on change,
  `mxcli docker reload` (+ --skip-check when exec.sh already passed it),
  restart only on failure. Header carries the measured loop table.
- journey-runner.js: combobox steps wait on page state; the toggle is
  scoped to the named widget (it opened the page's first combobox).
- page-audit.js: click the first nav copy a user can click (a collapsed
  sidebar covered .first()); write page-audit-look-order.txt, all pages
  worst first.
- design-audit.js: drop the fixed 1.2 s wait.
- ui-loop.md / module-review.md: warm-loop table; order, not selection.

Field run 2026-10-07, existing app: same 7-step journey 56 s fixed vs
24 s settle, 11/11 pass both, 3 runs each; reload --skip-check 93 s vs
restart 179 s; run --local --watch ~18 s per page change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw
journey-runner.js now requires settle.js; the two fixtures that copy the
engine into a scratch project listed the files by hand and missed it, so
the require failed (MODULE_NOT_FOUND) before any assertion ran.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw
…ilds once

- A live `mxcli run --local` (its .mxcli/run-local.json beside this project's
  .mpr, pid alive) is now published as APP_OWNERSHIP=verified, APP_SOURCE=run-local
  instead of an unverified port-scan hit the e2e harness refuses.
- Staleness knows the loop: with --watch a model edit reads "watch" (ready),
  without it "APP UP BUT STALE - restart with --watch".
- Two-tree checkouts (app/X.mpr, with or without a root symlink) are resolved.
- docker path uses `docker run --wait` instead of the 240s poll; --restart no
  longer runs the build twice.
- Fixture tests/wave2/test-stack-up-local.sh over a golden captured from a real
  run and value-scrubbed (field run 2026-10-07, existing app).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw
check-portability flagged the hard-coded python3; use "$PY" like the other fixtures.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw
…l reads newer

CI T3 failed: the handshake write and the model touch landed in one clock tick, so
find -newer saw no edit (reproduced 35/50 locally). The handshake is now dated
between the model and the case's edit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw
@MendixMau
MendixMau changed the base branch from perf/faster-ui-loop to master October 7, 2026 14:58
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw
MendixMau added a commit that referenced this pull request Oct 8, 2026
Squash of integration/2026-10-08, which merges:

- #225 perf(ui-loop): test-stack-up.sh recognises a live mxcli run --local
- #231 fix(sync): sync-project.sh no longer exits 1 silently before its bin/ refresh
- #242 fix(init): local by default, no Dev Container
- #243 docs(lint): process/lint-backlog.md, the lint rollout plan
- #247 new(lint): the lint gate keeps a ledger
- #249 learn(test): skills/e2e-locators-that-lie.md
- #250 learn(skills): unhappy-path-testing.md
- #251 fix(testing-shape): mxcli test --local shares the deploy directory (#230)
- #252 fix(obligations): LOOK staleness reads the newest VALID AT stamp (#155)
- #253 docs(lint): quality-source review, Batch 4 backlog rows and skill additions
- #254 fix(lint): CONV020 works out of the box, page navigation counts as feedback (#229, #245)
- #255 fix(e2e): journey-runner rung 2 runs for a negative-only span claim (#150)
- #256 fix(gates): Stage 6 Surface, source-sufficiency title, ${JOURNEY_DIR} manifest token (#233, #234, #235)

Verified on the branch: tests/run-tests.sh 33/0, tests/test-lint-delivery.sh ALL GREEN, tests/wave2 73/75 (two environmental), render-routing --check, check-scripts, check-portability, leak guard, check-no-private-citations, check-pr-discipline all clean; scaffold smoke run without crashes.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw
@MendixMau

Copy link
Copy Markdown
Owner Author

Merged into master via integration PR #258 (squash 9dd9be4), on the maintainer's approval. Closing this PR; its branch is part of that squash.


Generated by Claude Code

@MendixMau MendixMau closed this Oct 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants