mirror of
https://github.com/stablyai/orca.git
synced 2026-10-31 17:17:38 +00:00
* perf(lint): keep JS plugins out of default oxlint and adopt ast-grep Any jsPlugin makes Oxlint hand every file's AST to Node, so the seven custom plugins cost the default `oxlint` run several times its native time. - Move app-store-performance, quadratic-buffer-concat, renderer-scrollbar-style and ime-enter-guard (scope- or dataflow-aware) to config/oxlint-js-plugins.json, run by `pnpm lint:js-plugins`, CI, lint-staged and the changed-lines gate. - Port sort-comparator-performance, mobile-pairing and native-chat-design-tokens to ast-grep rules with rule tests, and delete the plugins. - Add @ast-grep/cli, config/sgconfig.yml, `pnpm lint:ast-grep` / `test:ast-grep`, a CI step, and an ast-grep pass in check-changed-code-quality. - Add flaky-test rules (wall-clock reads, real-time waits, polling loops, unquarantined skips, unexplained timeout bumps), baselined by a count ratchet. * Enforce flaky-test ratchet on changed files; refresh baseline * docs(agents): keep custom-rule details out of AGENTS.md * Resolve ast-grep from the repo so gate scans of other roots work
74 lines
3.3 KiB
YAML
74 lines
3.3 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/*-plugin.test.mjs'
|
|
- '!config/scripts/renderer-scrollbar-style-plugin.test.mjs'
|
|
# Keep in sync with the contract list in config/vitest.performance.config.ts;
|
|
# without these a rename lands green and only breaks the next nightly.
|
|
- '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/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/main/claude-usage/scanner-incremental-append.test.ts'
|
|
- 'src/main/claude-usage/store-checkpoint-persistence.test.ts'
|
|
|
|
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]
|
|
runs-on: ${{ fromJSON('{"ubuntu-latest":"blacksmith-4vcpu-ubuntu-2404","macos-latest":"blacksmith-6vcpu-macos-latest","windows-latest":"blacksmith-4vcpu-windows-2025"}')[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
|