Include RustAC through a general simple-fold view
perfloop-oss/casei · UNCATALOGUED MECHANISM
https://perfloop.ai/t/oss/case_7n9hd97rqc
Verdict
VERIFIED · settled 2026-10-21 · merged as tsenart/casei#42
What happened: The assertion is satisfied with this change.
Hypothesis
Make folded generality-board comparisons include a general, honestly labeled RustAC adaptation. This supplies comparison coverage without enumerating every spelling of a literal. The required workload is BenchmarkBoard's112 folded Find, Each and IndexFold operations on the original pinned nonempty validUTF8 patterns and input. Conformance, integration and practical resource costs remain unproved.
At22ed84b, boardEntrant177–276 excludes RustAC outside the coarse ASCII tier. Its existing exact constructor can instead compile one canonical UTF8 literal per original pattern. Choose one rune representative from each complete Unicode-simple-fold orbit; this is not Unicode normalization or full folding. Convert each haystack to the same representation and retain exact original offsets at canonical rune boundaries. Compile in original pattern order, leave native restart positions canonical, and project callback starts and ends back to source bytes. UTF8 boundaries, original-ID priority and source widths are essential premises, not optional checks.
The bound is the112 folded RustAC entrant-cell obligations, including at most69 languages not yet certified after this run's earlier scoped studies. Overlapping obligations count once. This is a named comparison-integrity prerequisite and removes zero casei CPU cost. One canonical pattern per original avoids multiplicative whole-word variants; choosing the minimum scalar does not increase encoded length. The per-call text and origin map are linear in input bytes, but native construction, allocations and retained resources must still be measured and disclosed. No census-derived form cap is justified.
This is distinct from hyp_hemyx8zyj8/case_mtwn2vqphj's thirteen unchanged-API equivalences and hyp_khv3hrrrdd/case_8bc9d0mc7f's eighteen-word expansion and original-ID projection. No result from either still-open Case is assumed. Preserve useful direct bindings when their complete premises hold; the new view supplies general support rather than deliberately handicapping an existing mode. All conversion and projection costs belong in the timed operation.
Only arena translated-mode state, boundary maps, verification and native-lifetime plumbing are added. No consumer-visible casei operation, type or configuration changes, and casei search never delegates to this entrant. Preserve both raw non-ASCII caseless guards. A board-only proof does not justify an unqualified global UTF8 tier declaration while other arena consumers still exclude it. The current field documents timed equivalence adaptations; acceptance of this particular design is unknown.
For the pinned nonempty validUTF8 board population, one scalar representative per complete simple-fold orbit plus an exact origin-boundary map is a lossless reduction to the unchanged RustAC exact API. Native LeftmostFirst preserves presented pattern order, including canonical duplicates. Construction and operation resources remain practical for the original board without a fitted expansion cap.
On the original 200-cell board at 22ed84b with Go1.26.6/Unicode15, original seeds and digests, require RustAC support for all112 folded operations, with all other declared slots and all88exact operations preserved. Independently exercise the translated view on every folded cell even when an already-certified cheaper binding is selected. Strictly compare complete starts, original IDs, source widths and non-overlapping streams; do not rely on agree accepting unreported IDs or widths. Require exact origin maps at every canonical rune boundary and EOF, checked offset conversions, and no projected source offset fed back into native canonical restart positions. Required controls include all complete fold-orbit members, canonical duplicate patterns, reversed prefix priority, Kelvin and long-s width changes, sigma variants, sharp-s without full-fold ss expansion, no-match and dense streams, more than256matches, and callback stop at1,256and257. For ["K","k"] on "kK", require Each (0,0,1),(1,0,3). For ["k","ka"] versus ["ka","k"] on "Ka", require selected widths3 versus4. Require exactly the requested callbacks when stopping across batches. Establish nested/concurrent-call scratch ownership, keepalive and deterministic native lifetime. Keep raw caseless guards and native sources unchanged, record the translated mode honestly, and keep widths diagnostic-only. Put every haystack conversion, boundary-map fill, native operation and span projection inside the timed operation; prohibit preconverted fixtures and content/result caches. Report allocation, peak/retained scratch, construction and first-operation costs; propagate construction/resource failures as errors, never silent unsupported exclusions. Independent verifier expectations must reject missing supported slots, invalid ratios and unsupported extra flags without weakening family/cell rules. Reject if language, priority, source spans, stopping, integration or timed-cost accounting fails. No numeric matcher speedup or performance-board pass is required by this comparison-correctness Case.
No implementation or runtime probe of this canonical view was run. A read-only adviser, given the source, agreed with the reduction subject to exact boundary mapping, original pattern order, UTF8 premises and lifetime proof; that is advice, not independent runtime evidence. The adviser also warned that existing board agreement can tolerate unreported IDs/widths and that global tier changes would need other arena consumers updated. The Case must check those facts in its frozen source and use strict comparisons.
Empty patterns, malformed/opaque pattern bytes and malformed input are outside this view's selected workload; no claim about their general library semantics is changed. Converted haystacks and maps cannot be retained as precomputed fixture state. Whole-haystack conversion before Find or an early callback can be expensive and must be charged. Raw exact and raw ASCII modes remain distinct. This Case does not complete the other entrants' support audit, current Rebar reporting, matcher performance design or final combined-revision proof.
Change to test: Add an arena-only, explicitly labeled simple-fold view over unchanged RustAC exact matching, with one canonical literal per original pattern and exact source-boundary span projection. Integrate its general folded-board support and independent verifier expectations, timing conversion and projection while preserving existing certified modes, raw guards and availability policy.
Where it lives
perfloop-oss/casei · arena/board_bench_test.go
Evidence
The assertion is satisfied with this change: `Under Go 1.26.6 and Unicode 15.0.0, RustAC's arena-only simple-fold view compiles one canonical literal per original pattern in order and, for all 112 folded cells of the original pinned 200-cell BenchmarkBoard with nonempty valid-UTF8 patterns and haystacks, returns the oracle's exact Find/IndexFold result or complete non-overlapping Each stream, including original pattern IDs and source-byte widths; its source map is exact at every rune boundary and EOF, native restarts remain canonical, and Each stops at exactly callbacks 1, 256, and 257. The 35 ASCII-folded cells plus 88 exact cells retain their direct RustAC modes.`
Checks: 6 of 6 passed. Verification: no defect found.