Repository navigation
fix(exec): restore whitespace-only units after a write, before the gate (port of #593, reduced scope) - #606
Merged
Merged
Conversation
exec.sh runs model-scope.py restore after the write (MDL and --patch) and before the mxbuild gate, so the gate checks the final model. A scope: note goes in the BUILD-LOG row. The step never blocks: MXTK_NO_SCOPE=1 skips it, and it is skipped when FORCE_EXEC let the write run over uncommitted model changes. Ported from #593 onto current master with the maintainer's reduced scope: - The pre-commit hook refusal (marker v2) and its --check staleness report are dropped. Hook section E of test-model-scope.sh goes with them. model-scope.py check --staged stays available by hand. - The exec.sh conflict was resolved onto master's BUILD-LOG line, which now also carries ${SCOPE_NOTE}. The noise source is fixed upstream in mxcli v0.29.0 (ako/mxcli#1506). Re-running the #1596 rename on the real binaries, classified by master's model-scope.py: v0.28.0 gives 1 real and 2 noise units, v0.29.0 gives 1 real and 0 noise. So this step is insurance for projects on mxcli <= v0.28. test-model-scope.sh: 50 pass / 1 fail on the port; master's exec.sh gives 43 / 8. The one failure on both is the section C partial-restore case, which can't fail under root (chmod 0555 does not stop root). It already fails on master here, so it is an environment artifact. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018LeNWZV2sVH62vkgfYh5u5
Closed
5 tasks done
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.
Supersedes #593 by @saingge, with the maintainer's decision on that PR (option 2, narrower). saingge is the commit author.
Direct lane
What changed and why: after the write (MDL and
--patch) and before the mxbuild gate,exec.shrunsmodel-scope.py restore(already on master). Units that changed only in XPath whitespace go back to HEAD with their ContentsHash rows updated, so the gate checks the final model. Ascope:note goes in the BUILD-LOG row. The step never blocks: a failure is a warning,MXTK_NO_SCOPE=1skips it, and it is skipped whenFORCE_EXEClet the write run over uncommitted model changes.Dropped from #593, by decision: the pre-commit hook refusal (marker v2),
--checkreporting v1 hooks as stale, and the hook tests (fixture section E).model-scope.py check --stagedstays available to run by hand. So no synced project gets a new commit-time refusal.Research: is it still needed on mxcli v0.29? I re-ran the #1596 rename on the real public binaries, on the fixture model with the golden capture's steps, and classified the result with master's
model-scope.py:So the step is insurance for projects on mxcli ≤ v0.28 and a no-op on v0.29.
project-bin/exec.sh: one step after the write and before the gate, plus${SCOPE_NOTE}in the BUILD-LOG cell. The conflict was resolved onto master's current BUILD-LOG line (timestamp fast path kept), and #603's hash verify is untouchedmodel-scope.py restoreper exec on a committed model (one Python start plus a git diff). Not measured on Windows: a reviewer itemRe-verified on master 0db1c0e:
test-model-scope.shpasses 50/1 here and 43/8 against master'sexec.sh(section F: 7 new failures). The single failure on both is section C's partial-restore case:chmod 0555cannot stop root, and this container runs as root. It fails identically on master's own fixture here, so it is an environment artifact, not this change. CI runs it as non-root.Review: pending independent review
Generated by Claude Code