Files
orca/config/vitest.performance.config.ts
T
Neil 915c4b74a2 Update Claude usage without rereading the whole conversation (#26967)
* Verify pinned transcript reads and stream Codex usage aggregation

* Resume Claude usage scans with compact token checkpoints

* Harden transcript snapshots and reject incomplete discovery

* Keep Codex race fixtures inside their temporary data home

* Verify pinned transcript rotation with portable file moves

* test: keep Claude usage mock registration in test suites

* Compress saved Claude usage without dropping history

* Keep Claude cache writes bound to their original request

* Register Claude contracts without conflicting with chat contracts

* Assert unchanged Claude sources skip the actual cache writer
2026-10-09 22:26:46 -07:00

47 lines
1.9 KiB
TypeScript

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/sqlite/sync-database.test.ts',
'src/main/runtime/orchestration/db/row-column-lists.test.ts',
'src/shared/native-chat-tool-attribution-allocation.test.ts',
'src/shared/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/relay/fs-path-metadata-symlink-concurrency.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',
'config/scripts/sort-comparator-performance-plugin.test.mjs',
'src/main/claude-usage/scanner-incremental-append.test.ts',
'src/main/claude-usage/store-checkpoint-persistence.test.ts'
]
for (const contract of contracts) {
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,
fileParallelism: false,
retry: 0
}
})