mirror of
https://github.com/stablyai/orca.git
synced 2026-10-30 16:47:34 +00:00
* fix(native-chat): one ownership index with link roles, and a chat refuses to start while a terminal writes its conversation Each chat link now carries its role (head or earlier) and key; Session History names the chat continuing a conversation first, duplicate adoption checks only head links in both the pre-commit check and the store transaction, and terminal resumes stay refused exactly as before. The terminal-writer check now also runs inside acquireOwner before the spawn, refusing with the typed pre-spawn reason conversationOpenInTerminal. * fix(native-chat): hold a terminal start Orca issues until its terminal reports it An in-memory registry of managed terminal starts per conversation, registered in the same step as the resume admission (terminal.send with a resume command, createTerminal with a command), bound to the PTY execution that runs it, and ended only when that terminal's hooks report the conversation or the execution is gone. A chat's agent start refuses while an entry may hold its conversation. * fix(terminal): an automatic pane restore never resumes a conversation an open chat continues Resume recipes built from a pane's saved facts (cold restore, deferred and late reattach, sleeping wake, host mobile materialization) carry resumeOrigin 'saved'. The execution host decides before any command is issued: while an open chat continues the conversation, or a chat may be writing it, the pane starts its plain shell with the started-fresh notice and its saved claim is forgotten; with unreadable records only a saved restore is refused and its record kept. An admitted resume registers its managed start in the same step, so the chat's agent start refuses until the terminal reports it or exits. Clearing the last saved record now reaches disk. * Fix saved terminal resume ownership and effective launch results * Preserve conversation case and clear refused cold restore identity * fix: publish effective terminal launch results on attachment * fix: preserve terminal launch callback and candidate ownership * fix: keep existing terminal attachments observational * fix: consolidate terminal launch imports * test: document snapshot runtime fixture boundary * fix: preserve terminal launch identity types * fix: accept reattach payload policy sessions * fix: preserve terminal result validation contracts * refactor: separate terminal create contract * test: document partial terminal runtime fixtures * test: align sleeping resume store fixture * Fix terminal create type contracts * fix: return the terminal main started to its waiting view * fix: register reattached terminals before publishing their handles * Check unavailable-resume test fixture types * Complete sidebar resume test store fixture * test: bound saved resume ownership and refusal work * Settle refused saved resume claims from actual launch results * Fix saved resume test type contracts * test(e2e): capture exact terminal parking diagnostics * test: verify parked terminal with fresh host inventory * Consolidate agent session imports in remote terminal transport * Clarify terminal conversation refusal guidance * Admit note-only saved conversations without hiding live writers * Retain terminal writer proofs through final admission
79 lines
3.7 KiB
YAML
79 lines
3.7 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/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/renderer/src/components/terminal-pane/pty-connection/saved-resume-cancellation.test.ts'
|
|
- 'src/main/sqlite/sync-database.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/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
|