Make your computer a home for your AI partner. Avibe is the local-first Agent OS: Vibey, its built-in AI partner, works out of the box, and Claude Code, Codex & OpenCode run unchanged beside it — reach them from your browser, phone, or any chat app.
Python agentagent-osaiai-agentsai-partnerchatopsclaudeclaude-codecodexdevtoolsdiscord-botlark-botllmlocal-firstlong-term-memoryopencodeslack-botvibe-codingvibeywechat
perf(ci): run UI checks as static and test parts and rebalance browser lanes (#3030)
Call White2e761b857bf7
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.ymlindex d1c2c5aef..36f75a5eb 100644--- a/.github/workflows/lint.yml+++ b/.github/workflows/lint.yml@@ -155,7 +155,24 @@ jobs:ui-checks:needs: changesif: needs.changes.outputs.docs_only == 'false'+ # Static validation and Vitest share no state, and run back to back they+ # were the workflow's longest job. Each part runs once on its own runner;+ # the required unit-tests gate needs this job, so it needs both parts.+ name: ui-checks (${{ matrix.part }})runs-on: ubuntu-latest+ strategy:+ fail-fast: false+ matrix:+ include:+ - part: static+ commands: |+ npm run validate:theme+ npm run lint+ # Production tsc excludes test files, and vitest only strips types.+ npm run typecheck:tests+ - part: tests+ commands: |+ npm teststeps:- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0@@ -168,11 +185,7 @@ jobs:working-directory: uirun: |npm ci- npm run validate:theme- npm run lint- # Production tsc excludes test files, and vitest only strips types.- npm run typecheck:tests- npm test+ ${{ matrix.commands }}ui-browser-checks:needs: changes@@ -187,7 +200,9 @@ jobs:matrix:# Each suite runs serially with one worker and its own dev server; the# serial job had become the workflow's longest. Two lanes balanced from- # measured suite times (about 7.5 minutes each) run every suite once.+ # measured suite times (about 6.5 minutes each) run every suite once.+ # Rebalance from both lanes' times across several runs: one run's two+ # lanes land on runners of different speeds.include:- lane: 1suites: |@@ -195,11 +210,11 @@ jobs:npm run test:home-medianpm run test:voice-shortcutnpm run test:chat-selection+ npm run test:badge-triggers- lane: 2suites: |npm run test:project-ordernpm run test:inbox-return- npm run test:badge-triggersnpm run test:workbench-general -- sidebar-floating.spec.ts desktop-window-chrome.spec.ts composer-route-trigger.spec.ts skills-dialog.spec.tsnpm run test:chat-interactionsnpm run test:pdf-previewdiff --git a/docs/plans/ci-critical-path.md b/docs/plans/ci-critical-path.mdindex 5710773b6..8a44f5884 100644--- a/docs/plans/ci-critical-path.md+++ b/docs/plans/ci-critical-path.md@@ -101,3 +101,52 @@ seconds and every dependency cache hit.No tests, required checks, watchdogs, or runner labels are removed.Measured results for the pull request's own runs are recorded in the PR.++## October 2026: UI Check Parts and Bytecode Measurement++### Baseline++Master run 40481392503 (`317377ee8`, after #3026 and #3029) and PR runs since+#3019 show two chains of roughly the same length. `ui-checks` took 5.5 to+8.8 minutes, depending on the runner. It ran validate:theme (5 to 9 s), lint+(49 to 81 s), and typecheck:tests (24 to 48 s), then Vitest (206 to 351 s).+The longer browser lane took 7.6 to 9.4 minutes. pdf-preview has grown from+50 s to 139 s, and lane 2's suites took 50 to 60 s longer than lane 1's in each+of four runs. The install chain took about 7.6 minutes. Unit shards were 4 to+6 minutes.++### Changes and Invariants++- `ui-checks` is a two-part matrix. The `static` part runs theme validation,+ lint and the test type-check. The `tests` part runs Vitest. Each check runs+ exactly once. The required `unit-tests` gate still needs `ui-checks`, which+ succeeds only when both parts succeed. Lint and Vitest no longer share a+ checkout, so the lint-integrity test's temporary invalid source cannot reach+ the linter.+- badge-triggers moves to browser lane 1. Every suite still runs exactly once+ with the same arguments.+- Peak demand: the run requests one more hosted job when it starts, 19 instead+ of 18. The static part usually finishes before the artifact build does, so it+ is not competing for runners when the build's consumers are requested.++### Bytecode Compilation Was Measured and Not Adopted++These probes ran on scratch-branch runs 40481504100 and 40483710679. Each probe+compared install methods on a single runner, so runner speed was not a factor.++| Measurement | Lazy (current) | `--compile-bytecode` |+| --- | ---: | ---: |+| `uv pip install -e . --group dev` (14,114 files) | 1.5–1.8 s | 4.4–7.5 s |+| Shard 5, two lanes | 241 s | 232 s |+| Shard 0, two lanes | 310 s | 312 s |+| Full test collection, one process (two runners) | 79.8 s / 78.0 s | 78.7 s / 79.8 s |+| memory-insight contract pytest | 4.7 s | 4.7 s |++Each runner compiles a dependency once, on the first import. Precompiling+everything costs as much as it saves, and the differences are within run noise.+lark_oapi is the exception. Its first import takes about 8 s cold and about+2.7 s compiled. It is imported only by the Feishu files, which all run on one+shard, and the shards are not on the critical path. Compiling repository+sources adds 1.8 s. The only measurable gain came from pytest's own rewrite+cache, about 1.4 s for the contract job, and compileall does not produce that+cache.diff --git a/tests/test_ci_pipeline.py b/tests/test_ci_pipeline.pyindex ac8e18a45..af13cb6e1 100644--- a/tests/test_ci_pipeline.py+++ b/tests/test_ci_pipeline.py@@ -413,13 +413,19 @@ def test_ui_checks_run_once_without_fencing_artifact_consumers() -> None:check_steps = [step for step in checks["steps"] if "run" in step]build_steps = [step for step in build["steps"] if step.get("working-directory") == "ui"]assert all(step.get("working-directory") == "ui" for step in check_steps)- check_commands = "\n".join(step["run"] for step in check_steps).splitlines()+ # The parts run on separate runners: each runs the shared steps with its own+ # commands, and together they run every UI check exactly once.+ shared = "\n".join(step["run"] for step in check_steps).splitlines()+ parts = checks["strategy"]["matrix"]["include"]+ assert checks["strategy"]["fail-fast"] is False+ assert shared.count("${{ matrix.commands }}") == 1+ assert "npm ci" in shared+ check_commands = [line.strip() for part in parts for line in part["commands"].splitlines()]build_commands = "\n".join(step["run"] for step in build_steps).splitlines()for command in ("npm run validate:theme", "npm run lint", "npm run typecheck:tests", "npm test"):assert check_commands.count(command) == 1assert command not in build_commandsassert build_commands.count("npm run build") == 1- assert "npm ci" in check_commandsassert "npm ci" in build_commandsfor job in (checks, browsers, build):assert job["if"] == "needs.changes.outputs.docs_only == 'false'"