Skip to content

Keyword families: rosetta consistency --live judges every defined family (Part of #8863) - #9228

Merged
squid-shepherd[bot] merged 1 commit into
mainfrom
churn/8863-20261124T1750Z
Nov 24, 2026
Merged

squid-shepherd[bot] merged 1 commit into
mainfrom
churn/8863-20261124T1750Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #8863 (step 2 of "The test": cross-language consistency on keyword-rosetta). Checklist: partial [c:cross-language-consistency-report]

What

#9202 merged the manifest-based report, which can only judge the 30 families the corpus plants. This adds --live to tests/tools/family_rosetta_consistency.py: it runs every rule the registry defines for a language over the Prism streams of that language's keyword-rosetta source files (reusing rule_probe.corpus_files / streams_for) and feeds the counts to the same analyze, so a family that fires in most languages and reads 0 in a few is found for all contracted families, planted or not. It also prints a Live vs manifest section: a planted family the two sources count differently is a stale manifest or a detector post-filter the live count lacks. Report only: no keyword, rule, manifest or golden change. 2.6 s CPU for the full corpus.

Result (corpus 2e67433, 50 code languages, --live)

  • Silent: panics_and_aborts (fires in 27 of 48 defining languages; reads 0 in abap, c, cobol, haskell, javascript, php, python, shell, typescript, ...: 21 languages) and structural_boundaries (m4, scheme). These are readings: raw hits with no post-filter, so read the contract before calling either a bug (Keyword families in Go, Rust, JavaScript, TypeScript, Java, C: per-language differences that need a definition decision #8868 holds the panics_and_aborts per-language readings, e.g. C assert).
  • Over/under: calls_out (target 26; 23 over, 17 under), structural_boundaries (23 over, 19 under), panics_and_aborts over in 16 (kotlin 15), globals go=23, args abap=16; the manifest report's api / func_start over-counts reproduce live.
  • Unplanted families (bitwise_ops, regex_execution, time_date_logic, serialization_parsing, closures, ...): the live count reaches them, but all show "no consensus" (0 to a handful of languages fire). The corpus does not plant a construct for them, so a zero is not evidence of a gap. They still need rosetta SPEC plants.
  • Live vs manifest on planted families: 6 languages differ (abap args 13/16, c safety 2/1, go globals 2/23, hlasm func_start 13/14, matlab state_mutation 2/17, yaml args 13/67): post-filters the live count does not apply, not stale manifests (rosetta_audit keeps those equal to the engine).

Class / Sibling gaps

Class: cross-language consistency of every contracted keyword family on keyword-rosetta (one table; --live extends the intersection of contracts and manifest keys to every family the registry defines for the corpus languages). Tests (test_family_rosetta_consistency.py, 24 pass): live counts reach every defined family of a folder and skip a non-registry folder; drift names only disagreeing families; drift report empty case; CLI --live end to end; all earlier verdict cases unchanged.

Sibling gaps (not done here):

  • Same-mechanism, other families needing a decision: calls_out and structural_boundaries spread (over and under in dozens of languages) is probably a plant-count definition issue, not a gap; contract audit of each.
  • Post-filter parity: run the detector instead of raw rules so the live count equals the engine's (removes the 6-language drift).
  • CI floor / README integration of --check-floor: a separate decision.
  • Rosetta SPEC plants for the unplanted families (keyword-rosetta PRs).
  • Missing-keyword mining (Epic: keyword-family validity -- do the per-function signals measure what their names say? #8863 step 3) and the other open children.

Gates

audit_check.py: all clear (ruff 72-baseline, format clean, mypy, dead-key, doc-refs, ast-accuracy, signal-coverage). ruff format touched wrapped lines in both files. Tests 24 passed, 0.5 s. pr_gates --fast: 9 of 9 pass. No golden, ledger or baseline moved.

Cross-repo

None: reads keyword-rosetta, changes nothing there.

Lessons for agents

  • rule_probe.ROSETTA is read from KEYWORD_ROSETTA_PATH at import: a tool calling it for another corpus sets rule_probe.ROSETTA before use.
  • A worker shell loses the selfscan venv PATH between Bash calls; a heredoc python edit then fails silently, so check git diff --stat after it.

🤖 Generated with Claude Code

…ily (Part of #8863)

--live runs each registry rule over the keyword-rosetta sources instead of reading the
manifests, so the families the corpus does not plant are reached; a Live vs manifest
section names planted families the two sources count differently. Report only.

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 Nov 24, 2026
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot marked this pull request as ready for review November 24, 2026 18:00
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) November 24, 2026 18:00
@squid-shepherd
squid-shepherd Bot merged commit 5427354 into main Nov 24, 2026
57 checks passed
@squid-shepherd
squid-shepherd Bot deleted the churn/8863-20261124T1750Z branch November 24, 2026 18:13
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