Repository navigation
import_graph_accuracy: measure matlab imports (Part of #3641) - #6663
Merged
Merged
Conversation
Parser-side rule by package and name (+a/+b/C.m, @C/C.m), corpus petercorke/robotics-toolbox-matlab, baseline, ledger and chart rows. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Contributor
|
No description provided. |
Contributor
Open
6 tasks
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.
Part of #3641, step 2 (coverage sweep), imports half for matlab. Fortran was already measured on main (
fortran-lang/fpm, 92.9% precision / 44.4% recall); this slice adds the remaining language of the pair.Checklist: partial [c:bf495ed4] -- imports still unmeasured: apex, ada, css, html, dockerfile; matlab is measured but its engine recall is 0%
What
import_graph_accuracy.py: parser-side rulematlab_imports. Files are indexed by package and name (+a/+b/C.m=a.b.C,@C/C.m= class C; method files andprivate/name nothing importable).import a.b.Cis that file,import C.mthe owner's file,import a.b.*a package (contract C7: no edge) unless a.b is a class (its file); several arguments per line scored;%and%{ %}comments blanked.petercorke/robotics-toolbox-matlab. Baseline row, graph comparison ledger shape and coverage chart regenerated; workflow subset IG1 getsmatlab(the subsets test requires each language exactly once).important =/import =decoys) plus the plan test rows.Measured (real scan)
The 9 are
import ETS2.*/import ETS3.*in the unit tests (class static-member imports). The engine captures the tokenETS2.*(raw_imports shows it) but resolves no edge. Open ledger shape, no verdict yet: not a claim. Matlab imports are rare in open source: of 12 MATLAB repos sampled (chebfun, nnv, llms-with-matlab, matlab-azure-services, MATLAB-Language-Server, statistics, climatedatastore, ...) this was the only one with animportthat names a repo file; the rest importmatlab.unittest.*/java.*(external) or repo packages by wildcard (no edge). n=9 is thin; hub overlap@10 0.80.Needs the owner
.github/workflows/graph-accuracy-audit.yml(one word:matlabadded to the IG1 subset) was edited withoutallow_workflowson the queue item. It cannot be dropped on its own:test_the_import_graph_subsets_cover_every_language_exactly_oncefails unless every language inLANGSsits in exactly one subset. Owner: approve that one-line edit, or tell me to drop matlab fromLANGS(which discards the slice).Class / Sibling gaps
Class: import-graph coverage for tree-sitter-comparable languages not yet measured. Covered: powershell, tcl (#6527), groovy, fortran (already on main), matlab (here). Not covered, each needing its own rule, corpus repo and truth (no burned mainframe program touches any): apex, ada, css, html, dockerfile. Engine gaps found: (1) matlab
import Class.*(class static-member import) gives no edge though the token is captured (all 9 FNs; engine resolver innetwork_risk_sensor/import resolution, needs@C/C.mandC.mclass lookup, and+pkgfunction lookup forimport pkg.f); (2) from #6527 and still open: tclpackage require X->package provide Xfile, powershell dot-source after assignment, extensionless tcl scripts. The matlab truth is small (9 statements, 2 distinct edges); a second corpus repo with in-repoimport pkg.Classwould firm it up and is a corpus-only follow-up.Gates
pr_gates --fast7/7. Graph tool tests,test_source_reads,test_sweep_plan,test_change_classifierpass (246).import_graph_accuracy.py matlab --ciOK.--ratchetsnot run: no engine, golden or ground-truth input changed. Baseline row, ledger shape and chart were produced from a single-language run merged in place (a full--regenerateneeds every pinned repo fetched; other rows unchanged). Local ruff 0.17.1 wants to reflow two pre-existing lines on main (_cargo, a rust test); left untouched.Lessons for agents
import_graph_accuracy.py --regenerate/--ledgerrefuse a language list: for one new language, run<lang> --buckets 5 --json Fand merge the row withiga.BASELINE+iga.gl.merge(results, "import"); setIMPORT_GRAPH_CORPUS_PATHto a scratch dir and--fetch-only <lang>first.🤖 Generated with Claude Code