Skip to content

Import-graph accuracy: measure powershell and tcl (Part of #3641) - #6527

Merged
squid-shepherd[bot] merged 2 commits into
mainfrom
churn/3641-import-powershell-tcl
Oct 24, 2026
Merged

squid-shepherd[bot] merged 2 commits into
mainfrom
churn/3641-import-powershell-tcl

Conversation

@squid-protocol

@squid-protocol squid-protocol commented Oct 24, 2026 •

Copy link
Copy Markdown
Owner

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 rules powershell_imports (Import-Module, using module, dot-sourcing; $PSScriptRoot/relative path against the file, other-variable path by literal tail, bare name = Name.psm1/psd1) and tcl_imports (source by literal path/tail, package require X -> files that package provide X or an X-1.0.tm). Both read tree-sitter command nodes, so comments and strings are not imports.
  • Corpus: pester/Pester (powershell), tcltk/tcllib (tcl). Baseline, graph comparison ledger and coverage chart regenerated; diff against main moves only the two new languages.
  • Tests: one per rule (incl. comment/string decoys, dynamic paths, using namespace); plan test updated because powershell now has an import gate.

Measured (real scans)

language repo resolvable imports engine edges precision recall
powershell Pester 83 81 100.0% 98.8% (1 FN)
tcl tcllib 804 33 100.0% 4.4% (769 FN)

tcl FN causes: 57% token captured but unresolved (package require name 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 X resolution to the package provide X file (437 of the 769 FNs; engine resolver); (2) powershell dot-sourcing after an assignment ($r = . "$PSScriptRoot/x.ps1", Pester publish/release.ps1), the capture anchors at line start (_dependency_capture); (3) extensionless tcl scripts are not classified as tcl.

Gates

pr_gates --fast 7/7 pass; tree-wide guard tests and the three graph tool test files pass (308). --ratchets not run: no engine, golden or ground-truth input changed (tests/tools, a corpus file, regenerated graph artifacts only). ruff format of test_import_graph_accuracy.py has a pre-existing diff in the swift test; untouched.

🤖 Generated with Claude Code

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]>
@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Oct 24, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol marked this pull request as ready for review October 24, 2026 19:22
@squid-protocol
squid-protocol enabled auto-merge (squash) October 24, 2026 19:37
@squid-protocol

Copy link
Copy Markdown
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.

@squid-protocol squid-protocol added shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md and removed shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md labels Oct 24, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol squid-protocol added shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md and removed shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md labels Oct 24, 2026
@squid-shepherd squid-shepherd Bot added shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md and removed shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md labels Oct 24, 2026
@squid-shepherd squid-shepherd Bot removed the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Oct 24, 2026
@squid-shepherd

Copy link
Copy Markdown
Contributor

CI shepherd: the head of this PR (fc34300) is not the one a maintainer labelled shepherd:merge on (new commits, or never approved), so the label was removed and nothing merges unreviewed code. Re-add the label when the new head is ready (shepherd:reapprove marks this PR until then).

@squid-shepherd
squid-shepherd Bot disabled auto-merge October 24, 2026 21:08
@squid-shepherd squid-shepherd Bot added shepherd:reapprove Bot: new commits dropped shepherd:merge; re-add it to merge this head. Guide: docs/ci.md and removed shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md labels Oct 24, 2026
@squid-protocol squid-protocol added shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md and removed shepherd:reapprove Bot: new commits dropped shepherd:merge; re-add it to merge this head. Guide: docs/ci.md labels Oct 24, 2026
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) October 24, 2026 21:10
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot merged commit 05c94e5 into main Oct 24, 2026
38 of 40 checks passed
@squid-shepherd
squid-shepherd Bot deleted the churn/3641-import-powershell-tcl branch October 24, 2026 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant