Skip to content

fix(haskell): bitwise_ops matches .&. and .|.; io counts operations, not the IO type - #8935

Merged
squid-protocol merged 8 commits into
mainfrom
fix/haskell-families-8904
Nov 22, 2026
Merged

squid-protocol merged 8 commits into
mainfrom
fix/haskell-families-8904

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

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).

  • bitwise_ops: the rule ended \.&&\.|\|\.\|\|\., spellings Haskell does not have, so Data.Bits .&. and .|. never matched. Now \.&\.|\.\|\..
  • io: IO was in the keyword list, so every function with IO in its signature counted as I/O. The io contract is an operation that moves data "at its invocation"; a type is not one. IO removed.

Measured (same oracle, same scan, before -> after)

family before after
bitwise_ops recall 0.00, precision 0.00 recall 1.00, precision 0.15
io recall 0.50, precision 0.37 recall 0.45, precision 0.80

branch, args, debug_prints, panics_and_aborts unchanged. Remaining bitwise false positives (11) are functions using shift/xor as ordinary identifiers, a limit of a text rule. io recall dips because one function had matched only by its type.

Gates

  • New tests in test_haskell_strict.py; Haskell suites 188 passed.
  • Keyword-rosetta Haskell verifier: output identical to main, so no rebless owed.
  • pr_gates --ratchets: all pass. ports needs a JDK with javac on this box (JDK 17); it passes with JAVA_HOME set, and fails without it for environment reasons only.
  • Differential scan: diff confined to haskell/pandoc (App.hs, Shared.hs: File & Network I/O 12 -> 2 and 2 -> 0, fingerprint drift follows). Goldens re-blessed with crucible_check.py --update --yes in a second commit.

Not in this PR

decorators (pragma sits above the function span, same mechanism as #8857) and whether throwError/fail count as bailouts (a contract question).

🤖 Generated with Claude Code

https://claude.ai/code/session_018srRvejJbzNR67xR3D2VxV

squid-protocol and others added 2 commits November 21, 2026 14:47
…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
@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Nov 21, 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 21, 2026 20:05
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-shepherd

Copy link
Copy Markdown
Contributor

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.

@squid-shepherd squid-shepherd Bot added the shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md label Nov 21, 2026
…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
@squid-shepherd squid-shepherd Bot removed the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Nov 21, 2026
@squid-shepherd

Copy link
Copy Markdown
Contributor

CI shepherd: the head of this PR (3ea03bf) is not the one a maintainer labelled shepherd:merge on (new commits, or never approved), so the label was removed and nothing merges unreviewed code. Re-add the label when the new head is ready (shepherd:reapprove marks this PR until then). Until then it is a draft and runs the cheap audits only; re-adding the label marks it ready, which starts the full set on that head.

@squid-shepherd
squid-shepherd Bot marked this pull request as draft November 21, 2026 21:37
@squid-shepherd squid-shepherd Bot added shepherd:reapprove Bot: new commits dropped shepherd:merge; re-add it to merge this head. Guide: docs/ci.md and removed shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md labels Nov 21, 2026
@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Nov 21, 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 21, 2026 21:51
@squid-shepherd squid-shepherd Bot added shepherd:retrying Bot: an infra/flake rerun is pending on this head. Guide: docs/ci.md and removed shepherd:reapprove Bot: new commits dropped shepherd:merge; re-add it to merge this head. Guide: docs/ci.md labels Nov 21, 2026
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) November 21, 2026 21:56
@squid-shepherd

Copy link
Copy Markdown
Contributor

PR #8935 @ 3ea03bf: 10 failed check(s)

== crucible (cancelled) -- infra
https://github.com/squid-protocol/gitgalaxy/actions/runs/44952148471/job/136993243564
repro: tests/tools/box/heavy-run.sh python -m pytest -q tests/cics_crucible && tests/tools/box/heavy-run.sh python tests/tools/cics_crucible.py --ci --out /tmp/gitgalaxy-scratch/ci-digest/cics
log tail:
(log unavailable: gh: HTTP 404)

== db2 ${{ matrix.shard }} (cancelled) -- infra
https://github.com/squid-protocol/gitgalaxy/actions/runs/44952148525/job/136993238741
repro: python tests/tools/pr_gates.py --fast
log tail:
(log unavailable: gh: HTTP 404)

== full-suite (cancelled) -- infra
https://github.com/squid-protocol/gitgalaxy/actions/runs/44952148354/job/136993266656
repro: python -m pytest -q tests
log tail:
(log unavailable: gh: HTTP 404)

== full-suite part ${{ matrix.group }}/${{ needs.shard-plan.outputs.splits }} (cancelled) -- infra
https://github.com/squid-protocol/gitgalaxy/actions/runs/44952148354/job/136993266908
repro: python tests/tools/pr_gates.py --fast
log tail:
(log unavailable: gh: HTTP 404)

== measure (shard ${{ matrix.shard }}/${{ matrix.total }}) (cancelled) -- infra
https://github.com/squid-protocol/gitgalaxy/actions/runs/44952148471/job/136993242631
repro: python tests/tools/pr_gates.py --fast
log tail:
(log unavailable: gh: HTTP 404)

== publish-history (cancelled) -- infra
https://github.com/squid-protocol/gitgalaxy/actions/runs/44952148638/job/136993284675
repro: python tests/tools/pr_gates.py --fast
log tail:
(log unavailable: gh: HTTP 404)

== shard ${{ matrix.shard }} (cancelled) -- infra
https://github.com/squid-protocol/gitgalaxy/actions/runs/44952148525/job/136993238775
repro: python tests/tools/pr_gates.py --fast
log tail:
(log unavailable: gh: HTTP 404)

== shard ${{ matrix.shard }} (${{ matrix.loc }} LOC) (cancelled) -- infra
https://github.com/squid-protocol/gitgalaxy/actions/runs/44952148561/job/136993231013
repro: python tests/tools/pr_gates.py --fast
log tail:
(log unavailable: gh: HTTP 404)

== store the suite's durations (cancelled) -- infra
https://github.com/squid-protocol/gitgalaxy/actions/runs/44952148354/job/136993266818
repro: python tests/tools/pr_gates.py --fast
log tail:
(log unavailable: gh: HTTP 404)

== suite time budget (#5166) (cancelled) -- infra
https://github.com/squid-protocol/gitgalaxy/actions/runs/44952148354/job/136993267048
repro: python tests/tools/pr_gates.py --fast
log tail:
(log unavailable: gh: HTTP 404)
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.

@squid-shepherd
squid-shepherd Bot disabled auto-merge November 21, 2026 22:34
@squid-shepherd squid-shepherd Bot added the shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md label Nov 21, 2026
@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) November 21, 2026 22:50
@squid-shepherd squid-shepherd Bot removed the shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md label Nov 21, 2026
@squid-shepherd
squid-shepherd Bot disabled auto-merge November 21, 2026 22:58
@squid-shepherd squid-shepherd Bot added the shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md label Nov 21, 2026
@squid-shepherd squid-shepherd Bot added the shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md label Nov 22, 2026
@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) November 22, 2026 04:22
@squid-shepherd squid-shepherd Bot removed the shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md label Nov 22, 2026
@squid-shepherd
squid-shepherd Bot disabled auto-merge November 22, 2026 04:29
@squid-shepherd squid-shepherd Bot added the shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md label Nov 22, 2026
@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) November 22, 2026 04:33
@squid-shepherd squid-shepherd Bot removed the shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md label Nov 22, 2026
@squid-shepherd
squid-shepherd Bot disabled auto-merge November 22, 2026 04:41
@squid-shepherd squid-shepherd Bot added the shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md label Nov 22, 2026
@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) November 22, 2026 05:26
@squid-shepherd squid-shepherd Bot removed the shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md label Nov 22, 2026
@squid-shepherd
squid-shepherd Bot disabled auto-merge November 22, 2026 05:30
@squid-shepherd squid-shepherd Bot added the shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md label Nov 22, 2026
@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) November 22, 2026 05:45
@squid-shepherd squid-shepherd Bot removed the shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md label Nov 22, 2026
@squid-shepherd
squid-shepherd Bot disabled auto-merge November 22, 2026 05:46
@squid-shepherd squid-shepherd Bot added the shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md label Nov 22, 2026
@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) November 22, 2026 06:13
@squid-shepherd squid-shepherd Bot removed the shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md label Nov 22, 2026
@squid-shepherd
squid-shepherd Bot disabled auto-merge November 22, 2026 06:18
@squid-shepherd squid-shepherd Bot added the shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md label Nov 22, 2026
@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) November 22, 2026 06:21
@squid-shepherd squid-shepherd Bot removed the shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md label Nov 22, 2026
squid-protocol and others added 2 commits November 22, 2026 09:53
…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]>
@squid-shepherd

Copy link
Copy Markdown
Contributor

CI shepherd: the head of this PR (e32826d) is not the one a maintainer labelled shepherd:merge on (new commits, or never approved), so the label was removed and nothing merges unreviewed code. Re-add the label when the new head is ready (shepherd:reapprove marks this PR until then). Until then it is a draft and runs the cheap audits only; re-adding the label marks it ready, which starts the full set on that head.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

shepherd:reapprove Bot: new commits dropped shepherd:merge; re-add it to merge this head. Guide: docs/ci.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant