Skip to content

tree-sitter accuracy audit + history: plan job selects languages by diff (Part of #6501) - #6510

Merged
squid-protocol merged 6 commits into
mainfrom
churn/6501-20261024T1647Z
Oct 24, 2026
Merged

squid-protocol merged 6 commits into
mainfrom
churn/6501-20261024T1647Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #6501 (slice 3). Slices 1-2 landed in #6503.

What

accuracy_audit_plan.py gains the tree-sitter and tree-sitter-history audits and a langs output (all, or a comma list). Both workflows get a stdlib-only plan job; the heavy job keeps its check name and runs if: always(), every step gated on needs.plan.outputs.run != 'false'. A failed plan runs everything (over-run, never under-run).

  • Audit: runs --lang X --ci per selected language, or --all --ci.
  • History: plan diffs against the last successful push run's headSha (not github.event.before, which is wrong when pending runs in the concurrency group are replaced). Plan job is contents: read + actions: read.
  • A tree_sitter_accuracy_baseline_<lang>.json change selects that language; a languages/<lang>.py diff is judged by locate() (comments/_meta inert; underscore rules NOT inert, the audit reads _dependency_capture); a lens-read key change selects all languages.

Class / Sibling gaps

Class: accuracy-audit workflows that run on every PR/push regardless of what changed. Done: graph, call-graph, detection (#6503), tree-sitter audit and history (this PR). Sibling gaps (remaining slices): tri-comparison and graph-comparison-history workflows.

Runner minutes / replay

--replay 50: the number of runs is unchanged (tree-sitter 6 -> 6, since most diffs touch shared inputs), but language corpora scanned drop about 16%: 180 -> 151 (audit), 150 -> 121 (history). The gate is worth its load: the plan job is a few seconds of stdlib Python, and the corpus scans it avoids are the expensive part.

Risk

A rule change in one language file can in principle reclassify another language's ambiguous files; the planner does not chase that beyond lens-read keys. Not exercised on CI here.

Evidence

test_accuracy_audit_plan.py 149 tests (about 20 new); pr_gates --fast 7/7; audit_check.py clear; tree-wide guards pass; tests/tools/ 2637 passed, 2 failed (test_db2_wait_bound, test_pin_requirements_check_all: neither touches files in this PR; not checked against main). No engine change, so no golden bless.

Lessons for agents

  • The plan job's job-level permissions replaces the top-level block: gh run list needs actions: read explicitly.

🤖 Generated with Claude Code

squid-protocol and others added 5 commits October 24, 2026 12:53
…ol/baseline; toolchains install only for them (Part of #6501)

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…iff can move them (Part of #6501)

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…iff (Part of #6501)

Extends accuracy_audit_plan.py with the tree-sitter and tree-sitter-history
audits and a `langs` output (all, or a comma list). Both workflows gain a
stdlib-only plan job; the heavy job keeps its check name and runs
if: always(), so a failed plan over-runs, never under-runs. The history
plan diffs against the last successful push run, not github.event.before.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@squid-protocol squid-protocol added shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md and removed shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md labels 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 18:00
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol enabled auto-merge (squash) October 24, 2026 18:01
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-protocol

Copy link
Copy Markdown
Owner Author

PR #6510 @ 5b6aa3c: 1 failed check(s)

== full-suite part 2/3 (failure) -- real
https://github.com/squid-protocol/gitgalaxy/actions/runs/40118744235/job/120946526150
repro: python -m pytest -q tests/tools/test_db2_wait_bound.py::test_planner_wait_constant_is_the_workflows_wait
failing tests: tests/tools/test_db2_wait_bound.py::test_planner_wait_constant_is_the_workflows_wait
errors:
fail-on-cache-miss: false
tests/tools/test_db2_wait_bound.py:61: AssertionError
FAILED tests/tools/test_db2_wait_bound.py::test_planner_wait_constant_is_the_workflows_wait - assert 2700 == 3300
##[error]Process completed with exit code 1.
log tail:
env:
PYTHONUTF8: 1
GITGALAXY_LICENSE_KEY: COMMUNITY_FREE_TIER
OMP_NUM_THREADS: 1
pythonLocation: /opt/hostedtoolcache/Python/3.12.15/x64
PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.12.15/x64/lib/pkgconfig
Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.15/x64
Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.15/x64
Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.15/x64
LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.12.15/x64/lib
PYTEST_ADDOPTS: --ignore=tests/cobol_mainframe
##[endgroup]
With the provided path, there will be 1 file uploaded
Artifact name is valid!
Root directory input is valid!
Uploading artifact: test-times-part-2.zip
Beginning upload of artifact content to blob storage
Uploaded bytes 202748
Finished uploading artifact content to blob storage!
SHA256 digest of uploaded artifact is 2f3f2c24cca370c75c4df084d2d85d9a237450295320fde59ccad6e8f1b89c09
Finalizing artifact upload
Artifact test-times-part-2 successfully finalized. Artifact ID 12569984944
Artifact test-times-part-2 has been successfully uploaded! Final size is 202748 bytes. Artifact ID is 12569984944
Artifact download URL: https://github.com/squid-protocol/gitgalaxy/actions/runs/40118744235/artifacts/12569984944
Post job cleanup.
[command]/usr/bin/git version
git version 2.55.0
Temporarily overriding HOME='/home/runner/work/_temp/49fb975d-5168-463c-88c9-4f12f4fc04c5' 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
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-protocol squid-protocol added shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md shepherd:waiting-on-main Bot: the failing check fails on main too (main's to fix). Guide: docs/ci.md and removed shepherd:waiting-on-main Bot: the failing check fails on main too (main's to fix). Guide: docs/ci.md 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:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md labels Oct 24, 2026
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd squid-shepherd Bot removed shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md shepherd:waiting-on-main Bot: the failing check fails on main too (main's to fix). Guide: docs/ci.md labels Oct 24, 2026
@squid-shepherd squid-shepherd Bot added the shepherd:retrying Bot: an infra/flake rerun is pending on this head. Guide: docs/ci.md label Oct 24, 2026
@squid-protocol
squid-protocol merged commit 12dd7be into main Oct 24, 2026
46 of 49 checks passed
@squid-protocol
squid-protocol deleted the churn/6501-20261024T1647Z branch October 24, 2026 20:48
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

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 shepherd:retrying Bot: an infra/flake rerun is pending on this head. Guide: docs/ci.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant