Repository navigation
Describe corpus files in comments and docs without naming them - #154
Merged
Merged
Conversation
Comments and docs named files and paths from the maintainer's local collection of test files, and one user's model. Each mention now says what the file is (a text dictionary R2026b wrote, a matched pair of MATLAB-written dictionaries made by one script, a shipped Simulink demo model) and keeps every fact it stated. Comments and docs only; dist is rebuilt for the .ts comments. The opt-in MATLAB read-back harness (save_readbacks.mjs, its truth file and the two comments that tell how to run it) still names the two files it opens, because it opens them by name. Changing that is a code change and is left for a decision.
This was referenced Oct 19, 2026
Merged
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.
Comments and docs named files and paths from the maintainer's local collection of test files, and one user's model. Each mention now says what the file is and keeps every fact it stated. Comments and docs only. dist is rebuilt for the
.tscomments.B-35: describe the local test files without naming them (PARTIAL)
Ruling. The maintainer's standing rule: "no corpus file or customer names in code, comments or docs" (B-06 already removed them from
Simulink.VariantBank.md). The row says: "reword each mention to describe the file without naming it ('a text dictionary R2026b wrote', 'a matched pair of MATLAB-written dictionaries'), keeping every fact; comments and docs only, no behaviour change; core dist rebuilt for the .ts comment; scan ... tracked files only ... a guard test is NOT added (it would have to carry the names); instead the PR lists the grep it ran and its zero result."What was wrong. Tracked files named local collection paths and file names:
Simulink.VariantBankCoderInfo.md:129-132,Simulink.Parameter.md:112,VariantBankCoderInfoNode.ts:40(and its dist copy),make_variantbank_r2027a.m:271,mcosDecodeWarnings.test.ts:19,parameterNode.test.ts:187andvariantBankFields.test.ts:976/979. All of them predate group H. I checked each one on main 3fb94fe and found it where the row said.Root cause. Comments and docs written while debugging against the local collection used the file's name or path as shorthand for what the file is.
Fix. Each name or path is now a description that keeps the fact, for example "two text dictionaries R2026b wrote", "a matched pair of MATLAB-written dictionaries, one text and one binary, made by the same script", "a shipped Simulink demo model",
<model>.slx/blocks/65in node-id examples, and "one of the user's models". The scan the row asks for found more mentions than the row lists, and these were reworded the same way: a collection path invariantBankNoValue.test.ts, a user's model named intest/parity/matlab/DESIGN.md, the shipped demo model named by file (about 30 lines across src, test and dist), two MATLAB-written dictionaries named on 14 lines, and other collection paths. The change touches 35 source, test and doc files plus 17 rebuilt dist files.No behaviour change. Every changed
+/-line in a.ts,.js,.d.tsor.mfile is a comment line. This command prints nothing:git diff -U0 origin/main HEAD -- '*.ts' '*.js' '*.m' | grep -E '^[+-]' | grep -vE '^(\+\+\+|---) ' | grep -vE '^[+-]\s*(//|\*|/\*\*|%)'The dist changes are comment lines and the
.js.mapcolumn mappings that follow from them.MATLAB truth. None needed. Only comment lines changed in two
.mscripts (test/fixtures/make_variantbank_r2027a.mandtest/parity/matlab/probe_text_empty_readback.m), so what MATLAB does cannot change.Tests. No test was added: the row rules out a guard test, because it would have to carry the names. With no behaviour change, there is nothing that could fail before the change. The scan below takes the guard test's place.
Changed existing tests. Only comments changed, in 19
.test.tsfiles, one fixture script and one probe script. No assertion, input or expected value changed.The scan, over tracked files at the head. The name list is the collection's file basenames minus every basename tracked in core or vscode (597 names). It lives outside the repo, because committing it would commit the names.
git grep -n -i -I delite HEAD -- .gives 0 lines (11 before).git grep -n -I -i -Ffor each one: the 4 tokens that are names give 0 (0 before). The other 3 tokens are ordinary words (a block name, the word "data" and one file format). They match ordinary code everywhere and are not names.git grep -n -I -w -F -f <597 names> HEAD -- .gives 27 lines (96 before). The-wflag is needed because without it short names match inside other words. The 27 lines are:blockParamUsages,ingestDispatch,parseWarningsandslddContenttests). These are string literals in test code that happen to share a name with a collection file. They do not refer to collection files. Renaming them would change test code, so they stay.Left out (needs a decision): the read-back harness names the two files it opens. The row limits this change to comments and docs. In the harness the names are code and truth data:
corpus('<name>')intest/parity/matlab/save_readbacks.mjs,"file": "<name>"insave_readbacks.truth.json, and the truth test compares thatfilefield. Thesave_readbacks.mjs:11comment and the header comments inprobe_save_readbacks.mandreadbacks.truth.test.tssay which files to supply. Rewording only those comments would hide the usage while the names stay in the code next to them. The options are:DEX_READBACKS_BINARYandDEX_READBACKS_TEXT), and record the file's role in the truth file (for example"file": "binary of the pair"). This changes the harness and its truth file, and the truth should be re-derived by re-runningprobe_save_readbacks.mon R2027a with the new label.Recommendation: (b), as its own small PR with the probe re-run. Note (review):
probe_save_readbacks.mopens a corpus dictionary, which agents may not open in MATLAB, so either the maintainer runs that re-run or the label changes without one (c). The standing rule covers code too, and only (b) brings the scan to zero apart from the made-up test names.Not in this PR. The row also scans the vscode repo. That half belongs to the vscode lane and was not scanned or changed here.
Not changed, record:
src/datamodel/blockIdentity.ts:23and:64(and their dist copies) still name the shipped demo model by its bare name; it is a public MATLAB demo, not a collection file, so it is left as is.Gates (at the head, bad9606)
rm -rf dist && npm run build: exit 0, and the tree is clean afterwards (the committed dist matches the build).npm run verify: exit 0. 303 test files passed and 1 was skipped. 10815 tests passed and 27 were skipped (10842 total). The tarball, leak and browser-safety checks are OK.DEX_READBACKS_CORPUS=<local collection>/parity npx vitest run test/parity/readbacks.truth.test.ts test/parity/m9MergedSaves.truth.test.tsgave 2 files and 45 tests passed, 0 skipped..mscripts).origin/main(3fb94fe), so it needs no merge.Implements the maintainer's rulings, as audited in group H (2026-10-19).