Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 17 additions & 36 deletions packages/opencode/script/kilocode/test-profile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,49 +3,30 @@ export namespace TestProfile {
// Full Linux and Windows runs remain the backstop for platform-neutral behavior.
const profiles = {
darwin: {
description: "Darwin-native process, terminal, filesystem, worktree, and runtime coverage",
// Only tests whose failure would indicate a macOS-specific problem belong
// here: the seatbelt sandbox, node-pty, FSEvents watching, process/terminal
// spawning, and the darwin runtime artifact. Platform-neutral application
// logic (session loops, snapshots, HTTP routing, config, worktrees) is
// covered by the full Linux and Windows suites and must stay out — every
// file in this profile costs ~3x its Linux duration on the macos-15 runner.
description: "Darwin seatbelt sandbox, PTY, filesystem, and process runtime coverage",
groups: {
cli: [
"cli/acp/lifecycle.test.ts",
"cli/run/run-process.test.ts",
"cli/serve/*.test.ts",
"cli/smokes/*.test.ts",
"cli/tui/{plugin-lifecycle,plugin-loader-entrypoint,thread}.test.ts",
],
config: [
"config/{config,tui}.test.ts",
"control-plane/workspace.test.ts",
],
filesystem: [
"filesystem/*.test.ts",
"fixture/fixture.test.ts",
"git/*.test.ts",
"image/*.test.ts",
"plugin/{install-concurrency,loader-shared}.test.ts",
"server/httpapi-reference.test.ts",
"snapshot/*.test.ts",
"tool/{apply_patch,edit,glob,grep,read,recall,registry,repo_clone,repo_overview,shell,skill,truncation,write}.test.ts",
"util/{filesystem,glob,module,process,which}.test.ts",
"kilocode/{external-directory-boundary,read-directory}.test.ts",
"util/filesystem.test.ts",
],
kilo: [
"kilocode/{background-process,daemon,diff-full,external-directory-boundary,indexing-worker,indexing-worktree,interactive-terminal,mcp-oauth-callback,primary-worktree,project-id,read-directory,session-diff-restore,snapshot-cache,snapshot-freeze-repro,snapshot-revert-move,snapshot-seed,task-nesting}.test.ts",
"kilocode/cli/cmd/serve.test.ts",
pty: ["pty/*.test.ts", "server/httpapi-pty.test.ts"],
runtime: [
"cli/serve/*.test.ts",
"kilocode/background-process.test.ts",
"kilocode/cli/install-artifact.test.ts",
"kilocode/config/config.test.ts",
"kilocode/core-watcher.test.ts",
"kilocode/sandbox/*.test.ts",
"kilocode/server/{config-overlay,listener-runtime,tui-config,worktree-list}.test.ts",
"kilocode/session-export/{e2e,sequence,worker,workspace-provider}.test.ts",
"kilocode/session-export/worker/{storage,zstd}.test.ts",
"kilocode/tool/repo_clone.test.ts",
"kilocode/worktree*.test.ts",
],
process: ["session/prompt.test.ts"],
project: ["project/*.test.ts"],
pty: ["pty/pty-*.test.ts", "server/httpapi-pty.test.ts"],
server: [
"server/{experimental-session-list,httpapi-experimental,httpapi-file,httpapi-listen,httpapi-workspace-routing,project-init-git,worktree-endpoint-repro}.test.ts",
"kilocode/interactive-terminal.test.ts",
"tool/shell.test.ts",
"util/{process,which}.test.ts",
],
sandbox: ["kilocode/sandbox/*.test.ts"],
},
},
} as const
Expand Down
15 changes: 13 additions & 2 deletions packages/opencode/test/kilocode/test-profile.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ describe("test profiles", () => {
const result = TestProfile.resolve("darwin", all)
expect(result.ok).toBe(true)
if (!result.ok) return
expect(result.files.length).toBeGreaterThan(50)
expect(result.files.length).toBeGreaterThan(20)
expect(result.files).toContain("pty/pty-shell.test.ts")
expect(result.files).toContain("kilocode/cli/install-artifact.test.ts")
expect(result.files).toContain("kilocode/sandbox/macos-confinement.test.ts")
expect(result.files).toContain("kilocode/core-watcher.test.ts")
expect(result.files).toContain("kilocode/tool/repo_clone.test.ts")
expect(result.files).toContain("kilocode/background-process.test.ts")
expect(result.files).toContain("filesystem/filesystem.test.ts")
expect(result.files).toContain("kilocode/interactive-terminal.test.ts")
const sandbox = all.filter((file) => file.startsWith("kilocode/sandbox/"))
Expand All @@ -27,6 +27,17 @@ describe("test profiles", () => {
expect(result.files).not.toContain("shell/shell.test.ts")
expect(result.files).not.toContain("kilocode/sessions/remote-ws.test.ts")
expect(result.files).not.toContain("provider/header-timeout.test.ts")
// Platform-neutral application logic is covered by the full Linux and
// Windows suites. Keep these heavy, darwin-agnostic files out of the
// profile so the single macOS shard stays fast.
expect(result.files).not.toContain("session/prompt.test.ts")
expect(result.files).not.toContain("snapshot/snapshot.test.ts")
expect(result.files).not.toContain("kilocode/daemon.test.ts")
expect(result.files).not.toContain("cli/smokes/read-only.test.ts")
expect(result.files).not.toContain("cli/acp/lifecycle.test.ts")
expect(result.files).not.toContain("cli/run/run-process.test.ts")
expect(result.files).not.toContain("kilocode/server/config-overlay.test.ts")
expect(result.files).not.toContain("server/httpapi-listen.test.ts")
})

test("normalizes Windows test paths", () => {
Expand Down
Loading