Run the MATLAB re-open gate, and cover ValueType with it - #34
Merged
Merged
Conversation
The gate infrastructure already existed - matlabAssertRoundTrip plus verify_roundtrip.m, gated on DEX_MATLAB_CMD - but the bus-element enum cases had never executed, and the Simulink.ValueType value properties had no live case at all. So the newly editable properties were verified only in-process: serialize, re-parse with our own reader, agree with ourselves. Adds VALUE_TYPE_CASES (Min/Max, and Complexity/DimensionsMode) and records the result of actually running the file against MATLAB R2027a Prerelease: 32/32 PASS, both .sldd formats. Two things that no in-process test could establish: - The enum casing is MATLAB's own and it loads: 'complex' lower-case, 'Variable' capitalised. MATLAB refuses the other spelling of each, so a writer that normalised the case would have produced a file MATLAB cannot open - and our own parser would have read it back happily. - A zero Min is written as a real 0 rather than dropped as falsy, which is why the case uses 0 and not a tidier number. Properties are grouped two per case because each `it` costs a MATLAB launch while verify_roundtrip.m already reports PASS/FAIL per key, so grouping halves the wall clock without losing attribution. MATLAB_TIMEOUT goes from 120s to 300s. The old value was measured against a local MATLAB (~21s a launch); on a network sandbox the cold launch takes 276s and the first in-suite launch 160s, so the first test of every run would have failed as a timeout and hidden whatever MATLAB was about to say - the exact failure the constant exists to prevent. Both machines' measurements are now in the comment. The full file was run unfiltered as a regression check, not just the eight new cases: this branch's parent moved _rejectUnknownEnumeral and the Min/Max normalizer up into DataNode, which the Parameter and Signal write paths also use, and a regression there would surface in the pre-existing value-corpus cases.
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.
The one gap the schema-parity change left open (#33): the newly editable properties were
verified in-process only — serialize, re-parse with our own reader, agree with ourselves.
The gate infrastructure already existed (
matlabAssertRoundTrip+verify_roundtrip.m,gated on
DEX_MATLAB_CMD). What was missing was that the bus-element enum cases had neverexecuted, and
Simulink.ValueTypehad no live case at all.Result: 32/32 PASS
MATLAB R2027a Prerelease 27.1.0.3393633, both
.slddformats.MyBuselementComplexity=complexMyBuselementDimensionsMode=VariableMyValueTypeMin= 0,Max= 100MyValueTypeComplexity=complex,DimensionsMode=VariablePlus the 24 pre-existing value-corpus cases, run as a regression check rather than for
novelty: #33 moved
_rejectUnknownEnumeraland the Min/Max normalizer up intoDataNode,which the
Simulink.ParameterandSimulink.Signalwrite paths also go through, so aregression would surface there and nowhere else.
What the gate settles that no in-process test could
'complex'lower-case,'Variable'capitalised. MATLAB refuses the other spelling of each, so a writer that normalised the
case would have produced a file MATLAB cannot open, and our own parser would have read it
back happily. This was the standing risk on the whole change.
Minis written as a real 0, not dropped as falsy. Hence 0 in the case ratherthan a tidier number.
A timeout bug fell out of running it
MATLAB_TIMEOUTwas 120s, measured against a local MATLAB (~21s a launch). On a networksandbox: 276s genuinely cold, 160s for the first in-suite launch, 18–33s warm. At 120s the
first test of every run fails as a timeout and hides whatever MATLAB was about to say — the
exact failure the constant was introduced to prevent. Raised to 300s with both machines'
numbers in the comment.
Reviewing the file would not have found this; 120s is not wrong in general, only for a
network install.
Notes
test/parity/artifacts/and itsdrift.mjscontract are untouched.npm testunchanged at 4856 passing (the live file is env-gated and stays skipped).dist/change: only a.mdand two test files.