Found by the #2560 rosetta classification sweep (matlab #2588). Filed as a question per the sweep's flag — a second opinion is wanted before treating it as a defect.
Observation
matlab's state_mutation sits at +450% vs the corpus median — the widest deviation in the functional/misc family. Hand-decomposition of the 19 raw (pre-flux-amplification) hits: roughly 11 are the mandatory out = <name> output-assignment return convention — MATLAB has no return <value> statement; every function result IS an assignment to a declared output variable. The remaining hits are genuine plants (clear/clearvars, note=, etc.) plus the documented x3 proximity amplification (#2546) and decoy-string phantom-branch trigger (#2535).
Question
Should MATLAB's return-convention assignments count as state_mutation? Arguments both ways:
- Count them (current behavior): MATLAB's return really is assignment; the rule is consistent with the engine's occurrence-counting philosophy; expected_signals.json has baked these counts since 2026-08-31.
- Exclude them: no other language's
return x feeds state_mutation, so cross-language comparisons systematically read MATLAB as ~5x more mutation-heavy for identical intent; a rule tweak excluding assignments to declared output variables (visible in the enclosing function [out] = name(...) signature) would align it.
If current behavior is affirmed, the resolution is a validated corpus ledger entry (return-assignment-counted-as-mutation, intended-morphology) rather than a code change — either way the shape should stop being unledgered.
Cause-key return-assignment-counted-as-mutation; found via keyword-rosetta classification.
Found by the #2560 rosetta classification sweep (matlab #2588). Filed as a question per the sweep's flag — a second opinion is wanted before treating it as a defect.
Observation
matlab's state_mutation sits at +450% vs the corpus median — the widest deviation in the functional/misc family. Hand-decomposition of the 19 raw (pre-flux-amplification) hits: roughly 11 are the mandatory
out = <name>output-assignment return convention — MATLAB has noreturn <value>statement; every function result IS an assignment to a declared output variable. The remaining hits are genuine plants (clear/clearvars, note=, etc.) plus the documented x3 proximity amplification (#2546) and decoy-string phantom-branch trigger (#2535).Question
Should MATLAB's return-convention assignments count as state_mutation? Arguments both ways:
return xfeeds state_mutation, so cross-language comparisons systematically read MATLAB as ~5x more mutation-heavy for identical intent; a rule tweak excluding assignments to declared output variables (visible in the enclosingfunction [out] = name(...)signature) would align it.If current behavior is affirmed, the resolution is a validated corpus ledger entry (
return-assignment-counted-as-mutation, intended-morphology) rather than a code change — either way the shape should stop being unledgered.Cause-key
return-assignment-counted-as-mutation; found via keyword-rosetta classification.