Repository navigation
fix(exec): keep the gate's full mxbuild output in a per-run log - #452
Merged
Merged
Conversation
… 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>
# Conflicts: # CHANGELOG.md
# Conflicts: # CHANGELOG.md
…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
# 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>
MendixMau
added a commit
that referenced
this pull request
Oct 17, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 19, 2026
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.
Problem
exec.shprintedhead -20of 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 bysnapshot-mpr.sh, and its name does not match the[0-9]*patternrestore_snapshotuses, so a rollback never touches it. The newest 30 logs are kept.full mxbuild output: <path>; the BUILD-LOG row detail ends withmxbuild log: <path>(the detail column is free text, so the row format is unchanged).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. Existingtest-exec-crash-rollback.sh(13) andtest-exec-lock-watch.sh(84) pass.check-pr-discipline.shandcheck-portability.sh(changed files) are clean.Risk
fix/gate-watcher-race); a one-line rebase conflict is possible.🤖 Generated with Claude Code