Skip to content

fix(exec): per-step seconds in the run summary and BUILD-LOG, gate seconds kept on a failed gate (409a) - #413

Merged
MendixMau merged 3 commits into
masterfrom
feat/exec-step-timing
Oct 16, 2026
Merged

MendixMau merged 3 commits into
masterfrom
feat/exec-step-timing

Conversation

@MendixMau

@MendixMau MendixMau commented Oct 16, 2026 •

Copy link
Copy Markdown
Owner

Direct lane

What changed and why (one paragraph):
exec.sh now prints and logs per-step seconds: steps: guards Ns check Ns snapshot Ns baseline Ns exec Ns gate Ns lint Ns score Ns in the run summary and at the end of the BUILD-LOG detail cell. Before this, a row carried only the run total, so nobody could say where a 28 to 41 s exec went. The gate mark is taken straight after the mxbuild run, before any pass or fail branch. In the first version (in #409) gate was marked only inside log_applied, so every rolled-back or failed-gate row lost its gate seconds; in the lab those are 47 of 238 rows, the costliest 20%. Split out of draft #409 (first of three) so that both arms of the test-strategy A/B log the same steps: cell.

Impact

Row Answer
Process none. No new step, gate, blocking path or artifact. One extra cell in the BUILD-LOG detail.
Dependencies Shared file: project-bin/exec.sh (marks only; no behaviour change). Parsers that read the BUILD-LOG detail: grepped bin/ and project-bin/, none reads the detail by position, and the new cell is last. No new artifact reads. Independent of the --subjects PR (b); both prepend a CHANGELOG line, so the second to merge needs a trivial CHANGELOG rebase.
Context cost none: no routed or always-loaded file touched
Behaviour n/a: scripts only
Runtime 8 to 9 date +%s calls per exec. Measured: one call takes 22.8 ms under bash 3.2, so about 0.2 s per exec, 0.5 to 0.7% of a 28 to 41 s exec.

Field evidence: the per-step split and the failed-gate loss were measured on a five-app lab project (Mendix 11.15, mxcli v0.26.0, 238 BUILD-LOG rows).

  • No client data anywhere in the diff
  • Size cap: 2 files, 111 lines (17 code, 94 test), plus CHANGELOG
  • Test tier: T1, scoped fixture. tests/wave2/test-exec-step-times.sh 7/0 on this branch, 4 pass and 3 fail on master's exec.sh (summary steps line, BUILD-LOG steps cell, failed-gate row). It covers a passing and a gate-failing --patch run. Existing: test-exec-change-class.sh 21/0, test-exec-lock-watch.sh 84/0, test-manifest-clean-checkout.sh 1/0. Only macOS was run; Git Bash was not.
  • CHANGELOG.md line, credited
  • Categorisation: kind fix · lane Direct · size S · regression risk low · toolkit change, not an upstream mxcli bug

🤖 Generated with Claude Code

…conds kept on a failed gate

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MendixMau added a commit that referenced this pull request Oct 16, 2026
…ection gaps closed (409b) (#416)

Independent review: APPROVE.

# Review #416, round 2 (delta): affected-tests, advisory

Reviewed 2026-10-16 at head `8dc6eca2` (previous review `b91faaf6`, see 416.md). Detached worktree `/tmp/rv-416b`, read only, removed after. No GitHub comment. The delta is one fix commit plus a merge of origin/master. The merge brings in #407 (lint-gate); against origin/master the PR's own file list is unchanged.

## The four points

| # | Point | Status | Evidence |
|---|---|---|---|
| 1 | Unmapped count counts every `journeys/` file not named `<Module>.journey.json` | **Fixed** | A file in `journeys/` now counts as mapped only when its stem is one identifier (`*[!A-Za-z0-9_]*` falls through to the content check). The new test file `journeys/Shop.admin.journey.json` names nothing, and the row expects `2 of 6`. Mutation: with the old blanket `continue` put back, `A unmapped` fails (62/1). Not done, and optional: checking the stem against the modules the model knows. |
| 2 | NOT MEASURED rows for module role, user role, constant | **Fixed** | exec.sh emits `userrole` for CREATE/ALTER/DROP USER ROLE. affected-tests adds `role`, `userrole` and `constant` to the data set. A user role is kept out of the module list and gets its own "access change, no owning module" text. Test J covers all three, plus ALTER and DROP, and checks that `Admin` is never read as a module. Minor, not blocking: `create or modify user role Admin (...)` still gives `unmapped -` (the USER check reads token 2 only). This matters only if that form is valid MDL. |
| 3 | Catalog freshness | **Fixed (evidence plus a guard test)** | `CAPTURE-FRESHNESS.txt` on v0.26.0: 4 callers, then an exec adds `ZZ_Probe_Caller`, then the catalog rebuilds (21 flows, 507 refs) and the call lists 5, the new one at depth 1. The capture is condensed, not a byte-verbatim paste. Test K uses a stub whose output follows the .mpr: K1 lacks the new caller and K2 lists it. Mutation: a stub that ignores the .mpr (a stale catalog) makes `K2 stale` fail (62/1). K also checks that the script keeps no cache file. Limit: an offline test cannot prove that mxcli's own catalog is fresh. The capture covers that, and the header now states it. |
| 4 | Text fixes | **Fixed** | Header timing is now 19 s / 3 s, matching the PR. Step order is 1 to 6. The PR body's size line says "over" with the reason (541 lines, script and tests ship together). CHANGELOG entry updated. Cosmetic: header line 42 now runs past the wrap width. |

## Still advisory

- affected-tests exits 0 (2 on usage) and runs no test. The `run` rows are text.
- exec.sh delta is a comment and one awk line inside `mxtk_subjects` (the `--subjects` path only). Exec exit codes are unchanged. The hint line is untouched.

## Checks

- `test-affected-tests.sh` 63/0, `test-exec-subjects.sh` 6/0 (`/bin/bash` 3.2).
- `check-pr-discipline.sh origin/master`: clean.
- Side note, not this PR: running the uninstalled script from `/tmp/rv-416b/project-bin` on a scratch dir with no project resolved `PROJECT_ROOT` through `_common.sh` and walked a large tree with `find` (killed). This is installed-layout behaviour that predates this delta.

## Verdict

**APPROVE**

Land after #413. The CHANGELOG line may need a rebase.
@MendixMau
MendixMau merged commit fb58cee into master Oct 16, 2026
2 checks passed
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.

1 participant