Skip to content

Keep Unicode overlap excerpts centered on the actual match - #5736

Merged
Mister-Meeseeks merged 1 commit into
CrocSwap:mainfrom
aliromman:codex/contributor-15-11
Oct 26, 2026
Merged

Mister-Meeseeks merged 1 commit into
CrocSwap:mainfrom
aliromman:codex/contributor-15-11

Conversation

@aliromman

Copy link
Copy Markdown
Contributor

Unicode lowercase can expand one source character into two. The overlap search used an index in the expanded text to slice the original body, so a reported hit could have an excerpt that omitted the hit entirely. Map that index back to the original text before taking the excerpt. Matching and ranking semantics stay unchanged.

Validation: reproduced the omitted-match excerpt on main. All 100 overlap-consumer tests pass on Python 3.12; the 5 new regressions also pass under -O. Cases cover long expanding prefixes, a match within an expanded character, numeric card references, multiple terms, ASCII output and title-only matches. git diff --check passes.

Fresh main/priorities and live PR/Discussion overlap checked. Other open fixes to this tool are this sequence’s separate cache, pagination and path-reading scopes; this PR changes only excerpt positioning. Hosted CI is pending.

Base: df0137efd35e11b4445734bf612bdd4c7ebc330c. Verified head: 63f441c3a98e994dd99e1f1ca31199f3ef032df1.

Prepared for aliromman with OpenAI Codex assistance. Existing tool and predecessor credits remain in place. No selected-frontier change.

@Mister-Meeseeks
Mister-Meeseeks merged commit c297a40 into CrocSwap:main Oct 26, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants