mirror of
https://github.com/stablyai/orca.git
synced 2026-11-16 10:58:10 +00:00
* test(perf): render and identity contracts for agent status, sidebar, tab strip and chat Twelve operation, render and identity contracts at the production seams of the hottest UI paths, each driven at N and 10N with one hardcoded bound and shown to fail with its regression restored. Registers them in the contract list and fixes the perf workflow's path filter, which had drifted to 12 of 19 contracts. Removes test-only production exports nothing reads. * test(perf): prove composer typing lands; drop dead rebuild counter Review: the composer contract never checked the draft reached the composer, and its transcript control could not fail; the live-index rebuild counter and a bucket constant had no readers after the test exports went.
80 lines
3.8 KiB
YAML
80 lines
3.8 KiB
YAML
name: Performance contracts
|
|
|
|
on:
|
|
schedule:
|
|
- cron: '15 9 * * *'
|
|
workflow_dispatch:
|
|
pull_request:
|
|
types: [opened, synchronize, reopened, ready_for_review, converted_to_draft]
|
|
paths:
|
|
- '.github/workflows/performance-contracts.yml'
|
|
- 'config/vitest.performance.config.ts'
|
|
- 'config/oxlint-performance-audit.json'
|
|
- 'config/oxlint-plugins/*performance.mjs'
|
|
- 'config/oxlint-plugins/quadratic-buffer-concat.mjs'
|
|
- 'config/scripts/static-analysis/oxlint-contracts/app-store-performance-plugin.test.mjs'
|
|
- 'config/scripts/static-analysis/oxlint-contracts/quadratic-buffer-concat-plugin.test.mjs'
|
|
- '**/*.performance.test.ts'
|
|
- '**/*.performance.test.tsx'
|
|
# Contracts without the .performance suffix. Keep in sync with config/vitest.performance.config.ts;
|
|
# without these a rename lands green and only breaks the next nightly.
|
|
- 'src/main/runtime/session-tabs/session-tabs-phone-layout-moves.test.ts'
|
|
- 'src/renderer/src/components/terminal-pane/pty-connection/startup/saved-resume-cancellation.test.ts'
|
|
- 'src/main/native-chat/agent-session-wire/host/testing/structured-agent-session-terminal-writer-acquire.test.ts'
|
|
- 'src/shared/agent-launch/permissions/tui-agent-permission-choice.test.ts'
|
|
- 'src/main/runtime/rpc/methods/projects/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/db/row-column-lists.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/lib/pane-manager/pane-terminal-output-scheduler-queue-retention.test.ts'
|
|
- 'src/renderer/src/store/diagnostics/store-identity-churn-probe.test.ts'
|
|
- 'src/main/claude-usage/scanner-incremental-append.test.ts'
|
|
- 'src/main/claude-usage/store-checkpoint-persistence.test.ts'
|
|
- 'src/renderer/src/components/native-chat/surfaces/integration/NativeChatResolvedView.streaming-input.test.tsx'
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: performance-contracts-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
contracts:
|
|
if: github.event_name != 'pull_request' || github.event.pull_request.draft != true
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
# Operation-count and retention contracts, not wall-clock budgets: use the hosted images the cache warmers seed.
|
|
runs-on: ${{ fromJSON('{"ubuntu-latest":"ubuntu-24.04","macos-latest":"macos-15","windows-latest":"windows-2022"}')[matrix.os] || matrix.os }}
|
|
timeout-minutes: 20
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
persist-credentials: false
|
|
- uses: ./.github/actions/install-node-dependencies
|
|
- name: Run operation-count and retention contracts
|
|
run: pnpm test:perf:contracts --reporter=default --reporter=json --outputFile=performance-contracts.json
|
|
# Source-only scan: identical on every OS, so run it once.
|
|
- name: Audit production performance patterns
|
|
if: always() && matrix.os == 'ubuntu-latest'
|
|
shell: bash
|
|
run: pnpm --silent audit:perf > performance-audit.json
|
|
- uses: actions/upload-artifact@v7
|
|
if: always()
|
|
with:
|
|
name: performance-contracts-${{ matrix.os }}
|
|
path: performance-contracts.json
|
|
if-no-files-found: error
|
|
- uses: actions/upload-artifact@v7
|
|
if: always() && matrix.os == 'ubuntu-latest'
|
|
with:
|
|
name: performance-audit
|
|
path: performance-audit.json
|
|
if-no-files-found: error
|