Repository navigation
Describe corpus files without naming them, in comments, docs and made-up test data - #83
Merged
Merged
Conversation
…them Two comments pointed at a path in the maintainer's private corpus, and comments, one CHANGELOG line and some invented test data named corpus files and models. The standing rule is that no code, comment or doc names a corpus file or a customer. - The two corpus paths and the demo model's file name now read "a shipped Simulink demo model". Row ids and link targets quoted in comments use `<model>.slx`. - The service-interface fixture's comment keeps its description and drops the source file's path. - The 1.36.0 CHANGELOG entry says "an 8 MB MAT-file". - Model and dictionary names that tests make up, and the comments that quote them, are renamed to invented ones. Each name is renamed the same way everywhere inside a test, so every assertion pins what it pinned before. There is no behaviour change. The built extension (dist/, without source maps) is byte-identical to main's, and the unit suite has the same counts. Kept on purpose: model names that are data inside repo fixtures, block and variable names, and generic synthetic file names that the bench generator and tests pick for themselves.
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, one CHANGELOG line, and some test data that tests make up named files from the maintainer's local collection of test files, and two comments gave a path into that collection. Each mention now describes the file without naming it, and keeps every fact it stated. There is no behaviour change. This is the vscode half of B-35. The core half is mathworks/data-explorer-core#154.
B-35 (a2f3b41): 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 ..., keeping every fact; comments and docs only, no behaviour change; ... scan both repos (core and vscode, 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. On main 4209e6d (the main the row cites, and still the current main):
test/blockSidIdentity.test.ts:7andtest/fixtures/make-fixtures.mjs:433.make-fixtures.mjs.usageCells.test.ts(the dictionary one also in asrc/host/usageCells.tscomment).Root cause. Comments, notes and test data written while debugging against the local collection used a file's name or path as shorthand for what the file is.
Fix. One commit, 14 files.
nameExtract.ts,usageCells.ts,table-main.ts), in the comments of 4 tests, and inmake-fixtures.mjs. Row ids and link targets quoted in comments now read<model>.slx/....usageCells,treeTableCells,filterEntries,nameExtract,bannersandrowCaptests, plus the matching comments inusageCells.tsanddex-tree-table.ts. I checked the invented names against the collection's names: none of them is a collection file.Deviation from the row, and why. The row says "comments and docs only". In vscode, some hits were test data literals: model URIs and model names that a test makes up, and the expected cell text built from them. The standing rule covers code too, and the row asks for a zero result, so those literals were renamed as well. Inside each test, a name is renamed the same way everywhere it appears, so every assertion pins what it pinned before. No assertion was loosened.
No behaviour change.
src/is a comment line. This prints 0:git diff -U0 origin/main HEAD -- src | grep -E '^[+-]' | grep -vE '^(\+\+\+|---) ' | grep -vE '^[+-]\s*(//|\*|/\*\*)' | wc -ldist/(source maps excluded) have the same sha afternpm run build && npm run build:webon main 4209e6d and on this head.MATLAB truth. None needed. No code path changed.
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 its place.
Changed existing tests. Each test changed only by renaming made-up names, so each still pins exactly what it pinned before:
treeTableCells.test.ts: the tooltip and grouping tests.usageCells.test.ts: the same-named blocks test and the overwrite test.filterEntries.test.ts: block records.nameExtract.test.ts: one record per block.banners.test.tsandrowCap.test.ts: the file name in the error message.blockSidIdentity.test.ts,usageEndToEnd.test.ts.The scan, over tracked files at the head. The name list is the collection's file basenames minus every basename tracked in this repo (602 names). It lives outside the repo, because committing it would commit the names. A name counts only as a whole basename: no
[A-Za-z0-9_.-]before it and no[A-Za-z0-9_]after it.git grep -n -i delitegives 0 lines (2 before).git grep -I -i -Ffor each one: the 4 tokens that give 0 in core give 0 here too (0 before). The other 3 tokens are the same 3 that Describe corpus files in comments and docs without naming them data-explorer-core#154 identifies as ordinary words (a block name and two file-format words). This change adds and removes the same number of hits on each of them.Kept on purpose.
Sourceofobject_array_text.sldd, the line inmake-fixtures.mjsthat writes it, the binary fixturemcos/variableUsageArray.mat, andobjectExpansion.test.ts, which reads it (its assertion, and the comment at :430 that says where the fixture came from). It is the bare name of a MATLAB-shipped demo model, not a collection file. It is fixture content, and changing it would change fixture bytes.Customer-name check. The lane was refused a command that would print the lines matching the name list, and used counts only. The orchestrator, who holds the list, confirms the 3 high-count tokens are ordinary words (a common class-name word, "data" and a file format); the 4 that are names give 0 in both repos, before and after.
Gates (at the head, a2f3b41)
origin/main(4209e6d), so it needs no merge.npm run verify: exit 0. 183 test files and 3539 tests passed (the same as main). The leak, lockfile and local-path checks are OK.npm run test:integration: exit 0. 275 passing and 1 pending (the same as main).Implements the maintainer's rulings, as audited in group H (2026-10-19).