-
Notifications
You must be signed in to change notification settings - Fork 1.8k
fix(evals): use workspace Browse and repair CLI adapter #2963
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
a9ea36d
fix(evals): use workspace Browse with compatible CLI commands
shrey150 629fe4b
fix(evals): address Browse adapter review findings
shrey150 65702dc
test(evals): cover Browse session name safety and uniqueness
shrey150 a7711ca
fix(evals): use workspace Browse to unblock release builds
shrey150 09f3feb
Merge branch 'fix/evals-workspace-build' into fix/evals-workspace-bro…
shrey150 468ae0a
Merge main and preserve the updated README
shrey150 2ea510e
Merge branch 'fix/evals-workspace-build' into fix/evals-workspace-bro…
shrey150 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| import { afterEach, describe, expect, it, vi } from "vitest"; | ||
| import { createBrowseCliSessionName } from "../browseCliPaths.js"; | ||
|
|
||
| describe("Browse CLI session names", () => { | ||
| afterEach(() => vi.restoreAllMocks()); | ||
|
|
||
| it("includes the PID and stays short with socket-safe characters", () => { | ||
| const name = createBrowseCliSessionName(); | ||
|
|
||
| expect(name).toMatch(new RegExp(`^eval-${process.pid}-[A-Za-z0-9_-]+$`)); | ||
| expect(Buffer.byteLength(name)).toBeLessThanOrEqual(32); | ||
| }); | ||
|
|
||
| it("keeps repeated calls distinct at the same timestamp without Math.random entropy", () => { | ||
| vi.spyOn(Date, "now").mockReturnValue(1_000); | ||
| vi.spyOn(Math, "random").mockReturnValue(0.5); | ||
|
|
||
| const names = Array.from({ length: 1_000 }, () => createBrowseCliSessionName()); | ||
|
|
||
| expect(new Set(names).size).toBe(names.length); | ||
| }); | ||
| }); |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.