Repository navigation
Python keyword families: all nine red cells read 0.8 or better on the pinned crucible (Part of #8863) - #9308
Conversation
…e (Part of #8863) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…crucible reads 0.8 or better (Part of #8863) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…#8863) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
No description provided. |
|
PR #9308 @ 1a61f18: 1 failed check(s) == shepherd (label event) (failure) -- real |
…uments the new rule (red main after #9308) (#9316) * fix(python): `.filter(` is not a comprehension; the bitwise test documents the new string rule (red main after #9308) #9308 (aef60af) left two tests in tests/extraction/languages/test_python_strict.py failing on main. Each is a different kind of failure: 1. comprehensions: the added functional-builtin alternative `\b(?:map|filter|reduce|starmap)\(` matched the METHOD `qs.filter(`, because \b holds after a dot. That is exactly the false positive test_python_comprehensions_was_fixed_from_a_javascript_copy_paste guards (Django's `User.objects.filter(...)`). Now: bare `map(` / `filter(` / `reduce(` / `starmap(`, plus the explicit `functools.reduce(` and `itertools.starmap(` forms; a method of anything else no longer counts. 2. bitwise_ops: #9308 deliberately stopped counting an operator after the first quote on a line (its own comment states the cost). The old test still asserted the pre-change behaviour (`re.compile(r"^a~b<<")` matching). The test now documents the new rule: operator before the quote counts, inside a string literal does not. This narrows #2535 / #8866's "no string shielding" decision; flagged in the PR for the owner. Re-blessed on main's pin (language-crucible v1.8.0): both golden-master legs (90 differences, all comprehension-count and cluster-distance shifts), the one family-baseline cell it moves (python/comprehensions: n_family 177 -> 175, recall 0.859 -> 0.848) and the family-validity SVGs. The full family sweep also reports 11 stale cells in c / go / javascript / rust / typescript that this change does not touch; they are left as they are. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> * test(python): re-bless the golden masters and family charts on the tree merged with main (Swift keyword families) 6 differences per golden-master leg. family_oracle_sweep agrees with the merged baseline except for 11 cells (c, go, javascript, rust, typescript) that are stale on main and unrelated to this change; the python/comprehensions cell and the new Swift cells match. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> --------- Co-authored-by: Claude Sonnet 5.5 <[email protected]>
…(Part of #9321) (#9322) Class guard for the #9308 regression fixed by #9316. Co-authored-by: Claude Sonnet 5.5 <[email protected]>
Part of #8863
Python's nine red cells in the keyword-family validity grid are now all at or above 0.8 (recall and precision) on the pinned language-crucible v1.8.0. Numbers are from
family_oracle_sweep.py; the committed baseline's python cells are regenerated from it.Cells (recall / precision, before -> after)
logging/loggerreceivers named; Airflow-styleself.log.*,LOG.*missedEvent/Barrierwords, missed.acquire(/.release(); oracle:release(code)andacquireon non-lock receivers counted|in annotations /A | Bunions; oracle:|=and nested-def return annotationstime.sleepdouble-owned,.now/utcnow/today(, baregmtime(missed; oracle: clock namesopen,socket,requests) in non-call positions;.read/.write/.readline/.mkdir(missedanyio.sleep, baresleep(afterfrom time import sleepexit(; oracle:system/abortonly count onosforstatement after an open bracket;map/filter/reduce/starmap(formsfamily_red_cells.pyreports no red python cell.What changed
languages/python.py: rule fixes for the nine families above (shared_COMP_FORhelper for the bracket comprehension forms).languages/embedded_python.py: the 14.pyfiles under the crucible'sembedded_python/use that profile but are scored in the "python" cells, so itstelemetryandsync_locksneeded the same fixes.tests/tools/family_oracle.py(+test_family_oracle.py): oracle brought to the contracts (async nodes count as concurrency;|=counts as bitwise; nested-def return unions excluded; lock/clock/danger receivers tightened).tests/test_python_family_validity_8863.py(new): positive and negative line tables per family.tests/family_validity_baseline.json(python cells only; other languages' stale cells left as on main), the twodocs/self_scan/family_validity_*.svg, and both golden masters.Gates
golden-lock.sh crucible_check.py --update --yes. The first attempt was refused (box load 39.7, onechecker.tsregex timeout); I waited for load under 8 and re-ran, with no timeout bypass. Visible drift is all.pyfiles (python, embedded_python, and.pyhelper scripts living in the fortran and cpp corpora); no non-python extension is in the shown differences. The log caps the list, so the unseen tail was not attributed per file.pr_gates.py --fast9/9 (after regenerating the stale SVGs),--ratchets9/9,audit_check.pyall clear.galaxyscopeonlanguage-crucible/data/python,GALAXYSCOPE_MAX_WORKERS=1, 3 alternating runs, user s): main 15.03 / 14.79 / 14.87 (mean 14.90), branch 15.22 / 15.25 / 15.28 (mean 15.25): +2.3%.rosetta_audit.pyagainst main as baseline: 51 languages, 0 regressions.python(2 mismatches) andembedded_python(1) fail identically on main (pre-existing drift), unchanged by this PR.Class / Sibling gaps
tests/family_validity_baseline.jsonare stale against the sweep (it rewrites every language); I kept them as on main and only changed python. A remeasure of the whole grid is thefamily-validity-remeasureskill's job.arch_globalsfor python reads 0.79 / 0.89; it is not in the epic's list for python, so I left it.embedded_pythonis a sibling profile scored in the python cells: fixed for telemetry and sync_locks only because those were what its files moved. Its other families were not audited separately.|and 1&missed).socket.socket()is counted by the io rule but not by the oracle. sync_locks and high_risk_execution have thin oracle counts (8 and 13), so their 1.0 values are a small sample.Plan differences
The plan listed 4 hand-written files; the work needed
embedded_python.pyas well (above), and high_risk_execution turned out to need a rule-sideexit(fix rather than being already green. The baseline's stale function counts were replaced by the sweep's.Not in this PR
arch_globalsfor python.family_missing_keywords.py(owned by another worker).Remaining slices
None for the nine python cells. Open questions for the contract (not filed): none; the contracts were specific enough to rule on every cell.
Checklist: done [c:b49e1cd0] -- all 9 python cells >= 0.8 on the pinned crucible; arch_globals and other languages not in scope
Cross-repo
None: engine-only. The keyword-rosetta corpus is unchanged and shows no new regression.
🤖 Generated with Claude Code