Skip to content

Missing-keyword mining report per family and language (Part of #8863) - #9235

Merged
squid-shepherd[bot] merged 2 commits into
mainfrom
churn/8863-20261124T1943Z
Nov 24, 2026
Merged

squid-shepherd[bot] merged 2 commits into
mainfrom
churn/8863-20261124T1943Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Missing-keyword mining report per family and language: report-only tool plus test (Part of #8863, checklist item "missing-keyword mining report per family and language").

tests/tools/family_missing_keywords.py reads family_oracle.score() results (--scan LANG:DB:SRC, or a saved family_oracle.py --json as --result LANG:FILE) and ranks, per (language, family) cell, the tokens the parser oracle saw in functions where the family read 0. It also reports the missed-function count, a per-function share, the tokens that recur across languages for one family (one candidate addition, several languages), thin cells (under --min-functions oracle functions, listed and never ranked), and languages with no oracle (listed as skipped). It never fails on findings: exit 0 for a report, 2 when nothing ran. It adds no oracle logic and changes no engine code, so there is no golden bless.

Class / Sibling gaps

Class: oracle-missed tokens (the parser sees the construct, the family reads 0), ranked per keyword family and oracle language. Every family family_oracle.score() scores and every oracle language (Python plus the tree-sitter set) goes through the same code path; the tests cover ranking and tie order, dead and partial cells, thin and empty cells, cross-language merging, the capped-at-5 saved-result flag, a real scan end to end, and every exit path.
Sibling gaps: languages without an oracle (COBOL, JCL, HLASM, PL/I, REXX, ABAP, SQL dialects) cannot be mined and are listed as skipped; counts are token occurrences, not distinct functions, because score() does not expose per-function token sets (a family_oracle.py change); the tool has not been run over the full pinned crucible scans (it needs a scan DB per language).

Remaining slices

  1. Time each candidate token on keyword-rosetta and language-crucible before it is merged (step 4 of the epic).
  2. Expose distinct-function counts per token from family_oracle.score().

Gates

pr_gates.py --fast (see the report), audit_check.py all clear, pinned ruff format and check on both files, 11 tests in 0.07 s with time_ratchet at 0 over the limit. pr_gates --fast: every gate passes except derived, which was stale on main (a matrix_legacy.svg line from #9204); the one regenerated line is included (generated, not hand-written).

Lessons for agents

docs_read_by_tests.txt can already be stale on main: pr_gates --fast derived fails until change_classifier.py --write is run.

🤖 Generated with Claude Code

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant