Files
orca/config/performance-audit.md
T
ff27338299 refactor(ssh): connect fails for hosts orcad can't serve; remove the relay client path (#27214)
* wip: connect fails for hosts the managed server can't serve; remove relay session, deploy and relay UI

* wip: delete relay-only client modules left unreachable, prune their tests and gates

* wip: format

* wip: exhaustive unserved message

* wip: drop relay attestation test for the deleted ownership proof

* fix: prune stale baselines; type the test transport stub

* fix(ssh): census proves leftover relay leases; name the remedy for older terminals; translate every connect-failure surface

* test(ssh): leftover leases defer to the host census

* test(e2e): remove relay-path SSH e2e specs and their CI lanes

* test(e2e): drop the auto-convert case that built its relay era through a live relay

* test(e2e): mark relay-era browser and catalog journeys fixme until they seed a profile

* test(e2e): seed relay-era browser and catalog journeys from a saved profile

The three journeys built their old-version state through a connect without an orcad template, which now refuses the host. They now start from a seeded relay-era profile, so the first connect converts the host as an upgrading user's would.

* chore(ci): drop shard timings for the deleted relay tests

* test(e2e): carry a relay-era login cookie across the browser conversion; own every launch

* test(ci): drop the deleted SSH layout oracle from its route

* test(e2e): open the retained browser after conversion, retrying a pre-connect card

* test(e2e): bind the relay-era browser partition before seeding its cookie

A relay-era build always recorded the partition binding before a page stored
data in it. Seeding the cookie into an unbound partition made the binding store
refuse it (browser_route_partition_binding_store_invalid), so the retained tab
showed the generic routing card and Retry could never clear it.

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: m4air <m4air@Mac.localdomain>
Co-authored-by: Claude <noreply@anthropic.com>
2026-10-10 22:10:33 -07:00

2.6 KiB

Performance regression checks

pnpm --silent audit:perf > performance-audit.json scans production src/ with the existing app-store and buffer-concatenation rules plus the sort-comparator rule. Warnings are advisory in this full inventory; tool/parser failures fail. New warning findings on changed lines fail pnpm check:code-quality:changed. Tests, generated files, mobile/ and cloud/ are outside this source audit.

The sort rule detects optioned localeCompare and Intl.Collator construction inside inline sort/toSorted callbacks. Construct one collator outside the callback, preserving locale, options and tie-breakers. If the locale changes at runtime, reconstruct at the next sort or key the cache by locale. Bare comparisons and standalone equality checks are allowed. There is no autofix or interprocedural analysis: named comparators, aliases, custom methods and deferred callbacks need manual review. A warning identifies repeated setup, not proof of visible lag.

pnpm test:perf:contracts runs the explicit selection in vitest.performance.config.ts: SQLite statement reuse and schema parity, relay filesystem concurrency, incremental Codex scans and reader lifetimes, pinned JSONL readers and snapshots, linear tool-result pairing and attribution allocation, tokenizer rejection, highlighting cache, queued cancellation, terminal backing-memory retention and detector fixtures. Missing listed files fail configuration loading. Tests run serially, without retries, and inherit the full suite's setup and forced-GC support. This makes existing regression coverage easy to run and attribute; it does not create new workload coverage by itself.

Incremental Claude scans and persisted Claude cache checkpoints are also included.

.github/workflows/performance-contracts.yml runs daily and manually on Linux, macOS and Windows, and on PRs changing this tooling or any listed contract file. It uploads per-OS JSON test results, plus the source inventory once from Linux because that scan is OS-independent. Its schedule starts after merge. Run the existing test:e2e:terminal-perf:scale:report for rendered typing/frame budgets. Unit tests do not measure SSH RTT, WSL scheduling or a packaged Electron renderer.

To extend coverage, select a production-path regression with an operation-count, identity, queue-admission or retained-memory oracle. Confirm it fails with the old behavior. Use controlled, counterbalanced benchmark samples for timings; avoid new machine-dependent millisecond gates in the normal unit suite. A green source scan and these contracts cannot establish that the whole app is fast.