Repository navigation
Ruby keyword families: print, io, regex, time, bitwise rules count the operative form (Part of #8863) - #9360
squid-protocol wants to merge 19 commits into
Conversation
|
No description provided. |
|
No description provided. |
|
PR #9360 @ 6eb7b00: 1 failed check(s) == rosetta-audit (failure) -- real |
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ldens after main merge (Part of #8863) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
CI shepherd: the head of this PR (0a35286) is not the one a maintainer labelled |
|
No description provided. |
1 similar comment
|
No description provided. |
|
PR #9360 @ 0a35286: 13 failed check(s) == crucible (cancelled) -- infra == db2 ${{ matrix.shard }} (cancelled) -- infra == full-suite (cancelled) -- infra == ground-truth (cancelled) -- infra == ground-truth part 1/4 (cancelled) -- infra == ground-truth part 2/4 (cancelled) -- infra == ground-truth part 3/4 (cancelled) -- infra == ground-truth part 4/4 (cancelled) -- infra == publish-history (cancelled) -- infra == rosetta-audit (failure) -- real == shard ${{ matrix.shard }} (cancelled) -- infra == store the suite's durations (cancelled) -- infra == suite time budget (#5166) (cancelled) -- infra |
|
CI shepherd: the head of this PR (5f5ee01) is not the one a maintainer labelled |
|
No description provided. |
3 similar comments
|
No description provided. |
|
No description provided. |
|
No description provided. |
|
PR #9360 @ 5f5ee01: 12 failed check(s) == crucible (cancelled) -- infra == full-suite (cancelled) -- infra == full-suite part ${{ matrix.group }}/${{ needs.shard-plan.outputs.splits }} (cancelled) -- infra == ground-truth (cancelled) -- infra == ground-truth part ${{ matrix.shard }} (cancelled) -- infra == ground-truth-warm (cancelled) -- infra == publish-history (cancelled) -- infra == rosetta-audit (failure) -- real == shard ${{ matrix.shard }} (${{ matrix.loc }} LOC) (cancelled) -- infra == shard 3 (1675759 LOC) (failure) -- real == store the suite's durations (cancelled) -- infra == suite time budget (#5166) (cancelled) -- infra |
|
Waiting on an owner decision (asked privately, 2026-11-26). Nothing is needed from contributors; work resumes once it is answered. |
|
CI shepherd: the head of this PR (47d6486) is not the one a maintainer labelled |
#9331) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
CI shepherd: the head of this PR (47d6486) is not the one a maintainer labelled |
|
No description provided. |
|
PR #9360 @ cf118c9: 1 failed check(s) == rosetta-audit (failure) -- real |
|
CI shepherd: the head of this PR (aa97fa5) is not the one a maintainer labelled |
|
No description provided. |
1 similar comment
|
No description provided. |
|
CI shepherd: |
|
No description provided. |
|
CI shepherd: |
|
No description provided. |
1 similar comment
|
No description provided. |
|
PR #9360 @ ea3a295: 1 failed check(s) == rosetta-audit (failure) -- real |
Part of #8863. Issue: #9331.
Checklist: partial [c:f3acbbc3]
What changed
Ruby's keyword-family rules counted the wrong construct, and the oracle had one bug. Measured on the pinned language-crucible (v1.9.0, 441 Ruby functions matched), recall / precision before -> after:
debug_prints(state_print_hits)io(arch_io)regex_execution(arch_regex)time_date_logic(arch_time)bitwise_opsdoc(is_documented)thread_sleepssleepcall)ruby.py:debug_printscounts the Kernel call (no receiver, not adef, not a block parameter, notlogger.warn) and$stdout/$stderrwriters;iodrops the bare wordsfind|where|create|update|destroy,FileandDir, and counts the data calls;regex_executionadds regex literals,!~,%r,Regexp.compile|union;time_date_logicdropssleepand countsTime.*,Date.*,strftime,Process.clock_gettime;bitwise_opscounts operator-position forms only (no regex^, no<<~heredoc).family_oracle_specs_b.py:a << x if y(a modifier-if body) is a statement append, not a shift; node comparison uses==(tree-sitter nodes are not identical objects), soa << x << ychains are skipped as intended.test_ruby_family_validity_9331.py: counted and not-counted lines per rule.test_ruby_strict.py: three pinned negatives replaced (printf,Time.atare in the oracle's contract)..rbpaths: 384 mismatches in the bless log, all Ruby), the Ruby cells offamily_validity_baseline.json(a rerun of the whole sweep also moved Pythonio, from main drift; left out), the two SVGs.Class / Sibling gaps
is_documentedstays red (0.07 / 0.02). Contract question filed on Epic: keyword-family validity -- do the per-function signals measure what their names say? #8863: the oracle treats any plain#block abovedefas RDoc, whiletest_ruby_strict.pypins# some regular commentas not structured documentation, and the detector's 5-line header window leaks a neighbouring method's comment onto a short next method (a plain-#rule measured 1.00 / 0.37 for that reason). I did not widen the rule without a ruling.thread_sleeps: the rule counted onlysleep <number>; the oracle (Kernel#sleep) counts any argument. Nowsleep(timeout),sleep delay,Kernel.sleep 1count;def sleep,sleep = x,:sleep,sleep:,obj.sleep,sleep_timedo not. Tests intest_ruby_family_validity_9331.py; thetest_ruby_strict.pypinned negativesleep(timeout)replaced. No golden moved (no Ruby sleep in the crucible).iono longer countsActiveRecord::Base,where,find,create,update,destroy; whether ORM calls are data movement is a contract question for Epic: keyword-family validity -- do the per-function signals measure what their names say? #8863.Family-validity checklist
Cross-repo
Companion: keyword-rosetta,
python tools/rebless.py rubymovesmain.rbio 3 -> 1 (the control plant uses bareFile/Dir). It needs a rebless PR after this merges; this PR merges first. Re-run: the rosetta ruby verify.Gates
ruff format/check,
audit_check.py,pr_gates --fast(9/9),--ratchets(9 pass), Ruby test files, family-validity tests. CPU,data/ruby, 3 alternating runs: base 3.22 / 3.14 / 3.12 s, branch 3.20 / 3.12 / 3.20 s. Not run locally: tri-comparison and tree-sitter audit runners (no function-extraction rule changed).Lessons for agents
isfails acrossparent/child_by_field_namecalls; use==.docrule runs over the comment stream and the code stream separately, so a lookahead from a comment line to the nextdefnever sees the code.--writealso rewrites cells that moved on main; write only the language's cells.🤖 Generated with Claude Code
Update: merged origin/main twice (JS #9375 landed), re-blessed both goldens via golden-lock.sh and regenerated the family-validity SVGs. audit_check all clear; ruby tests pass.