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.

test: remove low-value inventories and wording suites (#36129)

OrcaWin5535d5e37244
diff --git a/config/scripts/adhoc-mac-parallelism.test.mjs b/config/scripts/adhoc-mac-parallelism.test.mjs
deleted file mode 100644
index c187dc120af..00000000000
--- a/config/scripts/adhoc-mac-parallelism.test.mjs
+++ /dev/null
@@ -1,57 +0,0 @@
-import { readFileSync } from 'node:fs'
-import { describe, expect, it } from 'vitest'
-import { parse } from 'yaml'
-import { compileAggregateExpression } from './pr-aggregate-gate-context.mjs'
-
-const { jobs } = parse(readFileSync('.github/workflows/adhoc-mac-build.yml', 'utf8'))
-const build = jobs['build-adhoc-mac-arch']
-const final = jobs['build-adhoc-mac']
-
-describe('parallel Mac release publication', () => {
- it('uses isolated architecture workspaces with one shared draft and one publisher', () => {
- expect(build.strategy).toEqual({ 'fail-fast': false, matrix: { arch: ['x64', 'arm64'] } })
- expect(build.needs).toContain('prepare-adhoc-mac-release')
- expect(final.needs).toContain('build-adhoc-mac-arch')
- expect(build.steps.some((step) => step.run?.includes('gh release create'))).toBe(false)
- expect(build.steps.some((step) => step.run?.includes('--draft=false'))).toBe(false)
- const upload = build.steps.find(
- (step) => step.name === 'Upload verified architecture assets to the draft'
- )
- expect(upload.env.TAG).toBe('${{ needs.prepare-adhoc-mac-release.outputs.tag }}')
- expect(upload.run).not.toContain('latest-mac.yml')
- expect(build.steps.find((step) => step.name === 'Verify signed and stapled app').run).toContain(
- 'codesign --verify --deep --strict'
- )
- expect(build.steps.find((step) => step.name === 'Verify signed and stapled app').run).toContain(
- 'xcrun stapler validate'
- )
- })
-
- it.each(['failure', 'cancelled', 'skipped', 'success'])(
- 'runs the final gate and cleanup after architecture result %s',
- (result) => {
- const needs = {
- 'prepare-adhoc-mac-release': { result: 'success' },
- 'build-adhoc-mac-arch': { result }
- }
- expect(final.if).toContain('always()')
- expect(
- compileAggregateExpression(final.if.replace('always()', 'true'))({ needs }).coerceString()
- ).toBe('true')
- const gate = final.steps.findIndex((step) => step.name === 'Require both architecture jobs')
- const merge = final.steps.findIndex(
- (step) => step.name === 'Merge and verify the updater manifest'
- )
- const publish = final.steps.findIndex((step) => step.id === 'publish_live')
- expect(final.steps[gate].env.ARCH_RESULT).toBe('${{ needs.build-adhoc-mac-arch.result }}')
- expect(final.steps[gate].run).toBe('test "$ARCH_RESULT" = success')
- expect(gate).toBeLessThan(merge)
- expect(merge).toBeLessThan(publish)
- const cleanup = final.steps.find(
- (step) => step.name === 'Discard the draft release on failure'
- )
- expect(cleanup.if).toContain('failure() || cancelled()')
- expect(cleanup.if).toContain("steps.publish_live.outcome != 'success'")
- }
- )
-})
diff --git a/config/scripts/ci-shard-timings.json b/config/scripts/ci-shard-timings.json
index 4855ce70581..362b0416247 100644
--- a/config/scripts/ci-shard-timings.json
+++ b/config/scripts/ci-shard-timings.json
@@ -11,7 +11,6 @@
"config/scripts/adhoc-build-pinned-commit.test.mjs": 445,
"config/scripts/adhoc-build-version.test.mjs": 104,
"config/scripts/adhoc-mac-manifests.test.mjs": 134,
- "config/scripts/adhoc-mac-parallelism.test.mjs": 227,
"config/scripts/adhoc-release-waits.test.mjs": 192,
"config/scripts/adhoc-windows-parallelism.test.mjs": 286,
"config/scripts/agent-state-rules-bundle.test.mjs": 171,
@@ -109,7 +108,6 @@
"config/scripts/dependency-security-patches.test.mjs": 68,
"config/scripts/dependency-security-release.test.mjs": 463,
"config/scripts/dev-channel-base-version.test.mjs": 40,
- "config/scripts/dev-channel-orcad-template-workflow.test.mjs": 111,
"config/scripts/dev-channel-windows-staging.test.mjs": 251,
"config/scripts/dev-cli-terminal-wrapper.test.mjs": 41,
"config/scripts/dev-electron-bundle-cache.test.ts": 65,
@@ -132,7 +130,6 @@
"config/scripts/ephemeral-vm-runtime-store-cross-version.test.ts": 23,
"config/scripts/foreign-sqlite-reader-worker-smoke.test.mjs": 562,
"config/scripts/generate-bundled-skill-guides.test.mjs": 612,
- "config/scripts/generate-monaco-associations.test.mjs": 248,
"config/scripts/generate-runtime-required-english-catalog.test.mjs": 245,
"config/scripts/generate-skill-bundle-manifest.test.mjs": 991,
"config/scripts/generate-terminal-perf-html-report.test.mjs": 66,
@@ -163,9 +160,7 @@
"config/scripts/live-remote-freeze-rpc.test.mjs": 55,
"config/scripts/live-remote-status-watchdog.test.mjs": 85,
"config/scripts/locale-brand-prefilter.test.mjs": 325,
- "config/scripts/locale-count-fragment-separator.test.mjs": 74,
"config/scripts/locale-generic-ui-terms.test.mjs": 83,
- "config/scripts/locale-ko-frozen-terminal-search-keywords.test.mjs": 277,
"config/scripts/locale-repair-catalog-missing-leaves.test.mjs": 103,
"config/scripts/locale-translation-policy-ko-round5.test.mjs": 73,
"config/scripts/locale-translation-policy.es-pr.test.mjs": 78,
@@ -183,7 +178,6 @@
"config/scripts/macos-computer-helper-owner-loss-processes.test.mjs": 56,
"config/scripts/macos-folder-usage-descriptions.test.mjs": 99,
"config/scripts/macos-shipit-scheduling.test.mjs": 56,
- "config/scripts/macos-tcc-prompt-localization.test.mjs": 337,
"config/scripts/macos-terminal-host-bundle.test.mjs": 128,
"config/scripts/main-entry-facade.test.ts": 428,
"config/scripts/managed-data-account-runtime.test.ts": 604,
@@ -192,7 +186,6 @@
"config/scripts/mobile-process-host-tooling.test.mjs": 840,
"config/scripts/mobile-release-check-scope.test.mjs": 968,
"config/scripts/mobile-test-change-scope.test.mjs": 252,
- "config/scripts/mobile-typecheck-cache.test.mjs": 79,
"config/scripts/mobile-web-app/mobile-web-app-agent-history-render.test.mjs": 834,
"config/scripts/mobile-web-app/mobile-web-app-agent-icon-render.test.mjs": 821,
"config/scripts/mobile-web-app/mobile-web-app-browser-pane-render.test.mjs": 285,
@@ -257,7 +250,6 @@
"config/scripts/node-server-concurrency.test.mjs": 159,
"config/scripts/node-server-fast-runners.test.mjs": 285,
"config/scripts/node-server-native-compat-scope.test.mjs": 369,
- "config/scripts/node-server-packaged-chat-selection.test.mjs": 115,
"config/scripts/node-server-policy-self-tests.test.mjs": 2590,
"config/scripts/node-server-qualification.test.mjs": 46,
"config/scripts/node-server-release-parallelism.test.mjs": 179,
@@ -10358,7 +10350,6 @@
"src/renderer/src/i18n/localized-catalog.test.ts": 231,
"src/renderer/src/i18n/plugin-chrome-allowlist.test.ts": 85,
"src/renderer/src/i18n/project-runtime-repair-message.test.ts": 70,
- "src/renderer/src/i18n/provider-credit-balance-locales.test.ts": 538,
"src/renderer/src/i18n/pseudo-localization.test.ts": 108,
"src/renderer/src/i18n/relative-time-format.test.ts": 70,
"src/renderer/src/i18n/weekday-names.test.ts": 59,
@@ -12150,7 +12141,6 @@
"src/shared/browser-client-host-protocol.test.ts": 381,
"src/shared/browser-client-host-reconciliation-protocol.test.ts": 83,
"src/shared/browser-client-hosting-eligibility.test.ts": 109,
- "src/shared/browser-cookie-import-sources.test.ts": 47,
"src/shared/browser-load-failure.test.ts": 159,
"src/shared/browser-network-tunnel-protocol.test.ts": 53,
"src/shared/browser-network-tunnel-stream-framing.test.ts": 1894,
diff --git a/config/scripts/dev-channel-orcad-template-workflow.test.mjs b/config/scripts/dev-channel-orcad-template-workflow.test.mjs
deleted file mode 100644
index 8ae3b0880c9..00000000000
--- a/config/scripts/dev-channel-orcad-template-workflow.test.mjs
+++ /dev/null
@@ -1,67 +0,0 @@
-import { readFileSync } from 'node:fs'
-import { describe, expect, it } from 'vitest'
-import { parse } from 'yaml'
-
-// Every SSH host needs template-deployed orcad; missing dev-channel templates break all SSH connections.
-function readWorkflow(name) {
- return parse(readFileSync(new URL(`../../.github/workflows/${name}`, import.meta.url), 'utf8'))
-}
-
-const channels = [
- {
- name: 'hourly',
- workflow: readWorkflow('hourly-mac-build.yml'),
- macJob: 'build-hourly-mac',
- winJob: 'build-hourly-win',
- pinnedSha: '${{ needs.preflight.outputs.head_sha }}'
- },
- {
- name: 'daily',
- workflow: readWorkflow('daily-mac-build.yml'),
- macJob: 'build-daily-mac',
- winJob: 'build-daily-win',
- pinnedSha: '${{ needs.resolve-main.outputs.head_sha }}'
- }
-]
-
-describe.each(channels)('$name build ships the orcad template', (channel) => {
- const { jobs } = channel.workflow
- const mac = jobs[channel.macJob]
- const stepIndex = (predicate) => mac.steps.findIndex(predicate)
-
- it('builds the template from the commit the app is built from', () => {
- const template = jobs['orcad-template']
- expect(template.uses).toBe('./.github/workflows/node-server-tests.yml')
- expect(template.with).toEqual({
- ref: channel.pinnedSha,
- build_template: true,
- fast_runners: false
- })
- expect(template.permissions).toEqual({ contents: 'read', actions: 'read' })
- expect(template.secrets).toBeUndefined()
- expect(mac.steps.find((step) => step.name === 'Checkout').with.ref).toBe(channel.pinnedSha)
- })
-
- it('packages the macOS build only with the template present', () => {
- expect(mac.needs).toContain('orcad-template')
- // Implicit success(): a failed template job must skip the signed build.
- expect(mac.if ?? '').not.toMatch(/always\(\)|!cancelled\(\)/)
- const build = stepIndex((step) => step.name === 'Build app')
- const download = stepIndex((step) => step.name === 'Download the orcad deployment template')
- const publish = stepIndex((step) => step.with?.command?.includes('electron-builder'))
- expect(build).toBeGreaterThanOrEqual(0)
- expect(download).toBeGreaterThan(build)
- expect(publish).toBeGreaterThan(download)
- expect(mac.steps[download].uses).toMatch(/^actions\/download-artifact@/)
- expect(mac.steps[download].with).toEqual({
- name: 'orcad-template',
- path: 'out/orcad-template'
- })
- expect(mac.steps[publish].env.ORCA_REQUIRE_ORCAD_TEMPLATE).toBe('1')
- })
-
- it('ships the same template in the Windows build', () => {
- expect(jobs[channel.winJob].uses).toBe('./.github/workflows/dev-channel-win-build.yml')
- expect(jobs[channel.winJob].with.orcad_template).toBe(true)
- })
-})
diff --git a/config/scripts/generate-monaco-associations.test.mjs b/config/scripts/generate-monaco-associations.test.mjs
deleted file mode 100644
index 1076ea78c8a..00000000000
--- a/config/scripts/generate-monaco-associations.test.mjs
+++ /dev/null
@@ -1,38 +0,0 @@
-import { readFileSync } from 'node:fs'
-import { describe, expect, it } from 'vitest'
-import { associationsPath, readMonacoAssociations } from './generate-monaco-associations.mjs'
-
-describe('Monaco filename associations', () => {
- it('matches the installed editor registrations and curated Orca associations', () => {
- expect(
- JSON.parse(readFileSync(associationsPath, 'utf8')),
- 'Run node config/scripts/generate-monaco-associations.mjs after changing associations or Monaco'
- ).toEqual(readMonacoAssociations())
- })
-
- it('keeps built-in Ruby aliases alongside the curated Ruby associations', () => {
- expect(readMonacoAssociations().find((language) => language.id === 'ruby')).toEqual({
- id: 'ruby',
- extensions: expect.arrayContaining([
- '.rb',
- '.rbx',
- '.rjs',
- '.gemspec',
- '.pp',
- '.rake',
- '.ru',
- '.jbuilder',
- '.thor'
- ]),
- filenames: expect.arrayContaining([
- 'rakefile',
- 'Gemfile',
- 'Guardfile',
- 'Capfile',
- 'Podfile',
- 'Brewfile',
- 'Vagrantfile'
- ])
- })
- })
-})
diff --git a/config/scripts/locale-count-fragment-separator.test.mjs b/config/scripts/locale-count-fragment-separator.test.mjs
deleted file mode 100644
index fe3a3e59719..00000000000
--- a/config/scripts/locale-count-fragment-separator.test.mjs
+++ /dev/null
@@ -1,38 +0,0 @@
-import { describe, expect, it } from 'vitest'
-
-import { repairTranslatedValue } from './locale-translation-policy.mjs'
-
-// Theme count fragments concatenate directly after Showing {count}; preserve separator or numbers fuse (표시 중 3030 중).
-describe('locale-count-fragment-separator', () => {
- it('keeps a slash between shown and total theme counts in CJK locales', () => {
- const brokenByLocale = { ko: '{{value0}} 중', ja: '{{value0}}の', zh: '{{value0}} 的' }
- for (const [locale, localeValue] of Object.entries(brokenByLocale)) {
- expect(
- repairTranslatedValue({
- key: 'auto.components.settings.SettingsFormControls.cb330ef7f8',
- enValue: ' of {{value0}}',
- localeValue,
- locale
- })
- ).toBe('/{{value0}}')
- }
- })
-
- it('keeps a leading space before the search-match fragment in CJK locales', () => {
- const cases = [
- ['ko', '"{{value0}}"과(와) 일치', ' "{{value0}}"과(와) 일치'],
- ['ja', '「{{value0}}」に一致', ' 「{{value0}}」に一致'],
- ['zh', '匹配“{{value0}}”', ' 匹配“{{value0}}”']
- ]
- for (const [locale, localeValue, repaired] of cases) {
- expect(
- repairTranslatedValue({
- key: 'auto.components.settings.SettingsFormControls.c822571b2e',
- enValue: ' matching "{{value0}}"',
- localeValue,
- locale
- })
- ).toBe(repaired)
- }
- })
-})
diff --git a/config/scripts/locale-ko-frozen-terminal-search-keywords.test.mjs b/config/scripts/locale-ko-frozen-terminal-search-keywords.test.mjs
deleted file mode 100644
index 179fce1f562..00000000000
--- a/config/scripts/locale-ko-frozen-terminal-search-keywords.test.mjs
+++ /dev/null
@@ -1,50 +0,0 @@
-import fs from 'node:fs'
-
-import { describe, expect, it } from 'vitest'
-import { repairTranslatedValue } from './locale-translation-policy.mjs'
-
-// Use UI’s stopped sense for frozen/unfreeze search pair; MT’s 녹이다 (thaw ice) split recovery search terms.
-const KEYS = [
- 'auto.components.settings.terminal.search.88561b3499',
- 'auto.components.settings.terminal.search.d4daf4f612'
-]
-
-function readCatalog(locale) {
- return JSON.parse(
- fs.readFileSync(
- new URL(`../../src/renderer/src/i18n/locales/${locale}.json`, import.meta.url),
- 'utf8'
- )
- )
-}
-
-function getValue(catalog, key) {
- return key.split('.').reduce((value, part) => value[part], catalog)
-}
-
-describe('Korean frozen-terminal settings search keywords', () => {
- it('repairs the machine-translated unfreeze keyword', () => {
- expect(
- repairTranslatedValue({
- key: 'auto.components.settings.terminal.search.d4daf4f612',
- enValue: 'unfreeze',
- localeValue: '녹이다',
- locale: 'ko'
- })
- ).toBe('정지 해제')
- })
-
- it('survives the canonical catalog repair policy', () => {
- const english = readCatalog('en')
- const catalog = readCatalog('ko')
- for (const key of KEYS) {
- const enValue = getValue(english, key)
- const localeValue = getValue(catalog, key)
- expect(enValue, key).toEqual(expect.any(String))
- expect(localeValue, key).toEqual(expect.any(String))
- expect(repairTranslatedValue({ key, enValue, localeValue, locale: 'ko' }), key).toBe(
- localeValue
- )
- }
- })
-})
diff --git a/config/scripts/macos-tcc-prompt-localization.test.mjs b/config/scripts/macos-tcc-prompt-localization.test.mjs
deleted file mode 100644
index cfe377b541e..00000000000
--- a/config/scripts/macos-tcc-prompt-localization.test.mjs
+++ /dev/null
@@ -1,43 +0,0 @@
-import fs from 'node:fs'
-
-import { describe, expect, it } from 'vitest'
-import { repairTranslatedValue } from './locale-translation-policy.mjs'
-
-const LOCALES = ['es', 'ja', 'ko', 'zh']
-const KEYS = [
- 'auto.hooks.useMacosTccPromptNotice.title',
- 'auto.hooks.useMacosTccPromptNotice.description',
- 'auto.hooks.useMacosTccPromptNotice.openSettings',
- 'auto.hooks.useMacosTccPromptNotice.dismiss',
- 'auto.components.settings.DeveloperPermissionsPane.7ca17b62c8',
- 'auto.components.settings.DeveloperPermissionsPane.c566bca278'
-]
-
-function readCatalog(locale) {
- return JSON.parse(
- fs.readFileSync(
- new URL(`../../src/renderer/src/i18n/locales/${locale}.json`, import.meta.url),
- 'utf8'
- )
- )
-}
-
-function getValue(catalog, key) {
- return key.split('.').reduce((value, part) => value[part], catalog)
-}
-
-describe('macOS TCC prompt localization', () => {
- it('survives the canonical catalog repair policy', () => {
- const english = readCatalog('en')
- for (const locale of LOCALES) {
- const catalog = readCatalog(locale)
- for (const key of KEYS) {
- const enValue = getValue(english, key)
- const localeValue = getValue(catalog, key)
- expect(enValue, key).toEqual(expect.any(String))
- expect(localeValue, key).toEqual(expect.any(String))
- expect(repairTranslatedValue({ key, enValue, localeValue, locale })).toBe(localeValue)
- }
- }
- })
-})
diff --git a/config/scripts/mobile-typecheck-cache.test.mjs b/config/scripts/mobile-typecheck-cache.test.mjs
deleted file mode 100644
index 6ab327d14e4..00000000000
--- a/config/scripts/mobile-typecheck-cache.test.mjs
+++ /dev/null
@@ -1,34 +0,0 @@
-import { readFileSync } from 'node:fs'
-import { expect, it } from 'vitest'
-import { parse } from 'yaml'
-
-it('runs uncached Bun checks like root CI and collects failures on pull requests and main', () => {
- const workflow = parse(readFileSync('.github/workflows/mobile.yml', 'utf8'))
- for (const job of [workflow.jobs.verify, workflow.jobs['main-tests']]) {
- expect(job.env.ORCA_MOBILE_TYPECHECK_COMPILER).toBe('bun')
- const steps = job.steps
- expect(
- steps.some(
- (step) => step.uses === 'actions/cache@v5' && step.with?.path?.includes('.cache/typecheck')
- )
- ).toBe(false)
- const install = steps.findIndex((step) => step.name === 'Install dependencies')
- expect(install).toBeGreaterThanOrEqual(0)
- const wait = steps.findLast((step) => step.wait)
- for (const id of ['production-types', 'test-types']) {
- const check = steps.find((step) => step.id === id)
- expect(check.if).toBeUndefined()
- expect(check.background).toBe(true)
- expect(check['continue-on-error']).toBeUndefined()
- expect(steps.indexOf(check)).toBeGreaterThan(install)
- expect(wait.wait).toContain(id)
- expect(steps.indexOf(wait)).toBeGreaterThan(steps.indexOf(check))
- }
- expect(steps.find((step) => step.id === 'production-types').run).toBe(
- 'node ../config/scripts/run-typecheck-projects-in-parallel.mjs --compiler=bun --bun-threads=2 --project=mobile/tsconfig.json'
- )
- expect(steps.find((step) => step.id === 'test-types').run).toBe(
- 'node scripts/check-tests-typecheck-ratchet.mjs'
- )
- }
-})
diff --git a/config/scripts/node-server-packaged-chat-selection.test.mjs b/config/scripts/node-server-packaged-chat-selection.test.mjs
deleted file mode 100644
index 09f13cb1f18..00000000000
--- a/config/scripts/node-server-packaged-chat-selection.test.mjs
+++ /dev/null
@@ -1,42 +0,0 @@
-import { readFileSync } from 'node:fs'
-import { expect, it } from 'vitest'
-import { parse } from 'yaml'
-import { classifyNodeServerChanges } from './node-server-change-scope.mjs'
-import { nodeServerTestPaths } from './node-server-test-paths.mjs'
-
-it.each([
- 'src/main/orcad/orcad-packaged-structured-chat.integration.test.ts',
- 'src/main/runtime/new-launch-path.ts',
- 'src/main/claude/__fixtures__/claude-agent-sdk-scripted-cli.mjs',
- 'config/scripts/orcad-entry-build.mjs',
- 'config/scripts/future-orcad-package.mjs'
-])('runs the packaged structured chat when its inputs change: %s', async (file) => {
- expect((await classifyNodeServerChanges([file], async () => new Set())).shouldRun).toBe(true)
-})
-
-it('configures Linux packaged-chat verification after building the desktop template', () => {
- const workflow = parse(readFileSync('.github/workflows/node-server-tests.yml', 'utf8'))
- const steps = workflow.jobs.persistence.steps
- const chat = steps.find((step) =>
- step.run?.includes('orcad-packaged-structured-chat.integration.test.ts')
- )
- expect(chat.if).toBe("runner.os == 'Linux'")
- expect(chat.run).toBe(
- 'pnpm test:node-server --artifact src/main/orcad/orcad-packaged-structured-chat.integration.test.ts --maxWorkers=2'
- )
- const template = steps.find((step) => step.run?.includes('build-orcad-template.mjs --targets'))
- expect(template.if).toBe("runner.os == 'Linux'")
- expect(template.run).toBe(
- "node config/scripts/build-orcad-template.mjs --targets linux-${{ runner.arch == 'ARM64' && 'arm64' || 'x64' }}-glibc"
- )
- expect(steps.indexOf(template)).toBeGreaterThan(
- steps.findIndex((step) => step.run === 'pnpm build:orcad')
- )
- expect(steps.indexOf(chat)).toBeGreaterThan(steps.indexOf(template))
- expect(template['continue-on-error']).toBeUndefined()
- expect(chat['continue-on-error']).toBeUndefined()
- // Default --artifact runs have no template, so a required-input failure would follow.
- expect(nodeServerTestPaths({ artifact: true, crossRuntime: true })).not.toContain(
- 'src/main/orcad/orcad-packaged-structured-chat.integration.test.ts'
- )
-})
diff --git a/src/main/startup/wsl-boot-diagnostics-shipping-boundary.test.ts b/src/main/startup/wsl-boot-diagnostics-shipping-boundary.test.ts
deleted file mode 100644
index c42acb403be..00000000000
--- a/src/main/startup/wsl-boot-diagnostics-shipping-boundary.test.ts
+++ /dev/null
@@ -1,36 +0,0 @@
-import { readdirSync, readFileSync } from 'node:fs'
-import path from 'node:path'
-import { describe, expect, it } from 'vitest'
-
-const SRC = path.resolve(__dirname, '../..')
-// Markers of the e2e harness that patches main's fs and child_process; shipped code never carries them.
-const HARNESS_MARKERS = [
- 'wsl-boot-diagnostics-log',
- 'orcaE9SpawnLog',
- 'recordMainProcessWslDiagnostics'
-]
-
-function shippedSources(dir: string): string[] {
- return readdirSync(dir, { withFileTypes: true }).flatMap((entry) => {
- const full = path.join(dir, entry.name)
- if (entry.isDirectory()) {
- return entry.name === 'node_modules' ? [] : shippedSources(full)
- }
- return /\.(ts|tsx|mts|cts|js|mjs)$/.test(entry.name) && !/\.(test|spec)\./.test(entry.name)
- ? [full]
- : []
- })
-}
-
-describe('E9 WSL boot diagnostics stay in the e2e harness', () => {
- it('no shipped source imports or installs the fs and spawn hooks', () => {
- const sources = shippedSources(SRC)
- // Non-vacuous: the scan really walked the app's sources.
- expect(sources.some((file) => file.endsWith(path.join('main', 'index.ts')))).toBe(true)
- const offenders = sources.filter((file) => {
- const text = readFileSync(file, 'utf8')
- return HARNESS_MARKERS.some((marker) => text.includes(marker))
- })
- expect(offenders).toEqual([])
- })
-})
diff --git a/src/main/wsl/wsl-orcad-update-move-hold-driver.test.ts b/src/main/wsl/wsl-orcad-update-move-hold-driver.test.ts
index a6bb05f9bf8..5bcecd8b2e3 100644
--- a/src/main/wsl/wsl-orcad-update-move-hold-driver.test.ts
+++ b/src/main/wsl/wsl-orcad-update-move-hold-driver.test.ts
@@ -254,7 +254,7 @@ async function expectHeld(): Promise<void> {
for (const intent of ['update', 'connect'] as const) {
const launched = await launchServer(intent)
// The running server keeps serving the move; Settings shows the code as "Not done: a project
- // is moving onto this server…" (managed-server-copy.test.ts).
+ // is moving onto this server…".
expect(launched).toMatchObject({
outcome: 'ready',
fullVersion: RUNNING,
diff --git a/src/renderer/src/components/settings/managed-server-copy.test.ts b/src/renderer/src/components/settings/managed-server-copy.test.ts
deleted file mode 100644
index 1eac6a225c7..00000000000
--- a/src/renderer/src/components/settings/managed-server-copy.test.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-import { describe, expect, it } from 'vitest'
-import { ORCAD_UPDATE_WSL_MOVE_RUNNING_CODE } from '../../../../shared/wsl-host-types'
-import { managedServerOutcomeLabel } from './managed-server-copy'
-
-describe('managedServerOutcomeLabel', () => {
- it('says a WSL server update waits for the project moving onto it', () => {
- expect(
- managedServerOutcomeLabel({ outcome: 'deferred', code: ORCAD_UPDATE_WSL_MOVE_RUNNING_CODE })
- ).toBe(
- 'Not done: a project is moving onto this server. Orca updates it once the move finishes.'
- )
- })
-})
diff --git a/src/renderer/src/i18n/provider-credit-balance-locales.test.ts b/src/renderer/src/i18n/provider-credit-balance-locales.test.ts
deleted file mode 100644
index 9f2f50f0282..00000000000
--- a/src/renderer/src/i18n/provider-credit-balance-locales.test.ts
+++ /dev/null
@@ -1,95 +0,0 @@
-import { createInstance } from 'i18next'
-import { describe, expect, it } from 'vitest'
-
-import en from './locales/en.json'
-import enRuntimeRequired from './en-runtime-required.json'
-import es from './locales/es.json'
-import fr from './locales/fr.json'
-import ja from './locales/ja.json'
-import ko from './locales/ko.json'
-import zh from './locales/zh.json'
-
-const catalogs = {
- es: { catalog: es, compactBalanceMessage: 'saldo 12.50' },
- fr: { catalog: fr, compactBalanceMessage: 'solde 12.50' },
- ja: { catalog: ja, compactBalanceMessage: '残高 12.50' },
- ko: { catalog: ko, compactBalanceMessage: '잔액 12.50' },
- zh: { catalog: zh, compactBalanceMessage: '余额 12.50' }
-}
-const balanceMessages = [
- ['StatusBar.4025a6f62f', 'Unlimited'],
- ['StatusBar.a95969101f', '{{value0}} credits'],
- ['tooltip.fbc80d8be2', 'Zen balance'],
- ['tooltip.c03c61f53f', 'Balance'],
- ['tooltip.f6a27a3c0a', '{{value0}} available'],
- ['tooltip.7404abbece', 'Usage credits'],
- ['tooltip.473d45cd0f', 'Balance {{value0}}'],
- ['tooltip.f21b2ba897', 'Credits'],
- ['tooltip.56c0d70577', 'Unlimited'],
- ['tooltip.87b5bda4d3', '{{value0}} credits available'],
- [
- 'provider.extra.usage.section.apiKeyBalanceUnavailable',
- 'Balance is not included in this usage response.'
- ]
-] as const
-
-function balanceKey(suffix: string): string {
- return `auto.components.status.bar.${suffix}`
-}
-
-describe('provider credit balance sparse target catalogs', () => {
- it.each(Object.entries(catalogs))(
- '%s omits copied English balance entries',
- async (locale, { catalog }) => {
- const instance = createInstance()
- await instance.init({ lng: locale, resources: { [locale]: { translation: catalog } } })
-
- for (const [suffix] of balanceMessages) {
- expect(instance.getResource(locale, 'translation', balanceKey(suffix))).toBeUndefined()
- }
- }
- )
-
- it.each(Object.entries(catalogs))(
- '%s falls back and interpolates balance copy at runtime',
- async (locale, { catalog, compactBalanceMessage }) => {
- const instance = createInstance()
- await instance.init({
- lng: locale,
- fallbackLng: 'en',
- resources: { en: { translation: enRuntimeRequired }, [locale]: { translation: catalog } },
- interpolation: { escapeValue: false }
- })
-
- for (const [suffix, defaultValue] of balanceMessages) {
- expect(instance.t(balanceKey(suffix), { defaultValue, value0: '12.50' })).toBe(
- defaultValue.replace('{{value0}}', '12.50')
- )
- }
- expect(
- instance.t(balanceKey('tooltip.87b5bda4d3'), {
- defaultValue: '{{value0}} credits available',
- value0: 500
- })
- ).toBe('500 credits available')
- expect(
- instance.t(balanceKey('StatusBar.4fba7dc1e7'), {
- defaultValue: '{{value0}} bal',
- value0: '12.50'
- })
- ).toBe(compactBalanceMessage)
- }
- )
-
- it('retains every English source balance message', async () => {
- const instance = createInstance()
- await instance.init({ lng: 'en', resources: { en: { translation: en } } })
-
- for (const [suffix, value] of balanceMessages) {
- expect(instance.getResource('en', 'translation', balanceKey(suffix))).toBe(value)
- }
- expect(instance.getResource('en', 'translation', balanceKey('StatusBar.4fba7dc1e7'))).toBe(
- '{{value0}} bal'
- )
- })
-})
diff --git a/src/shared/agent-kind.test.ts b/src/shared/agent-kind.test.ts
index d99fbbc87c2..879df166f20 100644
--- a/src/shared/agent-kind.test.ts
+++ b/src/shared/agent-kind.test.ts
@@ -1,36 +1,9 @@
import { describe, expect, it } from 'vitest'
import { agentKindToTuiAgent, tuiAgentToAgentKind } from './agent-kind'
-import { AGENT_KIND_VALUES, agentKindSchema } from './telemetry-events'
import { TUI_AGENT_CONFIG } from './tui-agent-config'
import type { TuiAgent } from './tui-agent'
-describe('tuiAgentToAgentKind', () => {
- it('maps every shipped TuiAgent to a concrete telemetry kind', () => {
- const agents = Object.keys(TUI_AGENT_CONFIG) as TuiAgent[]
-
- for (const agent of agents) {
- const kind = tuiAgentToAgentKind(agent)
-
- expect(kind).not.toBe('other')
- expect(agentKindSchema.safeParse(kind).success).toBe(true)
- }
- })
-
- it('keeps concrete telemetry kinds in exact sync with shipped TuiAgents', () => {
- const agents = Object.keys(TUI_AGENT_CONFIG) as TuiAgent[]
- const mappedKinds = agents.map((agent) => tuiAgentToAgentKind(agent)).sort()
- const concreteSchemaKinds = AGENT_KIND_VALUES.filter((kind) => kind !== 'other').sort()
-
- expect(mappedKinds).toEqual(concreteSchemaKinds)
- })
-
- it('uses the product id for Claude and the TuiAgent id for Pi', () => {
- expect(tuiAgentToAgentKind('claude')).toBe('claude-code')
- expect(tuiAgentToAgentKind('pi')).toBe('pi')
- })
-})
-
describe('agentKindToTuiAgent', () => {
it('round-trips every shipped TuiAgent through its telemetry kind', () => {
const agents = Object.keys(TUI_AGENT_CONFIG) as TuiAgent[]
diff --git a/src/shared/browser-cookie-import-sources.test.ts b/src/shared/browser-cookie-import-sources.test.ts
deleted file mode 100644
index 5179e84090b..00000000000
--- a/src/shared/browser-cookie-import-sources.test.ts
+++ /dev/null
@@ -1,39 +0,0 @@
-import { describe, expect, it } from 'vitest'
-import { getBrowserCookieImportSourceLabels } from './browser-cookie-import-sources'
-
-describe('getBrowserCookieImportSourceLabels', () => {
- it('includes mac-only sources on darwin', () => {
- expect(getBrowserCookieImportSourceLabels('darwin')).toEqual([
- 'Google Chrome',
- 'Microsoft Edge',
- 'Arc',
- 'Brave',
- 'Comet',
- 'Helium',
- 'Vivaldi',
- 'Firefox',
- 'Safari'
- ])
- })
-
- it('omits mac-only sources on Windows', () => {
- expect(getBrowserCookieImportSourceLabels('win32')).toEqual([
- 'Google Chrome',
- 'Microsoft Edge',
- 'Brave',
- 'Comet',
- 'Vivaldi',
- 'Firefox'
- ])
- })
-
- it('omits mac-only and Comet on Linux', () => {
- expect(getBrowserCookieImportSourceLabels('linux')).toEqual([
- 'Google Chrome',
- 'Microsoft Edge',
- 'Brave',
- 'Vivaldi',
- 'Firefox'
- ])
- })
-})
diff --git a/src/shared/plugins/manifest/plugin-json-schema.test.ts b/src/shared/plugins/manifest/plugin-json-schema.test.ts
deleted file mode 100644
index 016cee81d73..00000000000
--- a/src/shared/plugins/manifest/plugin-json-schema.test.ts
+++ /dev/null
@@ -1,31 +0,0 @@
-import { readdirSync, readFileSync } from 'node:fs'
-import path from 'node:path'
-import { describe, expect, it } from 'vitest'
-import { compilePluginJsonSchema as compile } from './plugin-json-schema.test-fixture'
-import { pluginManifestJsonSchema } from './plugin-json-schema'
-import { parsePluginManifest } from './plugin-manifest'
-
-const REPO_ROOT = path.resolve(import.meta.dirname, '..', '..', '..', '..')
-
-function manifestFixtures(): { file: string; raw: unknown }[] {
- return ['examples/plugins', 'resources/plugins/launch'].flatMap((dir) =>
- readdirSync(path.join(REPO_ROOT, dir), { withFileTypes: true })
- .filter((entry) => entry.isDirectory())
- .map((entry) => path.join(dir, entry.name, 'orca-plugin.json'))
- .map((file) => ({ file, raw: JSON.parse(readFileSync(path.join(REPO_ROOT, file), 'utf8')) }))
- )
-}
-
-describe('published plugin schemas', () => {
- it('agrees with the runtime on every bundled and example v2 manifest', () => {
- const { validate } = compile(pluginManifestJsonSchema())
- const v2 = manifestFixtures().filter(({ raw }) =>
- JSON.stringify(raw).includes('"manifestVersion":2')
- )
- expect(v2.length).toBeGreaterThan(0)
- for (const { file, raw } of v2) {
- expect(validate(raw), `${file}: ${JSON.stringify(validate.errors)}`).toBe(true)
- expect(parsePluginManifest(raw), file).toMatchObject({ ok: true })
- }
- })
-})
diff --git a/src/shared/plugins/manifest/plugin-manifest-compatibility.test.ts b/src/shared/plugins/manifest/plugin-manifest-compatibility.test.ts
index 7e40b12c8eb..dd0f7d1e8b4 100644
--- a/src/shared/plugins/manifest/plugin-manifest-compatibility.test.ts
+++ b/src/shared/plugins/manifest/plugin-manifest-compatibility.test.ts
@@ -1,9 +1,5 @@
import { describe, expect, it } from 'vitest'
-import {
- PLUGIN_MANIFEST_VERSION_CURRENT,
- pluginManifestCompatibilityError
-} from './plugin-manifest-compatibility'
-import { pluginManifestSchema } from './plugin-manifest'
+import { pluginManifestCompatibilityError } from './plugin-manifest-compatibility'
describe('pluginManifestCompatibilityError', () => {
it('names the Orca a newer plugin needs', () => {
@@ -30,15 +26,4 @@ describe('pluginManifestCompatibilityError', () => {
expect(pluginManifestCompatibilityError({ manifestVersion: 2 }, '1.4.0')).toBeNull()
expect(pluginManifestCompatibilityError('not a manifest', '1.4.0')).toBeNull()
})
-
- it('tracks the newest format the schema accepts', () => {
- expect(
- pluginManifestSchema.def.out.options.map((option) => option.shape.manifestVersion.value)
- ).toContain(PLUGIN_MANIFEST_VERSION_CURRENT)
- expect(
- pluginManifestSchema.def.out.options.every(
- (option) => option.shape.manifestVersion.value <= PLUGIN_MANIFEST_VERSION_CURRENT
- )
- ).toBe(true)
- })
})