fix(cli): strip endpoint trailing slashes in linear time, deflake projection test - #8285
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
|
Merged
6 tasks
This branch was previously 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.
Summary
normalizeEndpointstrips trailing/with a backward scan instead of/\/+$/, which is quadratic on a long run of/that doesn't reach the end (100k slashes: ~5.3s before, instant after). Resolves CodeQLjs/polynomial-redosonpackages/sim-cli/src/config/profile.tsknowledge-projection.integration.tsfixture uses its own one-hot vector (dimension 511, inside the 512-dim candidate projection) instead of[1, 0, …]. Its vector assertions walk the approximate HNSW index, and ~10 other integration files write identical[1, 0, …]rows into the same database; tied at distance 0, those could exhaust the walk'smax_scan_tuplescap before it reached this file's second chunk, so "makes a new chunk searchable" flaked in both sync and async modes depending on file orderType of Change
Testing
profile.test.ts57/57, sim-cli type-check, lint,check:audits(49) anddocs-manifest:checkpassChecklist