You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Malformed template spans could repeatedly scan the same long whitespace suffix during lexical recovery. When a later delimiter existed, candidate validation could also repeatedly trim that suffix. A reader scoped to each template scan now caches the whitespace interval and supplies the exact trimmed source boundary to the existing parser.
Legacy-first segmentation, complete comments, source/depth/token limits, exact offsets and valid long padding remain covered. This bounds the repeated shared-suffix work; it does not claim a universal latency bound for every possible input.
Validation:
Normal Vitest server project: 69 tests passed across tokens, parse and limits, including the existing compatibility fuzz and real-runner boundary cases.
Exact-base negative control failed all five new regressions. A cache-only control retaining the old candidate trim failed three, proving that both recovery paths need the fix.
Bounded 16/64 failed-span probes with 16 KiB padding fell from 131,824–540,800 whitespace checks to 16,385 in all six samples.
Scoped lint, format, manual reference checks and normal commit hooks passed. Independent source review accepted the frozen patch; complete hosted checks remain required before merge.
This reviewed source is now included in #4565 at 7a526754c1c453e547e6ebb0234bf38c730009e3, together with the other release safety repairs. Independent composition review verified the source blobs are unchanged and the shared coverage register retains every addition.
I am marking this PR as draft to prevent a separate merge and cancelling only its superseded CI runs. The replacement must pass its own seven complete workflows; this PR's checks are retained as historical evidence. This change has not shipped. This PR will be closed as superseded after #4565 merges.
Implemented in #4565, merged as 0ee5fd9656dc12f08976155d956ee76fe39f4ea3, including the reviewed test-instrumentation correction and the parser coverage row. Closing this superseded draft.
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
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.
Malformed template spans could repeatedly scan the same long whitespace suffix during lexical recovery. When a later delimiter existed, candidate validation could also repeatedly trim that suffix. A reader scoped to each template scan now caches the whitespace interval and supplies the exact trimmed source boundary to the existing parser.
Legacy-first segmentation, complete comments, source/depth/token limits, exact offsets and valid long padding remain covered. This bounds the repeated shared-suffix work; it does not claim a universal latency bound for every possible input.
Validation: