Skip to content

armgit / orca

Public Imported from GitHub
0

Orca is the place for working with a fleet of agents (e.g. Grok Bot, Claude Code). Run any coding agent with your own subscription. Available on desktop, mobile and remote runtime.

3.0 KB
Raw Blame
import { existsSync } from 'node:fs'
import { resolve } from 'node:path'
import { defineConfig } from 'vitest/config'
import baseConfig from './vitest.config'
import { nodeRuntimePool } from './scripts/vitest-node-runtime-pool'

const contracts = [
  'src/main/ipc/pty-spawn-scaling.performance.test.ts',
  'src/renderer/src/components/terminal-pane/pty-connection/saved-resume-cancellation.test.ts',
  'src/main/ipc/pty/runtime/spawn-preflight-saved-resume.test.ts',
  'src/main/native-chat/agent-session-wire/structured-agent-session-terminal-writer-acquire.test.ts',
  'src/main/runtime/hook-status-resume-sleep-ordering.test.ts',
  'src/renderer/src/hooks/ipc-events/agent-status-refused-resume.performance.test.ts',
  'src/shared/tui-agent-permission-choice.test.ts',
  'src/renderer/src/components/settings/agent-permission-conversion-persistence.test.tsx',
  'src/main/runtime/rpc/methods/repo.test.ts',
  'src/renderer/src/components/tab-bar/use-new-tab-agent-menu-host-preferences.test.tsx',
  'src/main/sqlite/sync-database.test.ts',
  'src/main/runtime/orchestration/run-binding-performance.test.ts',
  'src/main/runtime/orchestration/db/row-column-lists.test.ts',
  'src/shared/native-chat/tools/native-chat-tool-attribution-allocation.test.ts',
  'src/shared/native-chat/tools/native-chat-tool-pairing.performance.test.ts',
  'src/main/codex-usage/codex-rollout-file-lifetime.test.ts',
  'src/main/codex-usage/scanner-incremental-append.test.ts',
  'src/main/usage/jsonl-file-reader.test.ts',
  'src/main/usage/jsonl-file-snapshot.test.ts',
  'src/renderer/src/components/editor/rich-markdown-list-tokenizers.test.ts',
  'src/renderer/src/components/editor/rich-markdown-lowlight-cache.test.ts',
  'src/renderer/src/components/terminal-pane/agent-completion-coordinator-queued-inspection-disposal.test.ts',
  'src/renderer/src/lib/pane-manager/pane-terminal-output-scheduler-queue-retention.test.ts',
  'src/renderer/src/store/store-identity-churn-probe.test.ts',
  'config/scripts/app-store-performance-plugin.test.mjs',
  'config/scripts/quadratic-buffer-concat-plugin.test.mjs',
  'src/main/claude-usage/scanner-incremental-append.test.ts',
  'src/main/claude-usage/store-checkpoint-persistence.test.ts'
]
// Wall-clock budgets with no CI job yet; `pnpm test:perf:benchmarks` runs them.
const benchmarks = [
  'src/renderer/src/components/editor/monaco-content-sync.bench.ts',
  'src/renderer/src/components/editor/monaco-content-sync.undo-retention.bench.ts'
]

for (const contract of [...contracts, ...benchmarks]) {
  if (!existsSync(resolve(contract))) {
    throw new Error(`Missing performance contract: ${contract}`)
  }
}

export default defineConfig({
  ...baseConfig,
  test: {
    ...baseConfig.test,
    // Project-level includes otherwise override this contract-only selection.
    projects: undefined,
    ...(process.versions.bun ? { pool: 'node-runtime', poolRunner: nodeRuntimePool } : {}),
    include: contracts,
    benchmark: { include: benchmarks },
    fileParallelism: false,
    retry: 0
  }
})