Repository navigation
Fix /loop trailing interval detection for words starting with every - #276
Merged
Merged
Conversation
In /loop trailing interval detection, only the left edge was checked for a word boundary. As a result, words that merely begin with every (such as everything, everyone, everywhere, or everyday) were incorrectly recognized as the start of an every clause. Verify that the match for every also ends at a word boundary before treating it as an interval clause, and add unit tests.
Record verified-by for a_word_that_merely_starts_with_every_is_not_an_interval under LOOP-3 in docs/specs/loop.md.
The clause listed what may follow `every` and left what precedes and ends it to inference, so a reader holding a diff against LOOP-3 could not tell whether a word that merely begins with those letters opens a clause. The rule and a table row now say it, and the test that pins it is already named below.
bbondy
approved these changes
Sep 14, 2026
Member
|
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi @bbondy,
Resolves #185 .
What was done
Why and How
Previously, trailing_interval only verified the opening word boundary for every. When a prompt contained words like everything 20m, the parser matched every, consumed the rest of the word, measured 20m as an interval, and truncated the prompt. Requiring a closing word boundary ensures non-interval words starting with every stay intact.
Please let me know if anything more is needed or if any adjustments should be made. Thank you.