Repository navigation
🤖 perf: replay synthetic session tapes through the desktop app with egress blocked (T3) #5612
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
18 commits
Select commit
Hold shift + click to select a range
bd165f5
feat(sessionTapes): serve session tapes to the desktop app in a read-…
ThomasK33 f7b5af6
test(e2e): add the perf.tapeReplay scenario, its synthetic tape fixtu…
ThomasK33 06bb189
test(sessionTapes): cover the read-side hardening (#5587)
ThomasK33 3e6b860
test(sessionTapes): cover the replay source and the read-only replay …
ThomasK33 00248d0
test: cover the session tape egress allowlist, fixture drift and the …
ThomasK33 0bd484d
fix(sessionTapes): keep the replay source off the desktop pre-splash …
ThomasK33 cc23f1e
test(e2e): compare distinct blocked probe URLs in perf.tapeReplay
ThomasK33 9c1ebe5
test(e2e): expand the replayed bash card before checking its script
ThomasK33 fa486ae
fix(sessionTapes): resolve no host names in replay mode and stub the …
ThomasK33 4de6de0
test(startHere): reuse the Start Here click helpers in the original test
ThomasK33 51e70a9
fix(sessionTapes): address Codex round 1 (telemetry, pagination, dev …
ThomasK33 79b7f27
fix(sessionTapes): run no API server in replay mode; isolate gh, code…
ThomasK33 c9fc75d
fix(sessionTapes): address Codex round 2 (telemetry off, stopped tape…
ThomasK33 c0f38eb
fix(sessionTapes): address Codex round 3 (deep header rejection, term…
ThomasK33 ad52106
fix(sessionTapes): address Codex round 4 (static egress latch, local-…
ThomasK33 e8289e2
fix(sessionTapes): refuse tapes without one successful caught-up (Cod…
ThomasK33 d8baf20
fix(sessionTapes): address Codex round 6 (UNC tape paths, static impo…
ThomasK33 62c186e
fix(sessionTapes): allowlist local tape paths and serve tapes only in…
ThomasK33 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| /** | ||
| * Regenerate the synthetic session tape fixture of the `perf.tapeReplay` e2e scenario: | ||
| * bun scripts/perf/generateTapeReplayFixture.ts | ||
| */ | ||
| import { writeFileSync } from "node:fs"; | ||
| import * as path from "node:path"; | ||
| import { | ||
| buildTapeReplayFixtureTape, | ||
| TAPE_REPLAY_FIXTURE_FILE_NAME, | ||
| } from "../../tests/e2e/fixtures/sessionTapes/tapeReplayFixture"; | ||
|
|
||
| const target = path.join( | ||
| import.meta.dir, | ||
| "..", | ||
| "..", | ||
| "tests", | ||
| "e2e", | ||
| "fixtures", | ||
| "sessionTapes", | ||
| TAPE_REPLAY_FIXTURE_FILE_NAME | ||
| ); | ||
| writeFileSync(target, buildTapeReplayFixtureTape()); | ||
| console.log(`Wrote ${path.relative(process.cwd(), target)}`); |
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,31 @@ | ||
| import { describe, expect, test } from "bun:test"; | ||
| import * as path from "node:path"; | ||
| import { hashSessionTapeWorkspaceId } from "@/node/services/sessionTapes/sessionTapeRecorder"; | ||
| import { readSessionTapeFile } from "@/node/services/sessionTapes/sessionTapeFile"; | ||
| import { | ||
| TAPE_REPLAY_FIXTURE_FILE_NAME, | ||
| TAPE_REPLAY_FIXTURE_WORKSPACE_ID, | ||
| } from "../../tests/e2e/fixtures/sessionTapes/tapeReplayFixture"; | ||
|
|
||
| const FIXTURE_PATH = path.join( | ||
| import.meta.dir, | ||
| "..", | ||
| "..", | ||
| "tests", | ||
| "e2e", | ||
| "fixtures", | ||
| "sessionTapes", | ||
| TAPE_REPLAY_FIXTURE_FILE_NAME | ||
| ); | ||
|
|
||
| describe("perf.tapeReplay fixture tape", () => { | ||
| test("loads as a complete tape recorded for the scenario's workspace id", async () => { | ||
| const result = await readSessionTapeFile(FIXTURE_PATH); | ||
| expect(result.status).toBe("ok"); | ||
| if (result.status !== "ok") return; | ||
| // The replay source refuses a tape whose hash does not match the mapped workspace. | ||
| expect(result.header.workspaceIdHash).toBe( | ||
| hashSessionTapeWorkspaceId(TAPE_REPLAY_FIXTURE_WORKSPACE_ID) | ||
| ); | ||
| }); | ||
| }); |
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
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
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.