Skip to content

fix(exec): keep the gate's full mxbuild output in a per-run log - #452

Merged
MendixMau merged 13 commits into
release/v1.0from
fix/gate-full-log
Oct 17, 2026
Merged

MendixMau merged 13 commits into
release/v1.0from
fix/gate-full-log

Conversation

@MendixMau

@MendixMau MendixMau commented Oct 16, 2026 •

Copy link
Copy Markdown
Owner

Problem

exec.sh printed head -20 of mxbuild's output and deleted the rest with its temp file, so the evidence of a failed gate (the detail of a CE1613 among it) was lost. In a field migration project (12 modules), every one of the 17 "gate could not run" rows and at least 1 real CE failure had no output left to read, which cost about 20 minutes of blocked reruns.

Refs #442, #448, #171, #285, #424

Change

  • project-bin/exec.sh: when the gate does not end clean (non-zero exit or a non-empty errors file) the full mxbuild output is written to .mpr-snapshots/mxbuild-logs/<timestamp>-<pid>.log. That dir is git-ignored by snapshot-mpr.sh, and its name does not match the [0-9]* pattern restore_snapshot uses, so a rollback never touches it. The newest 30 logs are kept.
  • The screen keeps the top lines and adds full mxbuild output: <path>; the BUILD-LOG row detail ends with mxbuild log: <path> (the detail column is free text, so the row format is unchanged).
  • CHANGELOG entry.

Test

New tests/wave2/test-exec-gate-log.sh (stub mxcli, mxbuild, java; no real mxbuild): A) a failing gate with 41 lines of output leaves a log holding all of it, the screen shows no tail and names the path, the row names the path, and the rollback still applies; B) a clean run writes no log and no note; C) 35 old logs plus one new are pruned to 30. 11 of 11 pass. Existing test-exec-crash-rollback.sh (13) and test-exec-lock-watch.sh (84) pass. check-pr-discipline.sh and check-portability.sh (changed files) are clean.

Risk

  • A failed gate writes one log file (size of mxbuild's output); clean gates write nothing.
  • Touches the same BUILD-LOG detail line as the watcher PR (fix/gate-watcher-race); a one-line rebase conflict is possible.

🤖 Generated with Claude Code

MendixMau and others added 2 commits October 17, 2026 00:38
… on an infra exit

The gate's mxbuild and a live `mxcli run --local --watch` both write deployment/.
In a field migration project (12 modules) 17 of 27 failed gates were "gate could
not run" (mxbuild exit 1, no CE code), against 0 of 22 in watcher-free copies.

The watcher of this project is stopped for the gate and resumed after (and in the
EXIT trap). An exit 1 or 3 with no CE code and no errors file is retried once and
logged as "retry after infra exit". A final failure still takes the #424 rollback.

Refs #441, #442, #171, #285, #424

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
exec.sh printed head -20 of mxbuild's output and deleted the rest, so the detail
of a failed gate was lost in a field migration project (12 modules). A gate that
does not end clean now writes .mpr-snapshots/mxbuild-logs/<run>.log (newest 30
kept); the screen shows the top lines plus the path and the BUILD-LOG row ends
with "mxbuild log: <path>".

Refs #441, #443, #171, #285, #424

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MendixMau
MendixMau changed the base branch from master to release/v1.0 October 17, 2026 06:49
MendixMau and others added 11 commits October 17, 2026 14:52
…check

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…a killed exec.sh

The watcher match is now an equality test on the resolved project dir, so a sibling
copy or a nested worktree watcher is no longer paused. The paused pids are recorded in
.mpr-snapshots/.watcher-paused; the next exec.sh resumes them once it holds the lock.
CHANGELOG ref corrected to #444.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Conflicts kept on both sides: the new GATE_NOTE and MXB_LOG_NOTE variables, the BUILD-LOG
detail line (retry note, then log note) and the CHANGELOG top lines.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… kill) into fix/gate-full-log

CHANGELOG: kept both top lines.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…re stopping

ps drops the quotes around -p, so the path was cut at the first space and a
duplicated folder named "<proj> copy" matched this project. Keep the longest
run of words that exists on disk instead. Write the pause record before the
SIGSTOP loop so a kill in between cannot leave an unrecorded stopped watcher.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts:
#	CHANGELOG.md
#	project-bin/_common.sh
#	project-bin/exec.sh
past-stock only reads non-merge commits, so a version that only a merge
produced read as locally edited and O6 failed on any branch that merged
its base in.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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