Repository navigation
Scala keyword families: closures and bitwise_ops count only their own construct (Part of #8863, #9332) - #9361
Merged
Merged
Conversation
… construct (Part of #8863, #9332) closures no longer counts case arms or function-type arrows; bitwise_ops needs operands on both sides and skips pattern alternatives. Pinned crucible: closures precision 0.797 -> 0.989, bitwise_ops precision 0.20 -> 1.00. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
# Conflicts: # docs/self_scan/family_validity_chart.svg # tests/golden_master_audit/12_scan_output_snapshots/gpu_json.json # tests/golden_master_audit/2_global_ecosystem_summary/file_composition_distribution.json # tests/golden_master_audit/2_global_ecosystem_summary/function_archetype_distribution.json # tests/golden_master_audit/2_global_ecosystem_summary/summary.json # tests/golden_master_zero_dep_audit/12_scan_output_snapshots/gpu_json.json # tests/golden_master_zero_dep_audit/2_global_ecosystem_summary/file_composition_distribution.json # tests/golden_master_zero_dep_audit/2_global_ecosystem_summary/function_archetype_distribution.json # tests/golden_master_zero_dep_audit/2_global_ecosystem_summary/summary.json
…ain (Part of #9332) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
1 task done
Contributor
|
No description provided. |
Contributor
This was referenced Nov 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #8863. Refs #9332 (does not close it: five cells are not measurable on the pin).
Checklist: partial [c:4fe6001e] -- the five unpinned cells (regex_execution, thread_sleeps, io, time_date_logic, debug_prints) are measurable only on kafka and are left as sibling gaps
What changed
Scala has 7 red cells. Two are on the pinned language-crucible v1.9.0 (575 Scala functions); five are
pinned: false(scored on kafka only, so no number can be quoted from the pin). The two pinned cells now pass:closures=>:casearms,def/typeheader arrows,name: A => Bparameter types, and_in patternsbitwise_ops|incase A | Band[a|b]text, astripMarginbar, and&/^/~without operandsclosuresnow counts one match per line holding an anonymous-function arrow (notcase, not a header or parameter type), plus_only in argument or operator position.bitwise_opsneeds operands on both sides of& ^ << >>, spaces around|(outsidecaselines unless after anifguard), and~only as a unary operator. Other Scala cells did not move (args0.97,struct_branch0.94). The whole Scala row was re-read.Class / Sibling gaps
The class is "a Scala family rule counts a token that also has a non-family use". Siblings, with status:
regex_execution,thread_sleeps,io,time_date_logic,debug_prints.ioanddebug_printsare over-counts and the three recall misses may need a contract question on Epic: keyword-family validity -- do the per-function signals measure what their names say? #8863. A headless worker files no issue; the reviewer should.val Some(_) = optstill counts_as a placeholder; a function-typedval f: A => B = ...line still counts;a|bwithout spaces is not counted; a mid-line{ case A | B =>alternative is not excluded. Counting is per line now, so counts differ from per-match counting.Family-validity checklist
iodrift was kept out)tests/extraction/languages/test_scala_family_validity_9332.py(positive and negative forms);test_scala_strict.pyandtest_scala.pypassgolden-lock.sh crucible_check.py --update --yes; drift is Scala closure/bitwise counts and the archetype aggregates they feedverify_language.py scala: PASS (88 assertions) on base and branch, so norosetta:rebless-oweddata/scala, user seconds, base 4.25 / 4.52 / 4.55 vs branch 4.16 / 4.41 / 4.44 (no regression)pr_gates --fast9/9,--ratchets9 passRemaining slices
The five unpinned cells above, once they have a pinned corpus or a contract ruling.
Lessons for agents
cells['<lang>'].(?m)in a joined alternation breaks the scan; use(?m:...).Cross-repo
No companion PR. keyword-rosetta
verify_language.py scalapasses on this branch, so nothing re-runs there. Merge order: none.🤖 Generated with Claude Code