Skip to content

perf(tools): combined-alternation candidate-finder parity harness (Part of #3073) - #5428

Merged
squid-protocol merged 1 commit into
mainfrom
churn/3073-20261018T0756Z
Oct 18, 2026
Merged

squid-protocol merged 1 commit into
mainfrom
churn/3073-20261018T0756Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #3073 (does not close it: the issue stays deferred, see #5361).

What

tests/tools/combined_alternation_parity.py: the parity precondition the issue sets for ever reopening. A first-pass candidate finder (one combined regex of rule-required literals, one sweep per segment) plus a corpus audit over language-crucible and keyword-rosetta. Contract: every rule whose finditer matches is a candidate. Engine unchanged; no golden movement.

Design: zero-width lookahead scan over literals reduced to those with no other literal as a substring (so leftmost-wins cannot consume text a second literal needs); case-insensitive gates use a second regex over fold_haystack(text); ungated rules are always candidates. It is a superset of today's per-rule gate, so it only pays if a fleet-scale phase_ab.py run shows a large many-small-rules residual.

Evidence

  • crucible: 55 languages, 2,995 files, raw + code_stream surfaces: zero missed candidates (2m12s).
  • rosetta: zero missed candidates.
  • pr_gates --fast 6/6; new test file 5 tests, 2.9s; time ratchet 0 over limit.
  • Ratchets (--ratchets) not run: tools/docs only, no parsing logic touched.

Class table

Member Status
#3070 literal prefilter shipped
#3072 per-line gate shipped
#3073 combined finder harness only, engine deferred

No burned-estate program needs this. Sibling gaps: none. The plan said the issue had no unchecked item; I shipped the harness slice only.

🤖 Generated with Claude Code

…rt of #3073)

Harness only; the engine is unchanged and #3073 stays deferred.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Oct 18, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol marked this pull request as ready for review October 18, 2026 08:03
@squid-protocol
squid-protocol enabled auto-merge (squash) October 18, 2026 08:03
@squid-protocol
squid-protocol merged commit d4c96a7 into main Oct 18, 2026
43 checks passed
@squid-protocol
squid-protocol deleted the churn/3073-20261018T0756Z branch October 18, 2026 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant