Repository navigation
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues require resolution for the resolver performance and error-output changes.
No open issues 🎉
What changed in this PR
This PR addresses #1909 by removing quadratic-time separator stripping from the Stellar TOML resolver while preserving the domain normalization behavior established in #1720.
Changes:
- Replaces the trailing-separator regex with a linear-time backward loop.
- Limits domain text in validation errors to the first 256 characters.
- Adds regression tests and updates documentation and release notes.
| File | Description |
|---|---|
test/unit/stellar_toml_resolver.test.ts |
Adds timing, error truncation, and separator-stripping equivalence tests. |
src/stellartoml/utils.ts |
Adds the linear-time trailing-separator helper. |
src/stellartoml/index.ts |
Uses the helper, truncates error output, and clarifies parameter documentation. |
docs/reference/seps-toml.md |
Updates separator documentation and source links. |
CHANGELOG.md |
Records the performance fix and bounded error output. |
Review effort: Balanced
Ryang-21
approved these changes
Nov 24, 2026
This branch has not been deployed
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.
StellarToml.Resolver.resolve()taking quadratic time on a long run of/or\that is not at the end of the domain — 100,000 slashes followed byxblocked the event loop for about 4 s before the call rejected; it now takes under 1 msInvalid domainerror to its first 256 characters — before, a hostile input made an error message of any size in logs; the domain checks still use the full input, and every real host name (253 characters at most) still shows in fulldomainparameter doc to say that trailing backslashes are also ignored, which the code already didCloses #1909