Skip to content

Add AST-accuracy as a baseline-gated CI regression check (ruff/mypy-style), pinned to a fixed corpus snapshot #1200

Closed

Description

@squid-protocol

What

#1193's fix was validated by diffing GitGalaxy's own self-scan against Python's ast module as
ground truth (function/class recall, precision, args-count accuracy) -- the same methodology
docs/language_status/python.md §9 documents. That measurement was ad hoc (a one-off local
script) and would have caught #1193-class regressions immediately if it had existed as a CI gate
before now.

Add it as a fourth baseline-gated regression check alongside tests/ruff_audit.py/
tests/mypy_audit.py/tests/dead_key_audit.py: PRs can make extraction accuracy better, are
free to leave it unchanged, but CI fails if any tracked metric (function recall, class recall,
false-positive/hallucination rate, args-count accuracy) gets worse than the committed baseline.

Unlike ruff/mypy (which scan this checkout's own live code -- target and tool-under-test are the
same moving thing), the corpus being parsed here needs to be pinned to a fixed snapshot
(a specific git tag of GitGalaxy's own source, extracted via git archive), not "whatever's
currently checked out." Without a fixed target, a changed recall number can't be distinguished
from "the engine changed" vs. "the corpus of files being measured changed" (files added/removed/
edited as this repo's own source naturally grows) -- the same reason crucible_check.py diffs
against the external language-crucible corpus rather than this repo's own current tree.

Suggested implementation

Activity

  1. added
    enhancement
    core-engine
    on Aug 10, 2026
  2. squid-protocol commented on Aug 10, 2026

    @squid-protocol
    OwnerAuthor

    Implemented and merged — landed as part of #1197's squash merge (3dd93d2 on main), even though the commit implementing this (f4b5cc6, on the fix/1193-line-exclusive-per-language-delimiters branch) doesn't show up in main's ancestry directly. Confirmed the tree is byte-identical between that commit and current main for all 5 files it touched, and re-ran python tests/ast_accuracy_audit.py --ci locally against the real pinned v2.4.7 corpus — passes, matches the committed baseline (98.1% function recall, 0 hallucinated names). ast-accuracy-audit.yml has also run green on real PRs since. Closing.

  3. added this to the v2.4.8 milestone on Aug 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    core-engineenhancement

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions