Repository navigation
Integrate current-main check repairs #8941
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 11 commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
499fbe1
test: require isolated web test globals
lawrencecchen 36c99ec
fix: isolate web test module globals
lawrencecchen 35340bd
test: cover shared web runner isolation
lawrencecchen a79e402
fix: share isolated web test runner
lawrencecchen f1e1f41
Auto-merged main into fix/founders-welcome-test-isolation on deployment.
lawrencecchen fc475d3
test: bound shared runner regression
lawrencecchen eff14c0
test: exercise shared runner discovery
lawrencecchen 8ad567f
Fix current Swift warning regressions
lawrencecchen 990bf08
fix: preserve Bun recursive discovery
lawrencecchen a091d21
fix: sort recursive web test discovery
lawrencecchen 9bb1151
test: compare dock duration structurally
lawrencecchen df39455
Merge commit '990bf083e61d4704625d05502728d6f91343a52d' into task-int…
lawrencecchen 9d03ceb
Merge commit '9bb1151f3c0e4b09c766ce57ab120103b03df96f' into task-int…
lawrencecchen 164852e
fix: preserve option-only test discovery
lawrencecchen 5b1372b
Merge commit '8ad567fa96a965b4920973677dfc1f126468321e' into task-int…
lawrencecchen ac0ccdd
fix: preserve optional and live test modes
lawrencecchen c9f82e6
Merge remote-tracking branch 'origin/main' into fix-founders-isolatio…
lawrencecchen 34775fe
test: stabilize runner checks in agent mode
lawrencecchen 7e092af
Fix current Swift warning regressions
lawrencecchen 33a09c7
Merge commit '7e092af21a628ac7d7e54b8a5b599281cddb8b6b' into task-int…
lawrencecchen b340780
test: harden web runner cleanup
lawrencecchen 5e26dd3
fix: fail closed on discovery errors
lawrencecchen f97af18
Fix Ghostty render-grid test stub link
lawrencecchen 12ec8e1
Merge exact Ghostty package-test stub repair
lawrencecchen 30965ce
fix: honor Bun discovery configuration
lawrencecchen 24cc58a
Merge exact version-stable web runner repair
lawrencecchen 3ed4fa8
fix: preserve zero-test discovery semantics
lawrencecchen f151bd3
test: allow concurrent Bun heading order
lawrencecchen b4a1ab2
Merge PR 8947 web runner output-order repair
lawrencecchen 332431c
test: fence mock-isolated Bun execution
lawrencecchen 7afcfd0
Fix deterministic web test toolchain
lawrencecchen 0e9a179
test: cover Bun patch isolation boundary
lawrencecchen 7a26db9
test: rely on executed Bun version guard
lawrencecchen 20ee080
Merge PR 8948 integration review repairs
lawrencecchen 17bf72e
Merge current main before integration gate
lawrencecchen 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
Some comments aren't visible on the classic Files Changed page.
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,7 @@ | ||
| #!/usr/bin/env bash | ||
| set -euo pipefail | ||
|
|
||
| WEB_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" | ||
| cd "$WEB_ROOT" | ||
|
|
||
| exec bun test --isolate "$@" | ||
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,119 @@ | ||
| import { expect, test } from "bun:test"; | ||
| import { spawnSync } from "node:child_process"; | ||
| import { | ||
| copyFileSync, | ||
| mkdirSync, | ||
| mkdtempSync, | ||
| rmSync, | ||
| writeFileSync, | ||
| } from "node:fs"; | ||
| import { tmpdir } from "node:os"; | ||
| import { join } from "node:path"; | ||
| import { fileURLToPath } from "node:url"; | ||
|
|
||
| const webRoot = fileURLToPath(new URL("..", import.meta.url)); | ||
| const runnerPath = fileURLToPath( | ||
| new URL("../scripts/run-tests.sh", import.meta.url), | ||
| ); | ||
| const fixtureTestSource = ` | ||
| import { test } from "bun:test"; | ||
| test("fixture runs", () => {}); | ||
| `; | ||
|
|
||
| test("shared web test runner isolates module mocks across files", () => { | ||
|
lawrencecchen marked this conversation as resolved.
Resolved
|
||
| const result = runChild( | ||
| process.execPath, | ||
| [ | ||
| "run", | ||
| "test", | ||
| "--", | ||
| "--randomize", | ||
| "--seed=1", | ||
| "tests/feedback-route.test.ts", | ||
| "tests/founders-welcome-route.test.ts", | ||
| ], | ||
| webRoot, | ||
| ); | ||
|
|
||
| if (result.status !== 0) { | ||
| throw new Error( | ||
| `shared web test runner leaked module state:\n${result.output}`, | ||
| ); | ||
| } | ||
| expect(result.output).toContain("tests/feedback-route.test.ts:"); | ||
| expect(result.output).toContain("tests/founders-welcome-route.test.ts:"); | ||
| expect(result.output).toContain("0 fail"); | ||
| }); | ||
|
|
||
| test("shared web test runner preserves recursive default discovery", () => { | ||
| const fixtureRoot = createRunnerFixture(); | ||
| try { | ||
| mkdirSync(join(fixtureRoot, "tests", "nested"), { recursive: true }); | ||
| writeFileSync( | ||
| join(fixtureRoot, "tests", "top-level.test.ts"), | ||
| fixtureTestSource, | ||
| ); | ||
| writeFileSync( | ||
| join(fixtureRoot, "tests", "nested", "nested.test.ts"), | ||
| fixtureTestSource, | ||
| ); | ||
|
|
||
| const result = runChild( | ||
| "/bin/bash", | ||
| ["scripts/run-tests.sh"], | ||
| fixtureRoot, | ||
| ); | ||
| if (result.status !== 0) { | ||
| throw new Error( | ||
| `shared web test runner skipped recursive discovery:\n${result.output}`, | ||
| ); | ||
| } | ||
| expect(result.output).toContain("tests/top-level.test.ts:"); | ||
| expect(result.output).toContain("tests/nested/nested.test.ts:"); | ||
| } finally { | ||
| rmSync(fixtureRoot, { recursive: true, force: true }); | ||
| } | ||
| }); | ||
|
|
||
| test("shared web test runner fails when default discovery finds no tests", () => { | ||
| const fixtureRoot = createRunnerFixture(); | ||
| try { | ||
| mkdirSync(join(fixtureRoot, "tests")); | ||
| const result = runChild( | ||
| "/bin/bash", | ||
| ["scripts/run-tests.sh"], | ||
| fixtureRoot, | ||
| ); | ||
| expect(result.status).not.toBe(0); | ||
| } finally { | ||
| rmSync(fixtureRoot, { recursive: true, force: true }); | ||
| } | ||
| }); | ||
|
|
||
| function createRunnerFixture(): string { | ||
| const fixtureRoot = mkdtempSync(join(tmpdir(), "cmux-web-test-runner-")); | ||
| mkdirSync(join(fixtureRoot, "scripts")); | ||
| copyFileSync(runnerPath, join(fixtureRoot, "scripts", "run-tests.sh")); | ||
| return fixtureRoot; | ||
| } | ||
|
|
||
| function runChild( | ||
| command: string, | ||
| args: string[], | ||
| cwd: string, | ||
| ): { status: number | null; output: string } { | ||
| const result = spawnSync(command, args, { | ||
| cwd, | ||
| encoding: "utf8", | ||
| timeout: 30_000, | ||
| killSignal: "SIGKILL", | ||
| }); | ||
|
coderabbitai[bot] marked this conversation as resolved.
Resolved
|
||
| const output = [result.stdout, result.stderr].join("\n"); | ||
|
|
||
| if (result.error) { | ||
| throw new Error( | ||
| `shared web test runner did not finish: ${result.error.message}\n${output}`, | ||
| ); | ||
| } | ||
| return { status: result.status, output }; | ||
| } | ||
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.