Skip to content

import graph: ripgrep as Rust's second repo; unprefixed use groups, [[bin]] path (Part of #3798) - #6603

Merged
squid-shepherd[bot] merged 4 commits into
mainfrom
churn/3798-20261025T0625Z
Oct 25, 2026
Merged

squid-shepherd[bot] merged 4 commits into
mainfrom
churn/3798-20261025T0625Z

Conversation

@squid-protocol

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

Copy link
Copy Markdown
Owner

Part of #3798.

What changed

  • Plan change: Go's second repo already landed in Go imports resolve through go.mod, not the file-stem search; client_golang as 2nd Go corpus repo (Part of #3798) #6571, so this slice pins BurntSushi/ripgrep (6892bc2b) as Rust's second import-graph repo.

  • Engine (galaxyscope._expand_import_selectors): a Rust unprefixed group use { a::B, c::{D, E} }; was kept as one leaf token. It now expands with no prefix. Recall on ripgrep 90.2% -> 100%.

  • Audit reference rule (import_graph_accuracy._cargo / _rust_crate): a [[bin]] path is a crate root like src/main.rs. Precision 93.8% -> 99.5%.

  • Rust baseline: 99.5% precision / 99.3% recall over 814 resolvable imports (6 FN, 2 FP). Baseline and ledger regenerated by the tools; only the rust entry moved.

  • Rescue fix: ripgrep is marked "callgraph": false in tests/import_graph_corpus.json. call_graph_resolution.py scores every Rust repo in the import-graph corpus, so pinning ripgrep also pulled it into call-rust, whose baseline covers serde-rs/json only. On CI that moved confident precision from 93.8 to 87.0 and recall from 60.1 to 27.8. The engine's use-group change does not touch serde: its extracted imports are identical on main and on this branch (0 of 71 files differ).

Verification

  • New tests: tests/extraction/languages/test_rust_use_group_3798.py, test_rust_bin_path_is_a_crate_root. Plain pytest from /tmp passes.
  • crucible_check.py (both legs): zero drift, no re-bless needed.
  • pr_gates --fast 7/7, --ratchets 9/9, audit_check all clear.

Class / Sibling gaps

  • Open (6 FN, 2 FP, all crate::flags::defs::FLAGS): the Rust prism mis-splits r#"..."# raw strings that contain // or quotes, so the inline mod tests { use super::*; } is invisible in the code stream. The glob is then attributed to flags/mod.rs. A prism fix is golden-wide, so it is not done here.
  • Same unprefixed-group class: other languages with brace selectors were checked through the corpus baseline; none moved.

Cross-repo

None. The corpus pin lives in tests/import_graph_corpus.json; no companion PR.
Overlap: #6394 also touches galaxyscope.py; this change there is 6 lines and merges cleanly with current main.

Lessons for agents

🤖 Generated with Claude Code

@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Oct 25, 2026
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot marked this pull request as ready for review October 25, 2026 06:57
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) October 25, 2026 06:59
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-shepherd

Copy link
Copy Markdown
Contributor

PR #6603 @ 2b8f966: 1 failed check(s)

== graph-accuracy-audit (failure) -- real
https://github.com/squid-protocol/gitgalaxy/actions/runs/40170998333/job/121102769729
repro: python tests/tools/pr_gates.py --fast
errors:
fail-on-cache-miss: false
run_gate() { # run_gate <command...>: log per gate, one "FAIL name" line on failure
|| echo "FAIL $name" >> "$RUNNER_TEMP/gaa/failed"
2026-10-25 07:11:37,387 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-25 07:07:17,372 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-25 07:14:12,056 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-25 07:16:25,149 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-25 07:16:29,997 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-25 07:13:42,949 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-25 07:14:38,546 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-25 07:13:40,324 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-25 07:12:10,580 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-25 07:12:15,648 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-25 07:12:16,783 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-25 07:12:23,840 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-25 07:12:33,427 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-25 07:12:39,894 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:.AssertionError>
2026-10-25 07:12:39,898 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:
.AssertionError>
2026-10-25 07:12:39,900 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:.AssertionError>
2026-10-25 07:12:39,904 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:
.AssertionError>
2026-10-25 07:12:40,253 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:.AssertionError>
2026-10-25 07:12:40,257 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:
.AssertionError>
2026-10-25 07:12:40,259 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:.AssertionError>
2026-10-25 07:12:40,260 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:
.AssertionError>
2026-10-25 07:12:40,261 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:*.AssertionError>
... 88 more
log tail:
| perl | 936 | 0 | 0.0% |
| php | 1722 | 0 | 0.0% |
| pli | 46 | 0 | 0.0% |
| postgresql | 4 | 0 | 0.0% |
| powershell | 89 | 0 | 0.0% |
| python | 4310 | 0 | 0.0% |
| rexx | 115 | 0 | 0.0% |
| ruby | 261 | 0 | 0.0% |
| rust | 2127 | 0 | 0.0% |
| scala | 541 | 0 | 0.0% |
| scheme | 34 | 0 | 0.0% |
| shell | 647 | 0 | 0.0% |
| solidity | 105 | 0 | 0.0% |
| swift | 132 | 0 | 0.0% |
| tcl | 291 | 0 | 0.0% |
| typescript | 5838 | 0 | 0.0% |
| yacc | 1301 | 0 | 0.0% |
| yaml | 19 | 0 | 0.0% |
| zig | 3462 | 0 | 0.0% |
span_anchor_audit: OK -- 51 language(s) measured, none rose beyond tolerance.
##[endgroup]
FAIL call-rust
##[error]Process completed with exit code 1.
Post job cleanup.
Post job cleanup.
[command]/usr/bin/git version
git version 2.55.0
Temporarily overriding HOME='/home/runner/work/_temp/eaf05706-b9bb-499c-a16f-6325e495e61a' before making global git config changes
Adding repository directory to the temporary git global config as a safe directory
[command]/usr/bin/git config --global --add safe.directory /home/runner/work/gitgalaxy/gitgalaxy/gitgalaxy
Removing SSH command configuration
[command]/usr/bin/git config --local --name-only --get-regexp core.sshCommand
[command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core.sshCommand' && git config --local --unset-all 'core.sshCommand' || :"
Removing HTTP extra header
[command]/usr/bin/git config --local --name-only --get-regexp http.https://github.com/.extraheader
[command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http.https://github.com/.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :"
Removing includeIf entries pointing to credentials config files
[command]/usr/bin/git config --local --name-only --get-regexp ^includeIf.gitdir:
[command]/usr/bin/git submodule foreach --recursive git config --local --show-origin --name-only --get-regexp remote.origin.url
Cleaning up orphan processes

@squid-shepherd squid-shepherd Bot added the shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md label Oct 25, 2026
squid-protocol and others added 2 commits October 25, 2026 03:22
…rt of #3798)

call_graph_resolution.py scores every Rust repo in the import-graph corpus,
so pinning ripgrep for imports also pulled it into call-rust, whose baseline
is serde-rs/json alone (precision 93.8 -> 87.0, recall 60.1 -> 27.8 on CI).
Mark it "callgraph": false, the opt-out #6571 added for client_golang. The
engine's use-group change leaves serde's extracted imports identical
(0 of 71 files differ), so the drop was the corpus, not the engine.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@squid-shepherd squid-shepherd Bot removed the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Oct 25, 2026
@squid-shepherd

Copy link
Copy Markdown
Contributor

CI shepherd: the head of this PR (89383d0) 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 25, 2026 07:30
@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 25, 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 shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md labels Oct 25, 2026
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) October 25, 2026 07:45
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

1 similar comment
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot merged commit ed0f870 into main Oct 25, 2026
68 checks passed
@squid-shepherd
squid-shepherd Bot deleted the churn/3798-20261025T0625Z branch October 25, 2026 07:55
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