Conversation
…duction The mxbuild delta gate previously kept a write only when the post-exec error set matched the pre-flight baseline exactly. A script that took 34 pre-existing errors down to 1 was rolled back and logged "blocked: PRE-EXISTING CE1613", because the gate had no way to recognise "reduced" as distinct from "unchanged but different." Adds a bash-native is_subset_of() helper (no new Python call, no new comparison key — reuses err_set()'s existing per-message string) and classifies the post-exec set as identical / subset / reject. Only a set containing something genuinely NEW still triggers the snapshot restore. The kept-write BUILD-LOG row for the reduced case now reads "applied (dirty model, reduced)" with the before->after counts and remaining codes in the detail column. Also documents (header comment + README's crash-net paragraph) that exec.sh refuses to run while the model has uncommitted changes, since the delta-gate change touches the same header block. Verified against a scratch harness (not committed) using the real extracted err_set/err_codes/is_subset_of functions fed two synthetic mxbuild error-JSON fixtures: 34->1 subset accepted, 34->35 (one new code) rejected, plus guard cases for the identical-set and empty-set paths. No real .mpr/mxcli/mxbuild was exercised. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw
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.
What changed and why (one paragraph)
Field report from a colleague's naming-conventions change (mxcli v0.23.0): a script that took 34 pre-existing mxbuild errors down to 1 was rolled back by
project-bin/exec.shand loggedblocked: PRE-EXISTING CE1613, because the delta gate could only recognise "identical to baseline", never "reduced". The gate now keeps the write when the post-exec error set is the baseline exactly OR a strict subset of it (nothing new); any set containing a new message still restores the snapshot as before. The comparison key is unchanged (err_set's per-message string); a bash-nativeis_subset_ofhelper (bash 3.2 safe, no arrays) does the membership test. The reduced case logs⚠️ applied (dirty model, reduced)witherrors 34→1 (pre-existing, reduced); remaining [...] still blocks deploy. Doc-only: the exec.sh header and the README crash-net paragraph now say out loud that exec.sh refuses to run on uncommitted model changes and why, withFORCE_EXEC=1as the override (field item T3, "by design but undocumented").Assessed, not built: T2 (script-header declaration to skip the pre-check for
rename modulescripts) — no header-parsing mechanism exists;SKIP_CHECK=1remains the sanctioned override. T4 (.gitignoreignoring all of.claude/) — the toolkit's own scaffold does not do this; root cause is external, needs a maintainer call.Field evidence
err_set/err_codes/is_subset_offunctions over synthetic mxbuild JSON: 34→1 subset accepted, 34→35 (one new code) rejected, identical and empty sets pass, 8/8. Positive control: the pre-fix logic rejects the 34→1 case, matching the report.bash -nclean; check-portability, check-scripts (95/95), leak guard, pr-discipline all pass.tests/wave2/test-bug07-08.shinspected: all 10 cases useSKIP_BASELINE=1, so the subset branch is never reached; unaffected.Checklist
🤖 Generated with Claude Code
https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw
Generated by Claude Code