Repository navigation
Import-graph accuracy: measure powershell and tcl (Part of #3641) - #6527
Merged
Merged
Conversation
Adds parser-side import rules for both languages (powershell: Import-Module, using module, dot-sourcing; tcl: source by literal tail, package require by package provide / .tm), Pester and tcllib corpus entries, and regenerates the baseline, graph comparison ledger and coverage chart. Only the two new languages move. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Owner
Author
|
No description provided. |
squid-protocol
marked this pull request as ready for review
October 24, 2026 19:22
squid-protocol
enabled auto-merge (squash)
October 24, 2026 19:37
Owner
Author
|
This PR conflicts with main, so no checks ran. Merge origin/main into it and regenerate generated files with their tools (never hand-merge them), then push. |
Owner
Author
|
No description provided. |
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Contributor
|
CI shepherd: the head of this PR (fc34300) is not the one a maintainer labelled |
Contributor
|
No description provided. |
Contributor
|
No description provided. |
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 powershell and tcl (the calls half landed in #6480).
What
import_graph_accuracy.py: parser-side rulespowershell_imports(Import-Module,using module, dot-sourcing;$PSScriptRoot/relative path against the file, other-variable path by literal tail, bare name = Name.psm1/psd1) andtcl_imports(sourceby literal path/tail,package require X-> files thatpackage provide Xor anX-1.0.tm). Both read tree-sitter command nodes, so comments and strings are not imports.pester/Pester(powershell),tcltk/tcllib(tcl). Baseline, graph comparison ledger and coverage chart regenerated; diff against main moves only the two new languages.using namespace); plan test updated because powershell now has an import gate.Measured (real scans)
tcl FN causes: 57% token captured but unresolved (
package requirename never mapped to a providing file), 36% file has no extension so the engine never scans it as tcl (apps/nns), 7% truth names several files. These are open ledger shapes (no verdict yet), so the numbers are not claims.Class / Sibling gaps
Class: import-graph coverage for tree-sitter-comparable languages not yet measured. Covered here: powershell, tcl. Not covered (need a different mechanism: a new rule, corpus repo and truth each; burned-estate programs: none, none of these touch the mainframe estates): csharp and swift are already measured; fortran, matlab, apex, groovy, ada, css, html, dockerfile remain. Engine gaps found: (1) tcl
package require Xresolution to thepackage provide Xfile (437 of the 769 FNs; engine resolver); (2) powershell dot-sourcing after an assignment ($r = . "$PSScriptRoot/x.ps1", Pesterpublish/release.ps1), the capture anchors at line start (_dependency_capture); (3) extensionless tcl scripts are not classified as tcl.Gates
pr_gates --fast7/7 pass; tree-wide guard tests and the three graph tool test files pass (308).--ratchetsnot run: no engine, golden or ground-truth input changed (tests/tools, a corpus file, regenerated graph artifacts only). ruff format oftest_import_graph_accuracy.pyhas a pre-existing diff in the swift test; untouched.🤖 Generated with Claude Code