Repository navigation
new(testing): affected-tests.sh and exec.sh --subjects, advisory, selection gaps closed (409b) - #416
Merged
Merged
Conversation
…h the three selection gaps closed Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…for roles and constants, prove callers are fresh after an exec Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MendixMau
added a commit
that referenced
this pull request
Oct 16, 2026
…conds kept on a failed gate (#413) Independent review: APPROVE. # Review #413 (409a): exec.sh per-step seconds, gate seconds kept on a failed gate Reviewed 2026-10-16 at head `f118bb0f` (base `1ed7c99a`), detached worktree `/tmp/rv-413`, read only. No GitHub comment. ## What it does `step_done <name>` appends `<name> <s>s` since the last mark. Eight marks: guards, check, snapshot, baseline, exec, gate, lint, score. The run summary prints `steps: ...` on success. `log_build` appends `· steps: ...` as the last item of the BUILD-LOG detail cell. The `gate` mark sits right after the mxbuild call, before the pass and fail branches. That covers big-topics T1 finding (a). ## Checks | Check | Result | |---|---| | Test fails on master | `test-exec-step-times.sh`: branch 7/0, master's exec.sh 4/3 (summary line, BUILD-LOG cell, failed-gate cell). Confirmed. | | Failed-gate timing | The failed `--patch` row carries `... exec Ns gate Ns`. MDL gate-fail rows (exec.sh 1700 to 1716) and PARTIAL rows sit after the same mark, so they get it too. | | Early-exit paths | Blocked rows before the guards (scan, commit-first, dirty model) have no cell, because STEP_TIMES is empty. The pre-exec check failure logs `guards Ns`. Ctrl-C writes no BUILD-LOG row on master either (the EXIT trap only releases the lock), so nothing regresses. | | Gap | `❌ patch failed` / `❌ patch refused` rows (exec.sh 1429, 1517) log before `step_done exec`, so they lose the patch run seconds. Non-blocking. | | Readers | `status.sh` reads columns 3 and 4 only. `done-drift-check.sh` greps the script name. `metrics-ledger.sh` takes args from exec.sh and does not parse the detail. The new text is last in column 6 and has no `\|`. No reader breaks. | | Bash 3.2 | Test 7/0 with `/bin/bash` 3.2.57 first on PATH. | | Neighbours | `test-exec-change-class.sh` 21/0, `test-exec-lock-watch.sh` 84/0. `test-exec-hash-verify.sh` 42/1 (case K). The same case fails on master, so it predates this PR. | | Conflict with #416 | `git merge-tree`: exec.sh auto-merges, CHANGELOG.md conflicts. The merged exec.sh passes both PRs' tests (7/0 and 6/0). | | Hygiene | No client names. CHANGELOG line present. 17 code + 94 test lines, under the size cap. CI authoring-audit green. | ## Impact block (RELEASE-PROCESS 4a) | Row | Verdict | |---|---| | Process | Confirmed: none. | | Dependencies | Confirmed. exec.sh is shared. The detail-cell readers were checked above. | | Context cost | Confirmed: none. | | Behaviour | Confirmed: n/a, scripts only. | | Runtime | **Corrected.** The PR calls the cost "unmeasurable". Measured here: one `date +%s` takes 22.8 ms under bash 3.2 on this Mac (90-call loop). Nine calls add about 0.2 s per exec, 0.5 to 0.7% of a 28 to 41 s exec. Small but real, and it runs on every exec in every project. Optional: use bash's built-in `$SECONDS` (works in 3.2, no fork) to make it about 0. | 5 of 5 rows confirmed or corrected. ## Non-blocking notes 1. Add `step_done exec` before the two patch-failure `log_build` calls (exec.sh 1429, 1517), so a failed patch logs how long it ran. 2. Put the measured 0.2 s in the Runtime row, or switch to `$SECONDS` and state 0. 3. On failure, the steps appear only in BUILD-LOG, not on the console. That is fine for E3 but worth one sentence in the CHANGELOG line, which says "run summary". ## Verdict **APPROVE.** Merge first, before #416. The second PR to land needs a CHANGELOG-only rebase.
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):
Split out of draft #409 (second of three; #413 is the first, the held docs PR is the third). Adds
project-bin/affected-tests.sh <script.mdl>, which prints the unit tests and journeys a change owes, andexec.sh --subjects <script.mdl>, which lists the elements a script writes (onekind Module.Name line Nrow each).testing-shape.md§3 described this subject set in prose only. The script takes the subjects from--subjects, gets their transitive callers (pages included on mxcli v0.26.0) from ONE batchedSHOW CALLERS OF ... TRANSITIVEcall, and lists the.test.mdlandjourneys/<Module>.journey.jsonfiles owed at the moment's scope, read from a PROJECT.md## Test strategyrow when there is one (defaults when absent, and it says so). Advisory only: exit 0, never runs a test, no doc says it is binding. exec.sh prints oneaffected tests:hint line per MDL run. The three selection gaps the review of #409 found are fixed here:journeys unmapped N of M: counts the journey files that name-based selection can never reach (not<Module>.journey.json, no qualifiedModule.Nameinside), so an empty journey selection is never read as "nothing owed".data NOT MEASUREDrow: cross-module use is not measured, only the owning module is selected.Caller depth stays configurable, default 1:
--depth N, orMXTK_AFFECTED_DEPTHfor the default. Depth 2 is decided later from the offline selection survey, not here.Impact
## Test strategyif present, but nothing writes that section until the held docs PR.project-bin/exec.sh(the--subjectsflag and hint line only) andbin/lib/install-manifest.sh(new project-bin entry; installed by sync). Independent of #413: that PR touches other parts ofexec.sh, so the two merge in either order and only the CHANGELOG line needs a trivial rebase for whichever lands second. Optional artifact read: PROJECT.md## Test strategy, producer is the CAC-5 Offer in the held docs PR; absent means defaults, stated in the output. Needs mxcli withSHOW CALLERS ... TRANSITIVE(v0.26.0 verified); without it the output sayscallers NOT MEASURED.Field evidence: a five-app lab project (Mendix 11.15, mxcli v0.26.0), scratch copy, three real change scripts: 2 to 55 subjects, 8 to 17 transitive callers, 0 to 1 unit test files and 0 to 1 of 20 journey files selected. 18 of its 20 journey files are named by app and role and 12 of 20 hold no qualified name, which is gap 1 and why the unmapped count exists. Golden callers output captured from mxcli v0.26.0 on a scratch copy of an empty Studio Pro 11.12 app (
tests/wave2/fixtures/affected-tests/CAPTURE.txt).tests/wave2/test-affected-tests.sh54/0 (13 pass and 41 fail with no script, as on master). Against process(testing): per-project test strategy; affected tests per change, full suite at deploy-ready #409's original script 48 pass and 6 fail: exactly the six gap checks (caller journey, unmapped count, env depth, data row for entity and enumeration, mixed script).tests/wave2/test-exec-subjects.sh6/0 (3 pass and 3 fail on master'sexec.sh). Existing:test-exec-change-class.sh21/0,test-manifest-clean-checkout.sh1/0. Only macOS was run; Git Bash was not.find_mprsupports root andapp/.CHANGELOG.mdline, creditedKnown and not fixed here: in a multi-app folder the script scans every app's tests and journeys and needs
MPR_FILE; module names can repeat across apps, so the selection over-reaches. That waits on the model key work.🤖 Generated with Claude Code