Repository navigation
Conversation
…m IO_PathNotFound, headless test runs) Rebuild in the test runner's app called serve.Build directly, so the recovery that run --local --watch has never ran for test --watch: the second build of a serve process fails on regenerated pages (mxbuild 11.15 macOS reports IO_PathNotFound_Path, not the English text) and every later change reported 'could not be applied'. Route through serveRecovery, match the key form, and skip the web/dist completeness restart (headless) . Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 191261bcfa68e22f6915084f0553880d08cecbff) (refs mendixlabs#1786)
…OS/Linux key-form failure Two gaps in existing coverage for the test --watch build-recovery fix: - serveRecovery.headless must skip the prebuilt-bundle restart entirely (only a browser-facing client cares about a lost dist/pages). - missingClientDirs must recognize mxbuild's resource-key form of the same failure (IO_PathNotFound_Path, measured on 11.15.0 macOS) as well as the English-text form, including when the directory exists but the specific file mxbuild wants does not. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This branch has not been deployed
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.
Closes #1786
Why
mxcli test --local --watchkeeps onemxbuild --serveprocess alive forthe whole watch session and rebuilds through it on every change — a test
file edit or a model change.
run --local --watchhas had build-failurerecovery (restart the serve process, rebuild once more) for a while;
test --watchnever had it wired in. On macOS (mxbuild 11.15.0), thesecond build in a serve process fails on regenerated page/layout files,
and mxbuild reports that failure by resource key
(
IO_PathNotFound_Path) rather than the English text the existingrecovery matches — so every model change after the first in a
test --watchsession reportsERROR the change could not be appliedand theloop never produces a verdict again.
What changed
localapp.go: routetest --watchrebuilds throughserveRecovery(the same mechanism
run --local --watchalready uses), in headlessmode.
webclient_legacy_paths.go: recognize the resource-key form of thefailure (
IO_PathNotFound_Path) alongside the existing English-textmatch, including when the target directory exists but the specific file
mxbuild wants does not.
serve_recovery.go: aheadlessflag — nothing serves the client in atest run, so an incomplete
web/distafter an otherwise-successfulbuild is not a defect worth another restart+rebuild (that restart exists
only for
run --local --watch's browser-facing client).How tested
Unit tests for the two previously-untested edges this change exercises:
TestServeRecovery_HeadlessSkipsPrebuiltRestartTestLegacyClientBuildHintRecognizesMacOSKeyFormTestLegacyClientBuildHintMacOSKeyForm_DirExistsFileMissingFull
cmd/mxcli/dockerpackage suite: 2 failures, both pre-existing andunrelated to this change —
TestSyncJavaDependencies_ReturnsWhenOrphanedDaemonHoldsPipeand
TestSyncJavaDependencies_FailingMxStillFails, exercising theorphan-pipe/Gradle-daemon watchdog in
javadeps.go(a file this PR nevertouches; diff is
localapp.go,serve_recovery.go(+test),webclient_legacy_paths.go(+test) only). Confirmed environment-only:setsidis absent on this machine (the fake-mxtest script needs it),and the same test fails identically against vanilla
origin/mainatf99080e93with zero code from this PR applied (15.01s, same message).Real-app repro and numbers
Against a copy of a real ~280MB Mendix app (
~/mta-lab/w/w2test, a copy ofsl1, 13 tests across 2.test.mdlfiles):@expectACT_Invoice_Paypay-guard removal)These are correctness numbers, not a speed claim: the machine was under
heavy concurrent load (other sessions) for this run. The property being
proven is that the model-bug step gets a verdict at all — before this
fix, that exact step errors with "could not be applied" every time on
macOS and the watch loop is stuck for the rest of the session.
Regression evidence
@expect→ red. Revert → green. (test-file-only loop, unaffectedby this change, included as a control.)
SIGINTand restores the project.Known limitation
This recovers from the build failing in the prebuilt-client shape. If
mxbuild --serveitself dies (not just a failed build),test --watchstill needs a full session restart — out of scope here, which only wires
the existing
run --local --watchrecovery machinery into the pathtest --watchnever had it on.Checklist
real-app ABAB and 5 applicable negative controls
flag or doc change needed
Marked as draft until CI confirms green (the 2 pre-existing, unrelated
dockerpackage failures are documented above with cross-branch proof).🤖 Generated with Claude Code