Surface eleven properties MATLAB models, and pin the rule that hid them - #33
Merged
Merged
Conversation
A parity pass against the MATLAB Data Explorer app found eleven properties MATLAB models that this package either dropped or never declared. Scoped to the schema and data model: no UI change. Three of the gaps were the same defect. schemaBridge.resolvePropForKey prefers a layout atom over the class's own schema descriptor; the atoms read node fields rather than the descriptor's sourcePath, and nothing checked that the node class declares the field. When it does not, the value is lost twice - the row renders blank, and toPIObject still adds the key to shownKeys, so buildOtherRows suppresses the raw property from "Other" too. - Simulink.ValueType: Min, Max and Unit reachable in both panes, including the serialized-key asymmetry MATLAB has (ValueType writes Unit; Parameter and Signal write DocUnits). - Simulink.BusElement: the real / Fixed display defaults MATLAB shows, with a silent element still gaining no key on save. - Simulink.EnumType: IsTunableInCode. - Simulink.LookupTable and Simulink.Breakpoint: the flat properties MATLAB models. The 17-value StorageClass override replaces the shared 6 rather than widening it, so Custom is refused on a LookupTable while still accepted on a Simulink.Parameter. - Simulink.ConfigSet and Simulink.ConfigSetRef: Description, and SourceName on the ref. - _rejectUnknownEnumeral and the Min/Max normalizer move up to DataNode, removing a duplicate copy in ParameterNode. test/schemaLayoutResolvable.test.ts pins the rule between the two paths a layout key resolves through, rather than re-testing each class: it enumerates every (class, layout key) pair, probes each with two sentinels so the row must change rather than merely contain text, and fails any row reading a node field the built instance lacks. Verified by reintroducing the bug in production code, not only by its own self-check. 4741 to 4856 tests passing. No test deleted and no assertion loosened; three updated for real consequences of the new layout keys, one made stricter. dist/ rebuilt, as this package ships prebuilt output for git-dependency consumers. The MATLAB re-open gate is not yet run: the newly editable properties are verified in-process only. Recorded as open in the fidelity docs.
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.
A parity pass against the MATLAB Data Explorer app found eleven properties MATLAB
models that this package either dropped on the floor or never declared. Full parity is
not the goal — the app is a different product — so this is scoped to the schema and
data model only. No UI change, and the Min>Max warning channel is deliberately out.
What was unreachable, and why
Three of the gaps turned out to be the same defect, not three bugs:
schemaBridge.resolvePropForKeyprefers a layout atom over the class's own schemadescriptor. The atoms read node fields, not the descriptor's
sourcePath, and nothingchecked that the node class actually declares the field. When it does not, the value is
lost twice: the row renders blank, and
BaseNode.toPIObjectstill adds the key toshownKeys, sobuildOtherRowssuppresses the raw source property from "Other" as well.Silent — the row is present and merely empty.
Changes
Simulink.ValueType—Min,Max,Unitreachable in both panes, including theserialized-key asymmetry MATLAB has: ValueType writes
Unit, whileSimulink.Parameterand
Simulink.SignalwriteDocUnits.Simulink.BusElement— thereal/Fixeddisplay defaults MATLAB shows. A silentelement still gains no key on save.
Simulink.EnumType—IsTunableInCode, last in Code Generation.Simulink.LookupTable/Simulink.Breakpoint— the flat properties MATLAB models.The 17-value
StorageClassoverride replaces the shared 6 rather than widening it,so
Customis refused on a LookupTable while still accepted on aSimulink.Parameter.Simulink.ConfigSet/Simulink.ConfigSetRef—Description, andSourceNameonthe ref.
_rejectUnknownEnumeraland the Min/Max normalizer move up toDataNode; a duplicatecopy in
ParameterNodeis gone.The guard
test/schemaLayoutResolvable.test.tspins the rule between the two paths a layout keyresolves through, rather than re-testing each class. It enumerates every (class, layout key)
pair, probes each with two sentinels so the row must change rather than merely contain
text, and fails any row that reads a node field the built instance does not have. Coverage
is asserted, not assumed — 20+ classes, 182+ pairs, 100+ probe cases, and the atom table is
compared by object identity so it cannot go stale in either direction.
It was verified by reintroducing the bug in production code (commenting the
Descriptionassignment out of
ConfigSetNode's constructor), not only by its own self-check: 3 of its14 tests fail, each naming the class, the key, and the mechanism.
Test results
4741 → 4856 passing, 26 pre-existing skips. No test deleted; no assertion loosened.
Three existing tests updated for real consequences of the new layout keys, one of them made
stricter. Typecheck,
check:leakandbuildclean.dist/is rebuilt and committed, asthis package ships prebuilt output for git-dependency consumers.
Not verified
The MATLAB re-open gate has not been run: the newly editable ValueType properties and
the two BusElement enums are verified in-process only (serialize → re-parse in this suite).
There is no recorded PASS that MATLAB itself loads a file written here and reads those
values back. The enums carry the risk — MATLAB writes
reallower-case andFixedcapitalized and refuses the other spelling of each. Recorded as open in the fidelity docs.