Compare commits

..
2 changed files with 28 additions and 27 deletions
+2 -3
View File
@@ -48,7 +48,6 @@ jobs:
node-version: "24"
- name: Setup Bun
id: setup-bun
uses: ./.github/actions/setup-bun
- name: Test Effect simplification rules
@@ -86,7 +85,7 @@ jobs:
OPENCODE_EXPERIMENTAL_DISABLE_FILEWATCHER: ${{ runner.os == 'Windows' && 'true' || 'false' }}
- name: Verify compiled service lifecycle
if: always() && steps.setup-bun.outcome == 'success'
if: always()
timeout-minutes: 10
working-directory: packages/cli
env:
@@ -102,7 +101,7 @@ jobs:
node-version: "26.4.0"
- name: Verify Node build
if: always() && steps.setup-bun.outcome == 'success'
if: always()
timeout-minutes: 15
working-directory: packages/cli
env:
+26 -24
View File
@@ -856,31 +856,33 @@ describe("ShellTool", () => {
{ timeout: 15_000 },
)
it.live("does not retain removed running shells in exit order", () =>
Effect.acquireUseRelease(
Effect.promise(() => tmpdir()),
(tmp) =>
withSession(tmp.path, () =>
Effect.gen(function* () {
const shell = yield* Shell.Service
yield* Effect.forEach(Array.from({ length: 26 }), () =>
Effect.gen(function* () {
const info = yield* shell.create({ command: idleCommand, timeout: 0 })
yield* shell.remove(info.id)
yield* Effect.sleep(Duration.millis(10))
}),
)
const info = yield* shell.create({ command: helloCommand, timeout: 0 })
const settled = yield* shell.wait(info.id).pipe(Effect.timeoutOption(Duration.seconds(2)))
expect(settled._tag).toBe("Some")
}),
),
(tmp) => Effect.promise(() => tmp[Symbol.asyncDispose]().then(() => undefined)),
),
)
// Retention is platform-independent; starting 27 PowerShell processes serially only exercises
// Windows process startup and can exceed Bun's default per-test timeout.
if (!isWindows) {
it.live("does not retain removed running shells in exit order", () =>
Effect.acquireUseRelease(
Effect.promise(() => tmpdir()),
(tmp) =>
withSession(tmp.path, () =>
Effect.gen(function* () {
const shell = yield* Shell.Service
yield* Effect.forEach(Array.from({ length: 26 }), () =>
Effect.gen(function* () {
const info = yield* shell.create({ command: idleCommand, timeout: 0 })
yield* shell.remove(info.id)
yield* Effect.sleep(Duration.millis(10))
}),
)
const info = yield* shell.create({ command: helloCommand, timeout: 0 })
const settled = yield* shell.wait(info.id).pipe(Effect.timeoutOption(Duration.seconds(2)))
expect(settled._tag).toBe("Some")
}),
),
(tmp) => Effect.promise(() => tmp[Symbol.asyncDispose]().then(() => undefined)),
),
)
it.live("settles a shell terminated by an external signal", () =>
Effect.acquireUseRelease(
Effect.promise(() => tmpdir()),