mirror of
https://github.com/openai/codex.git
synced 2026-11-25 23:30:49 +00:00
## Why Skill selection allocated strings for candidate n-grams that never contribute to scoring because they are absent from the query. ## What changed Deduplicate n-grams as borrowed UTF-8 slices and retain owned strings for candidate n-grams only when they match the query. Count all distinct n-grams toward the existing limit so filtering preserves which n-grams are eligible for scoring. ## Testing Add a regression test that verifies unmatched ASCII n-grams consume the limit and that the first matching Japanese n-gram is retained. GitOrigin-RevId: 05ec72b4f66b8a0befb5e86a077b1c9fbaac704d