Commit d550f31
fix(assail): char-boundary-aware advance in Isabelle cartouche skip (regression from #49)
`skip_cartouche_end` advanced its byte index by 1 in the no-open/no-close
branch, which puts `j` inside a multi-byte UTF-8 sequence when the
cartouche body contains non-ASCII (`¬`, `∀`, `⟹`, `🎉`, etc.). The next
iteration's `haystack[j..].starts_with(open)` then panics with
thread 'main' panicked at src/assail/analyzer.rs:5648:20:
start byte index 89 is not a char boundary; it is inside '¬' (...)
discovered on `echidna` full-tree scans during the 2026-05-26 estate
reconnaissance. Subsetting to `src/` worked around it; the proper fix
is to advance by `len_utf8()` of the current char.
Two regression tests: one with a sampled echidna text-cartouche body
(`¬¬A`, `∀x`, `⟹`), one with a 4-byte UTF-8 emoji to exercise the
full multi-byte range. Reproducer (full-tree assail on echidna) now
completes cleanly with 44 weak points.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent d449286 commit d550f31
1 file changed
Lines changed: 40 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5641 | 5641 | | |
5642 | 5642 | | |
5643 | 5643 | | |
| 5644 | + | |
| 5645 | + | |
| 5646 | + | |
| 5647 | + | |
| 5648 | + | |
5644 | 5649 | | |
5645 | 5650 | | |
5646 | 5651 | | |
| |||
5652 | 5657 | | |
5653 | 5658 | | |
5654 | 5659 | | |
5655 | | - | |
| 5660 | + | |
| 5661 | + | |
| 5662 | + | |
| 5663 | + | |
| 5664 | + | |
| 5665 | + | |
| 5666 | + | |
5656 | 5667 | | |
5657 | 5668 | | |
5658 | 5669 | | |
| |||
5924 | 5935 | | |
5925 | 5936 | | |
5926 | 5937 | | |
| 5938 | + | |
| 5939 | + | |
| 5940 | + | |
| 5941 | + | |
| 5942 | + | |
| 5943 | + | |
| 5944 | + | |
| 5945 | + | |
| 5946 | + | |
| 5947 | + | |
| 5948 | + | |
| 5949 | + | |
| 5950 | + | |
| 5951 | + | |
| 5952 | + | |
| 5953 | + | |
| 5954 | + | |
| 5955 | + | |
| 5956 | + | |
| 5957 | + | |
| 5958 | + | |
| 5959 | + | |
| 5960 | + | |
| 5961 | + | |
| 5962 | + | |
| 5963 | + | |
| 5964 | + | |
| 5965 | + | |
5927 | 5966 | | |
5928 | 5967 | | |
5929 | 5968 | | |
| |||
0 commit comments