Repository navigation
fix(haskell): bitwise_ops matches .&. and .|.; io counts operations, not the IO type - #8935
Conversation
…not the IO type (Part of #8904) Found by the keyword-family validity tool (#8864) with a Haskell oracle on pandoc's src/ (5,990 functions). bitwise_ops: the rule ended `\.&&\.|\|\.\|\|\.`, spellings Haskell does not have, so Data.Bits' `.&.` and `.|.` never matched (recall 0.0; the family fired in 11 functions on the words shift/xor used as identifiers). It now reads `\.&\.|\.\|\.`: recall 0.0 -> 1.0 on pandoc. io: `IO` was in the keyword list, so every function whose signature mentions the IO type counted as I/O (60 functions fired where the parser sees 44 real operations). The io contract is "an operation that moves data between the program and a system outside its own runtime ... at its invocation"; a type in a signature is not one. `IO` is removed: precision 0.37 -> 0.80, recall 0.50 -> 0.45 (one function had been matched by its type alone). Not in this change: `decorators` (a `{-# INLINE #-}` pragma sits above the function, outside the span the engine counts; the same mechanism as the Python decorators gap, #8857) and the `throwError`/`fail` question for panics_and_aborts. Eleven bitwise false positives remain: functions that use `shift` or `xor` as an ordinary identifier, inherent to a text rule. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_018srRvejJbzNR67xR3D2VxV
…rt of #8904) The intended effect of 471e0d9 on the haskell/pandoc entry in both golden fixtures: File & Network I/O falls (App.hs 12 -> 2, Shared.hs 2 -> 0) because the `IO` type in a signature no longer counts as an I/O operation; repository-fingerprint and drift values follow, and one DNA hit disappears. Regenerated with tests/tools/crucible_check.py --update --yes; nothing else changed. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_018srRvejJbzNR67xR3D2VxV
|
No description provided. |
|
This PR conflicts with main, so no checks ran. Merge origin/main into it and regenerate generated files with their tools (never hand-merge them), then push. |
…asters Resolved the gpu_json.json conflict (generated) by taking main's file and re-running tests/tools/crucible_check.py --update --yes; the PR's golden diff is again only the haskell/pandoc I/O effect. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_018srRvejJbzNR67xR3D2VxV
|
CI shepherd: the head of this PR (3ea03bf) is not the one a maintainer labelled |
|
No description provided. |
|
No description provided. |
|
No description provided. |
|
PR #8935 @ 3ea03bf: 10 failed check(s) == crucible (cancelled) -- infra == db2 ${{ matrix.shard }} (cancelled) -- infra == full-suite (cancelled) -- infra == full-suite part ${{ matrix.group }}/${{ needs.shard-plan.outputs.splits }} (cancelled) -- infra == measure (shard ${{ matrix.shard }}/${{ matrix.total }}) (cancelled) -- infra == publish-history (cancelled) -- infra == shard ${{ matrix.shard }} (cancelled) -- infra == shard ${{ matrix.shard }} (${{ matrix.loc }} LOC) (cancelled) -- infra == store the suite's durations (cancelled) -- infra == suite time budget (#5166) (cancelled) -- infra |
…8904 # Conflicts: # tests/golden_master_audit/12_scan_output_snapshots/gpu_json.json # tests/golden_master_audit/12_scan_output_snapshots/graph_sqlite.json # tests/golden_master_zero_dep_audit/12_scan_output_snapshots/gpu_json.json # tests/golden_master_zero_dep_audit/12_scan_output_snapshots/graph_sqlite.json
…red.hs move, from this PR's Haskell family fix) Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
CI shepherd: the head of this PR (e32826d) is not the one a maintainer labelled |
… the Haskell changes Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…ell changes Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Part of #8904 (does not close it: decorators and the throwError/fail question remain).
What and why
Found by the keyword-family validity tool (#8864) with a Haskell oracle on pandoc
src/(5,990 functions, 237 files).\.&&\.|\|\.\|\|\., spellings Haskell does not have, so Data.Bits.&.and.|.never matched. Now\.&\.|\.\|\..IOwas in the keyword list, so every function withIOin its signature counted as I/O. The io contract is an operation that moves data "at its invocation"; a type is not one.IOremoved.Measured (same oracle, same scan, before -> after)
branch, args, debug_prints, panics_and_aborts unchanged. Remaining bitwise false positives (11) are functions using
shift/xoras ordinary identifiers, a limit of a text rule. io recall dips because one function had matched only by its type.Gates
test_haskell_strict.py; Haskell suites 188 passed.pr_gates --ratchets: all pass.portsneeds a JDK with javac on this box (JDK 17); it passes withJAVA_HOMEset, and fails without it for environment reasons only.App.hs,Shared.hs: File & Network I/O 12 -> 2 and 2 -> 0, fingerprint drift follows). Goldens re-blessed withcrucible_check.py --update --yesin a second commit.Not in this PR
decorators(pragma sits above the function span, same mechanism as #8857) and whetherthrowError/failcount as bailouts (a contract question).🤖 Generated with Claude Code
https://claude.ai/code/session_018srRvejJbzNR67xR3D2VxV