Repository navigation
refactor(app-restart, test-scratch): share the mxtest guard and mxcli-run pid check via _common.sh - #370
Closed
MendixMau wants to merge 1 commit into
Closed
refactor(app-restart, test-scratch): share the mxtest guard and mxcli-run pid check via _common.sh#370MendixMau wants to merge 1 commit into
MendixMau wants to merge 1 commit into
Conversation
…-run pid check via _common.sh mxtest_after_startup, mxtest_left and mxtest_refusal were duplicated in project-bin/app-restart.sh and project-bin/test-scratch.sh. They now live once in project-bin/_common.sh. The copies differed only in a refusal branch that test-scratch never takes; the tool-name argument still selects it, so each script prints byte-for-byte what it printed before. pid_is_mxcli_run (app-restart.sh) becomes mxtk_pid_is_mxcli_run on mxtk_pid_args: Linux matches a whole `run` argument after mxcli, macOS keeps the joined ps line, Windows keeps the tasklist image check. Both scripts exit 2 with the sync remedy when the installed _common.sh predates the move; one fixture case each. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw
MendixMau
pushed a commit
that referenced
this pull request
Oct 14, 2026
…rd and mxcli-run pid check via _common.sh Review: independent review MERGE at bbc67b0 — moved helpers byte-identical to both originals (76 lines); stricter Linux pid match verified against ./mxcli run --local, -p X.mpr run --local, env prefixes, exec wrappers, absolute paths; older-_common.sh guard cannot fire on a synced project; extract-by-function fixtures unaffected. Fixtures: app-restart 69/0, test-scratch 51/0, shared-lock-takeover 6/0, stack-up-local 60/0, common-windows 10/0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw
Merged
5 of 7 tasks
MendixMau
added a commit
that referenced
this pull request
Oct 15, 2026
…journey controls, fixes) (#385) Lands #340 #363 #362 #355 #370 #368 #364 #365 #366 #372 #367 #371 #376 #369 #373 #377 #378 #380. Review: each constituent PR independently reviewed by a fresh agent that did not write it; merged into integration/2026-10-15 only on a MERGE verdict with green CI (per-PR Review lines in the integration merge commits). After-fix rounds: #373 (env-var cap, rename/skip-loops freshness), #377 (inline URI fallback), #378 (full-pack double count, slice content). Stub diet (#369/#378/#380) behaviour A/B, 5 reps x 2 drafting tasks + 5 retrieval probes x 3 reps: trimmed context no worse than master on every scored metric (planted STOP refused 20/20, parse failures page 2/5 vs 3/5, probes 15/15); mdl Stage 5 56,236 -> 30,647 words, baseline 75,028 -> 73,233. Full suites on c9bc073: run-tests 33/0, wave2 111 fixtures 0 failing. Field evidence: none yet for the instruments (#355 warn-only, #373/#377 read-only). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw
Owner
Author
|
Landed on master in #385 (squash Generated by Claude Code |
MendixMau
pushed a commit
that referenced
this pull request
Oct 15, 2026
_common.sh: end-of-file conflict with the mxtest helpers (#370), both sections kept. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw
4 of 5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Direct lane
What changed and why (one paragraph):
mxtest_after_startup,mxtest_leftandmxtest_refusalwere copied into bothproject-bin/app-restart.shandproject-bin/test-scratch.sh. They now live once, in a new section at the end ofproject-bin/_common.sh. The backlog said the two copies differed by the "Otherwise restore it" echo. In fact both copies print that line. The real difference is app-restart'selsebranch (the "stop the live app with Ctrl+C" advice), which test-scratch never reaches because it always passestest-scratch. The existing tool-name argument already selects that branch, so no new parameter was needed. The shared function's refusal text is byte-identical to each old copy: I checked it for both callers with HEAD set to?, empty and a microflow name.pid_is_mxcli_run(app-restart) becomesmxtk_pid_is_mxcli_run, built onmxtk_pid_args:/proc:runmust be a whole argument after one that names mxcli. An argument that merely contains " run " no longer counts, which is the one intended tightening./proc: the joinedpsline is matched as before.tasklistimage-name check is kept, so there is no PowerShell call per check.Both scripts now stop with exit 2 and the
sync-project.sh --upgrade-bin _common.shremedy when the installed_common.shpredates these helpers. This follows the existingmxtk_port_holderguard pattern. Each fixture gets one new case for this guard. The test-scratch case fails 3/3 against master's script, which shows it tests the guard.bin/lib/install-manifest.shand sync need no change: both files are already inMXTK_PROJECT_BIN, an unedited_common.shis refreshed through past-stock, and a hand-edited one holds back its callers (BIN_HOLD). The guard covers what is left.Item 6 (mxtest/pid half) of the 2026-10-14 engineering backlog review. The lock half (
holder_live/take_over) is a separate PR.Field evidence — none yet. This is a behaviour-preserving refactor of existing instruments. The fixture outputs on the existing cases are identical to master's (a line-by-line diff of the ok/FAIL lines, with pids and ports normalised):
test-app-restart: 64/0 on master → 69/0 (64 identical + 5 new)
test-test-scratch: 46/0 → 51/0 (46 identical + 5 new)
test-shared-lock-takeover: 6/0 → 6/0
test-stack-up-local: 60/0 → 60/0
test-pipefail-grep-q 3/0 and test-common-windows 10/0 also pass; both scan or source
_common.sh.No client data anywhere in the diff
Size cap: 6 files, ~350 lines changed, most of it a move
Test tier reached: T1. Fixtures above, plus a Linux probe of
mxtk_pid_is_mxcli_runagainst real processes (mxcli run --local→ 0,mxcli "do run x"→ 1,mxcli test→ 1; macOS path forced: joined-line behaviour unchanged). No macOS or Git Bash run.For a changed instrument: no new parser, so no golden capture needed; layouts unaffected (no path logic changed); Windows branch kept verbatim
For a new skill: n/a
CHANGELOG.mdline appended, crediting the sourceNew bug entries: n/a
Checks:
render-routing --checkin sync, baseline 75,028 words before and after (budget 80,000);check-scripts110/110;check-portabilityclean; leak guard clean;check-no-private-citationsclean;check-pr-disciplineclean.🤖 Generated with Claude Code
https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw
Generated by Claude Code