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
ci: remove redundant tests and shorten the required critical path (#2527)
Call White9b63a3009bef
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.ymlindex 6b8ad4bf7..bfa8ce576 100644--- a/.github/workflows/lint.yml+++ b/.github/workflows/lint.yml@@ -78,6 +78,22 @@ jobs:npm run typecheck:testsnpm test+ ui-browser-checks:+ # Browser interactions do not depend on lint, Vitest, or the production+ # bundle. Run alongside UI validation; the required unit-tests gate waits+ # for both lanes, including failure/cancellation of either one.+ runs-on: ubuntu-latest+ steps:+ - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5+ - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5+ with:+ node-version: "22.14.0"+ cache: "npm"+ cache-dependency-path: ui/package-lock.json+ - name: Install UI dependencies+ working-directory: ui+ run: npm ci+- name: Test browser interactions# Model Hub catalog/provider regression runs on the scheduled/manual# model-hub-ui-regression workflow instead of blocking every PR.@@ -202,8 +218,11 @@ jobs:strategy:fail-fast: falsematrix:- shard: [0, 1, 2, 3, 4, 5]- shard-total: [6]+ # The last complete run still held ~77 minutes of isolated-file work.+ # Nine balanced lanes bring that work to ~8m30s each before setup,+ # without changing discovery, watchdogs or test process isolation.+ shard: [0, 1, 2, 3, 4, 5, 6, 7, 8]+ shard-total: [9]steps:- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5@@ -241,15 +260,16 @@ jobs:runs-on: ubuntu-latest# Keep UI validation in the existing required gate while allowing artifact# consumers to start as soon as their production bundle is built.- needs: [unit-test-shards, ui-checks]+ needs: [unit-test-shards, ui-checks, ui-browser-checks]if: always()steps:- name: Verify unit test shards and UI checksenv:UNIT_RESULT: ${{ needs['unit-test-shards'].result }}UI_RESULT: ${{ needs['ui-checks'].result }}+ BROWSER_RESULT: ${{ needs['ui-browser-checks'].result }}run: |- for result in "$UNIT_RESULT" "$UI_RESULT"; do+ for result in "$UNIT_RESULT" "$UI_RESULT" "$BROWSER_RESULT"; doif [ "$result" != "success" ]; thenecho "Unit/UI checks finished with result: $result"exit 1@@ -447,21 +467,20 @@ jobs:throw "Installer output does not point to the uninstall owner"}- # Exercise retirement through the real hardlink/copy launcher on- # Windows, not just mocked link fallbacks in the Python unit suite.- 1..3 | ForEach-Object {- & .\install.ps1- if ($LASTEXITCODE -ne 0) { throw "Repeated installer failed" }- $generations = @(Get-ChildItem "$env:USERPROFILE\.avibe\runtime\install-generations" -Directory)- if ($generations.Count -ne 1) {- $names = ($generations | ForEach-Object { $_.Name }) -join ", "- $logPath = Join-Path $env:USERPROFILE ".avibe\logs\vibe_remote.log"- if (Test-Path -LiteralPath $logPath) {- Write-Host "Retention log tail:"- Get-Content -LiteralPath $logPath -Tail 120- }- throw "Expected one selected generation, found $($generations.Count): $names"+ # One replacement exercises retirement through the real Windows+ # hardlink/copy launcher. Repeating the identical wheel three times+ # asserts the same selected-generation transition at installation cost.+ & .\install.ps1+ if ($LASTEXITCODE -ne 0) { throw "Replacement installer failed" }+ $generations = @(Get-ChildItem "$env:USERPROFILE\.avibe\runtime\install-generations" -Directory)+ if ($generations.Count -ne 1) {+ $names = ($generations | ForEach-Object { $_.Name }) -join ", "+ $logPath = Join-Path $env:USERPROFILE ".avibe\logs\vibe_remote.log"+ if (Test-Path -LiteralPath $logPath) {+ Write-Host "Retention log tail:"+ Get-Content -LiteralPath $logPath -Tail 120}+ throw "Expected one selected generation, found $($generations.Count): $names"}- name: Verify vibe in fresh PowerShell session@@ -509,6 +528,11 @@ jobs:- name: Uninstall keeps user data and a purge needs confirmationshell: pwshrun: |+ # Step-local environment from the first install does not carry over.+ # Any reinstall below must exercise this PR's wheel, never PyPI.+ $wheel = (Get-ChildItem dist\*.whl | Select-Object -First 1).FullName+ if (-not $wheel) { throw "Missing wheel artifact" }+ $env:AVIBE_INSTALL_PACKAGE_SPEC = $wheel$avibeHome = Join-Path $env:USERPROFILE ".avibe"$root = Join-Path $avibeHome "runtime\install-generations"$stable = Join-Path $env:USERPROFILE ".local\bin\vibe.exe"@@ -536,10 +560,10 @@ jobs:return $status}- function Install-WithPeers {- & .\install.ps1 *> reinstall.log- if ($LASTEXITCODE -ne 0) { Get-Content reinstall.log; throw "Reinstall failed" }- $generation = @(Get-ChildItem -LiteralPath $root -Directory)[0].FullName+ function Add-LauncherPeers {+ $generations = @(Get-ChildItem -LiteralPath $root -Directory)+ if ($generations.Count -ne 1) { throw "Expected the selected installed generation" }+ $generation = $generations[0].FullName# A second managed launcher: the cross-volume copy and its marker.New-Item -ItemType Directory -Force -Path $peerBin, $foreignBin | Out-NullCopy-Item -LiteralPath (Join-Path $generation "bin\vibe.exe") -Destination $peer -Force@@ -549,7 +573,8 @@ jobs:Set-Content -LiteralPath $userData -Value "keep me"}- Install-WithPeers+ # Reuse the real installation already verified in the prior steps.+ Add-LauncherPeersif (-not (Test-Path -LiteralPath $markers[1])) { throw "The installer did not record its launcher marker" }$status = Invoke-Uninstall -Log uninstall.log@@ -563,7 +588,11 @@ jobs:if (-not (Select-String -Path uninstall.log -Pattern $expected -SimpleMatch -Quiet)) { throw "Uninstall output is missing: $expected" }}- Install-WithPeers+ # Default uninstall removed the installation: recreate it once for+ # both the refused purge and the subsequent explicitly confirmed purge.+ & .\install.ps1 *> reinstall.log+ if ($LASTEXITCODE -ne 0) { Get-Content reinstall.log; throw "Reinstall failed" }+ Add-LauncherPeers$status = Invoke-Uninstall -Log purge-refused.log -Options @("-Purge")if ($status -ne 1) { throw "A purge that could not prompt exited with $status" }foreach ($path in @($stable, $peer, $root, $userData)) {diff --git a/docs/plans/ci-test-value-audit.md b/docs/plans/ci-test-value-audit.mdnew file mode 100644index 000000000..2b97538c9--- /dev/null+++ b/docs/plans/ci-test-value-audit.md@@ -0,0 +1,101 @@+# CI test-value audit and latency reduction++## Intent and acceptance++Owner request (2026-10-13): remove redundant, obsolete, tautological, or+implementation-pinning tests and optimize the valuable remainder. Aim for a+complete PR `lint` at or below the early-September reference (~9m21s), not a+faster check achieved by hiding failures. Report both elapsed workflow time+(including queue gaps) and execution critical path / total runner seconds.+Use complete successful exact-head runs; a single fast sample is not a stable+performance guarantee.++Base: `b85e3c567e598eb826c9774c545bd56aad4c3e47` (PR #2518 already merged).+Recent measurements: PR run 38258683681 = 18m33s, master run 38261750469 =+18m15s. Python files run in separate processes; a stale timing snapshot and+repeated fixture work amplify a ~536-file suite. UI validation and remaining+browser suites currently execute serially in one job. Earlier Model Hub UI+regression now runs daily/manual; Windows platform suites run on master, with+Windows latest installer smoke retained for PRs.++## Test-value rule++For each deletion record the exact test/file, the asserted contract, why the+assertion has no independent value, and any remaining owning-boundary coverage.+Credible candidates are tests of source spelling/internal layout, duplicate+regressions for an already-covered failure class, tests whose mocks implement+what they assert, dead-feature requirements, and exhaustive matrices with no+additional boundary risk. Age, passing history, AI authorship, runtime, or test+count alone are not a deletion reason. No deletion quota.++Keep unique security/authorization, data preservation, migration/compatibility,+installer, cancellation/failure propagation, and real runtime boundary coverage.+Do not add test-only production APIs, relax assertions, catch failures, add+retries, or mark valuable checks optional just to meet the latency target.+Optimize expensive fixture preparation without sharing mutable test state;+keep migration tests genuinely unseeded and hermetic filesystem/process access.++## Integration contracts and ownership++One integration PR, owned/reviewed by session `sesp2bd67rp9c`; no lane opens a+stacked PR or merges. Internal lane commits are integrated and independently+reviewed by the orchestrator before the single PR is pushed.++- Orchestrator: `.github/workflows/`, `scripts/ci_*`, timing snapshot,+ `tests/test_ci_*.py`, plan/evidence integration, review/CI delivery.+ Retain existing required context names and fail-closed aggregates. Every+ retained Python file must be selected exactly once. Split independent UI+ tasks only with explicit required dependency wiring. Reuse existing tools.+- Python lane: `tests/` excluding `test_ci_*.py`, plus its own evidence file+ `docs/plans/ci-test-value-python.md`. Optimize measured slow test fixtures and+ remove proven low-value tests. No production behavior changes, workflow or+ shard changes; report cross-boundary opportunities rather than editing them.+- UI lane: `ui/` test files/tooling/config and its own evidence file+ `docs/plans/ci-test-value-ui.md`. No application behavior changes; preserve+ existing package script interface unless coordinated. No workflow edits.+- Independent audit lane: read-only across all tests. Identify concrete+ deletion/overconstraint candidates and challenge coverage assumptions;+ no code writes. Its report is evidence, not final review authority.++No API, wire format, persistent schema, allocated IDs, credential or deployment+changes. No remote environments or local Avibe restart. Keep the primary+checkout and unrelated active worktrees untouched.++## Active execution++- Integration branch: `vibe/20261013-ci-test-value`, orchestrator worktree+ `.worktrees/avibe/ci-test-value-audit`.+- Python implementation: session `sesm4rsqtgcq5`, branch+ `vibe/20261013-ci-value-python`.+- UI implementation: session `sesswafk5qzrr`, branch+ `vibe/20261013-ci-value-ui`.+- Independent read-only audit: session `sesvtw3epcdgv`, worktree+ `.worktrees/avibe/ci-test-value-independent`.+- Shared contract commit before dispatch: `e089ae4429aae72d49b448ca4cc59d806cc2f82e`.+- All three lanes are complete. Python commit `47ff8390e` and UI commits+ `9eacb1c7d`, `a6a6e3e1d`, `12f71d572` were independently inspected and+ integrated. The read-only auditor approved the two Python duplicate+ deletions and identified unique routing/state contracts to retain.+- Orchestrator has removed shell/toolchain self-tests, split required UI lanes,+ and rebuilt a complete timing snapshot. See `ci-test-value-evidence.md`.+ Master `169c31333` was integrated before the first full-CI measurement.+ Required checks, native process isolation and real browser coverage remain.++## Work sequence++1. Collect complete per-file timings from successful PR/master runs; preserve+ source SHAs/run IDs and inspect phase breakdown for actual work vs waits.+2. Parallel test-value audits and targeted fixture/tooling reductions; record+ deletion rationale and before/after focused measurements.+3. Integrate justified removals; refresh shard timings and evaluate balanced+ plans. Prefer reducing real work before increasing runner concurrency.+4. Parallelize the retained UI lanes if still on the critical path. Keep+ cancellation/skipped/failure dependencies fail-closed and names stable.+5. Focused validation + changed Python Ruff + UI build; push a non-draft PR,+ arm one durable review/CI Watch, and validate full current-head CI and Codex.+6. Compare actual CI against target. If unmet, diagnose the remaining measured+ tail and continue bounded, evidence-led changes rather than claiming success.++Merge requires fresh explicit owner authorization for this new PR; prior+permission applied to #2518 only. Final report includes deleted contracts,+retained coverage, actual time saved, runner cost, and remaining risks.diff --git a/docs/plans/ci-test-value-evidence.md b/docs/plans/ci-test-value-evidence.mdnew file mode 100644index 000000000..ea7f1e3ca--- /dev/null+++ b/docs/plans/ci-test-value-evidence.md@@ -0,0 +1,168 @@+# CI test-value audit: orchestrator evidence++## Baselines++Both complete successful runs have 536 unique Python file records with exit+codes 0 or 5, matched to the launcher's per-shard file count. Job log REST+endpoints were used because an earlier `gh run view --log` cache contained a+partial in-progress log. Partial data is not used for scheduling.++| Run | Source | Full workflow | Python metrics wall sum (excludes interpreter shutdown) |+| --- | --- | --- | --- |+| 38258683681 | PR head `0edbdf424c5ec1223f1bcebdec63bebdf1a7e82b` | 18m33s | 4206.95s |+| 38261750469 | master `b85e3c567e598eb826c9774c545bd56aad4c3e47` | 18m15s | 4576.83s |++The initial `82b3be73b` snapshot used the median of each file's two+`Finished ... in Ns` launcher measurements, including interpreter shutdown,+not invented costs or local-machine timings. All 536 source files were+represented; the follow-up below refreshes it from the completed 538-file run.+The original stale snapshot had 352 entries.++Phase totals are evidence of work, not removal targets: the PR run spent+2731s in test calls, 684s in fixture setup, 392s in collection, and 86s in teardown.+Per-file process overhead is real, but it is not the only bottleneck. Cross-file+stub isolation must not be removed without proving order independence.++## Removed / consolidated CI test constraints++All items below are in `tests/test_ci_pipeline.py`.++| Old test | Why removed | Retained evidence / risk boundary |+| --- | --- | --- |+| `test_artifact_producer_only_installs_the_frontend_and_builds_the_core_distribution` | Pins exact shell argv/installer ordering, rejecting harmless equivalent toolchain changes without testing an artifact. | Production build still required; artifact existence, handoff, package contents and installation are verified by actual build and distribution/installer checks. |+| `test_artifact_build_stops_at_each_failed_boundary` (4 cases) | Replaces Python with a stub and supplies `bash -e` from the test itself; primarily re-tests the shell's exit semantics, not the Actions runner or build backend. | Real artifact production and downstream contract failures remain required; aggregate failure propagation is tested separately. |+| `test_ci_uv_installation_is_exact_and_cache_ownership_is_preserved` | Duplicates the pinned uv version, action SHA, job inventory, command spelling and shared cache implementation. These are performance/tool choices, not product contracts. | Workflow pinning remains unchanged and reviewable; real jobs must successfully install and execute dependencies. No source of truth moved to a test literal. |+| `test_ci_tool_install_command_propagates_failure` (3 cases over every job) | Repeatedly substitutes a stub `python` and checks its exit code under test-supplied `bash -e`; never invokes uv, pip, or a real installation. | Dependency setup remains required in CI; no error suppression added. |+| `test_existing_required_gate_fails_unless_every_dependency_succeeded` | Replace the exhaustive outcome Cartesian product with all-success plus each bad outcome on each individual dependency; the gate checks independent results. | Every dependency is still proven fail-closed for failure, cancellation, skip and missing result. Adding the browser lane requires 13 meaningful probes rather than 125 combinations. |++This deletes four test functions / nine collected cases and redundant gate+combinations, not the watchdog, process hang diagnostics, artifact provenance,+installer, shard discovery or fail-closed aggregate coverage.++## Required UI lane scheduling++Run existing UI validation and existing browser interactions in independent+jobs. The `unit-tests` required context waits for Python shards, `ui-checks`,+and `ui-browser-checks`; any non-success fails the aggregate. Artifact build+and consumers remain independent. No remaining browser suite was demoted or+deleted by this scheduling change. Npm setup is repeated once (~seconds), in+exchange for removing the ~7-8 minute serial dependency on UI validation.++## Measured shard decision++After test/tooling subtraction, retain the isolated-file runner but increase+Python lanes from six to eight. With the refreshed complete launcher timings,+six lanes have a replay lower bound of 12m43s each, before setup; eight replay at+~9m33s before fixture/tooling reductions. Keeping six would require deleting+roughly a quarter of all remaining runtime, which the audit does not justify.+Two extra lightweight Python setups trade modest concurrency for shorter+latency; total PR runner jobs remain below the pre-#2518 Windows-heavy workflow.+Do not confuse that concurrency trade-off with deleting wasted computation.++Train-on-PR / holdout-master replay (independent of the median snapshot): six+lanes reach a 14m43s tail; eight reach 11m20s. Runner variability means these+estimates are not a guarantee of a nine-minute CI. Measure the integrated run+before another concurrency change. Per-file watchdogs, process isolation,+integration exclusions and exactly-once discovery remain intact.++## Initial local validation++- Existing Python 3.12 development environment created with `uv sync --frozen`;+ temporary `ui/dist/index.html` exists only for editable packaging, is ignored,+ and is not a production build or deployable artifact.+- Actionlint 1.7.7 passes `lint.yml` (existing unknown custom runner labels+ excluded from this older actionlint release's label catalog).+- Focused `test_ci_pipeline.py` + `test_ci_unit_test_shards.py`: 62 passed in+ 32.82s. This is local correctness evidence, not the full CI performance claim.++- Integrated UI commits `9eacb1c7d` and `a6a6e3e1d` after independently inspecting+ their diffs; focused five-file Vitest run: 408 passed in 2.85s. The consolidated+ `typecheck:tests` and production UI build also pass in the integration worktree.+- The Model Catalog discovery test continues to verify live-fixture isolation+ and discovery of every spec on desktop/mobile. The historical exact count of+ 36 and a title prefix are not product contracts: no catalog scenario or label+ was deleted, and the README was aligned. The separate read-only audit's+ conservative concern was evaluated at this consuming boundary, not ignored.++## Integrated validation before first CI++- Master `169c31333` was merged into the task branch; no ownership or migration+ conflicts. Two newly added master test files are discovered normally (the+ measured snapshot remains attributed to its older 536-file source).+- Python lane `47ff8390e` reviewed and integrated: two duplicate cases deleted;+ migrated template copies reused in Vibey/context and Claude recovery tests;+ feedback test-server shutdown polling shortened, not client timeouts.+- CI/shard-focused tests after integration: 63 passed in 27.98s; changed Python+ Ruff 0.4.9 and actionlint pass. UI build/typecheck validation above also passes.+- A grouped local probe reported 75 assertions passed but did not exit before+ its 110-second command deadline. This is **not** counted as a successful+ command and is further reason not to remove file-process isolation here.+ Repeating the same files plus the ledger under the actual CI per-file+ launcher/watchdog semantics completed successfully: context 27, fixture+ contract 12, memory-removal 10, removed-feature contract 26, ledger 75+ (150 tests, all five processes exit 0). Logs/metrics confirm interpreter+ shutdown, not just pytest summaries. No full local backend suite was run.++## First exact-head result and follow-up++PR #2527 head `82b3be73b` passed full `lint` run **38285598210** and received a+new head-bound Codex +1 without findings. All 538 Python files have complete+metrics and successful exits (0 or 5). Results:++| Measure | #2518 baseline | First #2527 run |+| --- | --- | --- |+| Full PR wall time | 18m33s | **14m21s** |+| Longest Python job | 16m33s | **10m27s** |+| UI base + browsers | 16m45s serial | **6m51s / 8m40s parallel** |+| UI Vitest | 342s | **291.71s** |+| Test TypeScript check | 72s | **~31s** |+| Total runner time | 108m17s | **114m41s** |++The latency target is not met. Total runner consumption did not drop in this+sample: Windows slowed and other/master test work changed; do not attribute+all elapsed reduction to deleting computation. The required Windows smoke+now defines the tail: 10m41s execution after a 1m31s artifact build; it starts+3m34s after workflow creation. Python job starts range from +3s to +150s.+The no-queue dependency path is about 12m16s, not the observed 14m21s.++The finished-file workload totals 4596s, so eight lanes have an ~9m35s lower+bound before setup even if perfectly balanced. Follow-up uses **nine** lanes+(~8m31s replay each) and refreshes all 538 snapshot entries from this complete+run. This is one additional setup, not an unbounded runner increase.++### Remove repeated Windows installations, not installation assertions++The smoke previously installed six times: initial install, three identical+same-wheel replacements, another install just to set up uninstall peers, and+one required reinstall after removal. It now installs **three** times:++1. Initial install, then one real replacement to verify generation retirement.+2. Add managed/foreign peers to that already-verified installation; run default+ uninstall and verify data preservation / only owned launcher removal.+3. Reinstall once after removal; test refusal without purge consent, then+ confirmed purge and script-block session survival.++All unique assertions remain; repeating the identical replacement transition+three times is not a distinct contract. This removes three expensive install+passes (each was roughly a minute in the measured run). No installer production+code or network/runtime-preparation behavior is bypassed.++Inspection also found the uninstall step's reinstall did not inherit the first+step's `AVIBE_INSTALL_PACKAGE_SPEC`, so it could install published PyPI code+instead of the PR artifact. The step now explicitly selects the downloaded+wheel, preserving exact-head artifact provenance.++### Shared feedback fixture shutdown++The recovery file's HTTP fixture was already faster, but its imported fake+GitHub fixture still waited on the stdlib half-second shutdown polling. Apply+the same 0.01s server polling to that shared fixture. Real request timeouts,+barriers and recovery assertions are unchanged. Focused per-file reruns:+56 feedback tests pass (teardown total 0.77s) and 43 recovery tests pass+(teardown 0.56s); the two actual stall calls still last ~10.3s each.++Follow-up validation: 63 CI/shard contract tests pass, changed Python Ruff and+actionlint pass. Windows PowerShell is not available on this macOS host; the+real required Windows CI job is the acceptance test for its fixture change.++Performance acceptance remains pending on the next exact-head full run.diff --git a/docs/plans/ci-test-value-python.md b/docs/plans/ci-test-value-python.mdnew file mode 100644index 000000000..792289e94--- /dev/null+++ b/docs/plans/ci-test-value-python.md@@ -0,0 +1,99 @@+# Python Test Value and CI Performance Audit++This lane audited Python tests under `tests/`, excluding `test_ci_*.py`, from+the shared contract at `e089ae442`. The goal was to remove tests without an+independent contract and reduce measured setup or harness overhead while+preserving real API, authentication, state, migration, and failure semantics.++## Deletions++### `tests/test_memory_removal.py::test_config_write_transaction_loads_test_owned_snapshot`++The test only loaded a freshly saved default config through+`config_write_transaction` and compared one default field. It did not exercise+locking, nesting, concurrent writers, mutation, or fresh state. Those are the+actual transaction contract and remain covered by the primary owner tests:++- `tests/test_config_write_transaction.py::test_shared_config_lock_allows_nested_load_save_transaction`+- `tests/test_config_write_transaction.py::test_transaction_reentrant_with_save`+- `tests/test_config_write_transaction.py::test_transaction_load_and_mutator_wait_for_migration_file_lock`+- `tests/test_config_write_transaction.py::test_transaction_blocks_second_process_until_first_releases`++The retired-memory tests still cover removal from round trips, migration+persistence, concurrent-writer custody, opaque user data preservation, and+legacy shape handling.++### `tests/test_removed_feature_contract.py::test_removed_cli_command_is_unknown`++The test launched the source checkout with `python -m vibe memory status` and+asserted argparse exit code 2. This is the same parser contract already probed+by the installed artifact owner:++`tests/test_distribution_artifacts.py::test_installed_wheel_imports_and_cli_without_memory`++That test imports the built wheel and runs the same unknown command, alongside+the installed-package import and removed API route checks. The distribution+lint/installer job requires this installed-wheel test. The removed HTTP method+matrix and SPA fallback test remain because they cover distinct route and UI+semantics.++## Fixture and harness changes++### Reuse migrated SQLite templates++`test_vibey_agent.py` and `test_claude_output_recovery_ledger.py` now use the+existing `sqlite_db_factory` template facility instead of replaying the full+SQLite importer migration chain for every test. Each test still receives its+own mutable database copy. Vibey tests continue to use the default SQLite+path because the real adapter and message mirror resolve that path themselves;+the module fixture reuses the shared test-owned copy when the autouse seeder+has already created it.++The factory's no-overwrite and isolation guarantees were checked separately+by `tests/test_ci_test_fixtures.py`; that file was not modified.++### Reduce feedback test server shutdown polling++`test_feedback_intake_recovery.py` keeps the real 10-second client network+timeout in both stall cases. Its local HTTP server now runs+`serve_forever(poll_interval=0.01)`, reducing only the time for fixture+shutdown to observe the stop request. No production timeout, barrier, retry,+429 persistence, or recovery assertion changed.++## Measurements++The complete CI attribution files+`/tmp/avibe-ci-attribution/38258683681-metrics.json` and+`/tmp/avibe-ci-attribution/38261750469-metrics.json` contained all 536 files+and successful exits. They identified repeated migration setup and feedback+fixture teardown as actionable costs.++Focused local measurements used isolated uv Python 3.12.++| Focus | Before | After | Result |+| --- | ---: | ---: | --- |+| `test_feedback_intake_recovery.py` | 43 passed, 88.29s pytest | 43 passed, 66.61s pytest | 21.68s faster; stall calls remained 10.30s and 10.33s |+| `test_vibey_agent_context.py` | 27 passed, 121.00s pytest / 134.54s real | 27 passed, 22.30s pytest / 27.22s real | migrated template reused |+| `test_claude_output_recovery_ledger.py` | CI reference: 38.35s PR / 30.02s master | 75 passed, 23.44s local | migrated template reused |+| `test_vibey_agent.py` + `test_vibey_agent_context.py` | — | 157 passed, 281.40s pytest | full focused consumer verification |+| `test_ci_test_fixtures.py` | — | 12 passed, 30.20s | factory consumer contract |++The full changed-test verification also passed:++- `test_memory_removal.py` plus `test_removed_feature_contract.py`: 36 passed+- `test_claude_output_recovery_ledger.py`: 75 passed on an isolated rerun+- `test_feedback_intake_recovery.py`: 43 passed++The first ledger run was concurrent with the removal tests and had one+time-sensitive retry assertion; the isolated rerun passed all 75 tests.++## Retained slow coverage++No deletion was justified in the remaining high-cost files. The auth setup+scenarios and SQLite migration tests exercise durable custody and released+schema transitions. The pairing and scheduled-task suites cover independent+recovery and lifecycle boundaries. The model-hub source-probe matrix varies+protocol, outcome, credential identity, and mutation races; the shell-writer+matrix reaches the real scan and apply boundary with distinct parser roles.+They remain follow-up profiling candidates after the integrated CI run.+diff --git a/docs/plans/ci-test-value-ui.md b/docs/plans/ci-test-value-ui.mdnew file mode 100644index 000000000..a8149ef9f--- /dev/null+++ b/docs/plans/ci-test-value-ui.md@@ -0,0 +1,131 @@+# CI test-value audit: UI lane evidence++Lane of `docs/plans/ci-test-value-audit.md`. Scope: `ui/` test code, tooling+and config only; no application behavior, workflow, or package script name+changes. Base: `e089ae442` (contracts) on `b85e3c567`.++## Baseline attribution++From PR run 38258683681 (`ui-checks`, 16m45s, one job before the orchestrator's+base/browser split):++| Step | CI time |+| --- | --- |+| `npm ci` + `validate:theme` | ~16s |+| `npm run lint` (whole-tree ESLint + integrity) | 61s |+| `npm run typecheck:tests` (four `tsc` projects) | 72s |+| `npm test` (378 files, 6696 tests, 3 workers) | 342s wall; 599s summed test time |+| Playwright install + 8 serial suites | 8m14s |++The largest Vitest file was `scripts/lintBaseline.test.mjs` at 116.5s (next:+`SettingsModelsPage.render` at 40.2s). It spawned a second complete+`lint-baseline.mjs --update` ESLint pass immediately after the job's own+`npm run lint`. Four other `scripts/*.test.mjs` cases walked and parsed the+whole tree (`scenarioCatalog` 21.0s, `nonRenderingText` 11.1s, `glowScale`+9.8s, `modelCatalogDiscovery` 6.8s file times).++## Changes++### Commit `9eacb1c7d` — repeated whole-tree scans and source-text guards++Deleted test cases (exact names), reason, and remaining coverage:++| File > test | Reason | Remaining coverage |+| --- | --- | --- |+| `lintBaseline.test.mjs` > `an incomplete measurement blocks --update too, not just the verdict` > `refuses to write a baseline while an integrity check is failing` | Full second whole-tree ESLint run (116s CI file time). Integrity checks never read the baseline and run unconditionally first in every non-update `npm run lint`, so a baseline written during an integrity failure cannot pass CI. | Required CI `npm run lint` executes the real integrity path every run; `integrityLines` unit cases. **Known gap:** the developer-only `--update` "no write while integrity fails" ordering in `main()` no longer has automated full-tree coverage. The pure helper tests do not prove command ordering. Risk is low because the real lint still rejects the invalid tree. |+| `lintBaseline.test.mjs` > `compareToBaseline accepts the recorded debt unchanged` > `accepts a baselined violation replaced one-for-one within the same pair` | Same assertion as `reports nothing when the counts match exactly` (ledger vs identical ledger). | `reports nothing when the counts match exactly`; residual documented in `lint-baseline.mjs` header and bounded by `catches the same swap the moment it changes the count, the rule or the file`. |+| `lintBaseline.test.mjs` > `compareToBaseline cannot pass vacuously` > `fails when the lint run produced nothing at all` | Identical inputs and assertion class to `flags a rule that is now clean`. | `compareToBaseline fails on a baseline that overstates the debt` > `flags a rule that is now clean`. The empty/empty case moved into the first describe unchanged. |+| `lintBaseline.test.mjs` > `the gate script stays reviewable text` > `contains no raw NUL byte` | Byte scan of a dev script's source; not a user-facing contract. A binary diff is visible in review anyway. | None needed. |+| `lintBaseline.test.mjs` > `the gate script stays reviewable text` > `still joins the pair on a character neither half can contain` | Expected value is the implementation's separator spelling. | `pairKey` > `cannot confuse two different pairs that share a prefix` (the behavior). |+| `lintPolicy.test.mjs` > `the real UI tree is what the gate measures` > `covers the root config file the previous scope contract could not see`, `covers nested sources without anyone listing them`, `resolves exactly the pinned policy for every one of them` | Re-walk the real tree and resolve config for all ~1062 files, which `npm run lint`'s `measureIntegrity` already does on every CI run (`UNLINTED`/`UNWALKED`/`POLICY`/`DOMAIN`). | Required `npm run lint`; fixture tests `intendedFiles walks the whole repo-owned TypeScript tree` (root, nested, symlink, exclusions) and `a scope narrowing takes files out of the policy` (`basePath` dropping `vite.config.ts`). |+| `lintPolicy.test.mjs` > same describe > `gives every whole-tree test a clock that measures a hang, not a busy runner` | AST meta-test over test files pinning the `UI_ROOT` variable name and per-test timeouts; source structure, no product behavior. Its subjects are deleted. | None needed. |+| `glowScale.test.mjs` > `can spell every blur a design annotation names` and the 7 `reads %s` probes of its `ANNOTATED_BLUR` helper | Asserts code comments ("glow, blur 16") against the token scale; comments render nothing, and the probes test a test-only helper. Whole-tree parse (9.8s CI file time). | Per-role/per-theme rung and `OFF_RULE` assertions in the same file pin the actual token values; `validate:theme` forces every glow through a token. |+| `nonRenderingText.test.mjs` > `withoutNonRenderingText` > `preserves length and line breaks across every scanned file` | Whole-tree TypeScript parse (11.1s CI file time). The defect class it names is astral characters (UTF-16 vs code points). | Replaced by `preserves length and line breaks in %s after an astral character` (`.ts`, `.tsx`, `.css` fixtures with exact expected output). Mutation check: changing the blanker's `source.split('')` to `[...source]` fails the `.ts` and `.tsx` rows. |+| `nonRenderingText.test.mjs` > `withoutNonRenderingText` > `is applied to every extension the scan reads` | Regex over `validate-theme.mjs` source text for its last `extensions:` literal. | The dispatcher has two branches (`.css` vs TypeScript), both exercised by the `NON_RENDERING`/`RENDERING` fixtures for `probe.ts`, `probe.tsx` and `probe.css`. |+| `modelCatalogDiscovery.test.mjs` > `isolated catalog discovery retains all scenario-labelled browser cases` | Pins an exact case count (36), so any added case breaks it; a dropped spec file is already caught. One fewer `playwright --list` spawn. | `isolated discovery includes every fixture spec on both viewports`; `live E2E discovery never collects the model catalog fixture`; the suite itself runs in daily/manual `model-hub-ui-regression`. |++`scripts/wholeTreeScan.mjs` (the shared 60s timeout constant) had no remaining+users and is removed. Test count in `scripts/`: 693 → 676.++### Commit `a6a6e3e1d` — one `tsc` pass for equivalent test projects++`src/components/settings/models/tsconfig.tests.json`,+`tsconfig.i18n-tests.json` and+`src/components/onboarding/providers/tsconfig.tests.json` extended the same+`tsconfig.app.json` with the i18next augmentation, so shared application+sources were type-checked three times. They become one `ui/tsconfig.tests.json`.++- `tsc --listFilesOnly`: the sorted union of the three old projects (1061+ files) is identical to the new project's list.+- `tsc --showConfig`: effective compiler options are identical except+ `composite: false` (the default) and the unused `tsBuildInfoFile` (neither+ `incremental` nor `composite` is set, so nothing is written).+- `src/i18n/tsconfig.guard.json` stays separate on purpose: it adds node types+ and deliberately omits the application augmentation so the key-coverage+ guard's synthetic resources remain untyped.+- `typecheck:tests` keeps its name.++## Measurements (local, 10-core macOS, same worktree)++| Command | Before | After |+| --- | --- | --- |+| `npx vitest run scripts/lintBaseline.test.mjs` | 30.3s | 0.7s |+| `npx vitest run scripts/` (17 files) | 32.2s wall, 91s user CPU | 4.9s wall, 30s user CPU |+| `npm run typecheck:tests` | 32.4s (12.5 + 8.8 + 0.9 + 10.3) | 13.1s |+| Merged project alone (`tsc -p tsconfig.tests.json`) | — | 12.3s |++CI file times of removed work: 116.5s (`lintBaseline`) plus the whole-tree+cases inside `nonRenderingText`, `glowScale` and `lintPolicy` (~5s + ~3.4s ++~1s locally) and one Playwright list spawn. With 3 Vitest workers that is an+expected ~40–60s less `npm test` wall time. The `lintBaseline` child ESLint+process also stops competing for runner CPU. Expected `typecheck:tests`+saving is ~40s of 72s. Confirm both on the first real CI run.++Validation run on `a6a6e3e1d`: `npx vitest run scripts/` (676 passed),+`npm run typecheck:tests`, `npm run lint` (passes; 1062 sources measured),+`npm run build` (passes), ESLint on the changed test files.++## Not changed, with evidence++- **E2E.** Each suite pays its own `tsc` + Vite cold start (~5–13s) and runs+ `workers: 1`. Onboarding `lineup.spec.ts` runs a 7-viewport × 2-state+ matrix. `onboarding.css` has ~5 width/height bands, so `1024x768` shares+ `1200x800`'s band. Trimming it would save ~7s, and the orchestrator already+ moved E2E to its own lane, so the specs are untouched.+- **`scenarioCatalog.test.mjs`** (21s CI) runs the real scenario-catalog+ citation gate through `vitest list`. It is the repository's only enforcement+ of that gate, so it is kept.++## Follow-up candidates (audit only, not implemented)++Two read-only subagent audits produced candidates. They are unverified by+mutation, and the orchestrator asked to land the first CI run before broadening.++- **Source-text tests in `src/components/settings/models/`.** ~34 cases match+ the AGENTS.md §7 source-text exclusion and name behavioral coverage. Examples:+ - `repair.test.ts` spelling bans+ - `modelHubStylePolicy.test.ts` regexes over class names or formulas+ - `regionRead.test.ts`, `mutationSettlement.test.ts`,+ `mutationConvergence.test.ts`, `hopIdentity.test.ts`,+ `sourceStateClassification.test.ts` and `pickerExits.test.ts` call-site+ regexes+ - two cases in `SettingsModelsPage.render.test.tsx` (:587, :2422)+ - two cases in `SourceDetailPanel.test.tsx` (:958, :967)+ - `workbenchEventOwnership.test.ts` :92++ About 37 more are formally §7 violations but are the only PR-gate guard of a+ timing or layout property. They need an owner decision rather than deletion.+- **Production code reached only by tests.** `repair.ts` probe family,+ `modelsApi.probeAgent` and `supply.ts` `healthyButUnrunnable` (dead code per+ §7; outside this lane's no-application-change scope).+- **Real-time waits that can move to fake timers without changing+ assertions.** PetPage registration retry (~6.5s local), the+ SettingsModelsPage OAuth `POLL_MS` (~4.2s), the BackendModelEditorDialog+ 250ms lookup debounce (~3.5s), and `waitFor` 50ms polling in the+ ChatPage.hydration matrix (2.8s → 1.1s).+- **Redundant matrix rows that reach no distinct branch.** ChatPage.hydration+ `:460` (35 → 18 rows), `AddApiKeyDialog` `:198` (11 `openai_chat` vendor+ rows), and `SourceDetailPanel` `:1043`/`:631`.+- **Possible flake to triage separately:** `SettingsModelsPage.render.test.tsx`+ `installs a removed backend before the committed route closes and applies+ PF-1` (3/11 local failures at the focus `waitFor`).diff --git a/scripts/ci_unit_test_timings.json b/scripts/ci_unit_test_timings.jsonindex 69c8783e7..42c06a866 100644--- a/scripts/ci_unit_test_timings.json+++ b/scripts/ci_unit_test_timings.json@@ -1,358 +1,543 @@{- "schema_version": 1,- "source": "GitHub Actions run 33959161877 (cfe16d930f; all six unit shards passed)",+ "source": "GitHub Actions run 38285598210 (82b3be73b2b198f079f64fd7728bffa20b0a8869), complete successful per-file launcher elapsed seconds","durations_seconds": {- "tests/scenarios/auth_setup/test_auth_setup_scenarios.py": 12,- "tests/scenarios/message_delivery/test_message_delivery_scenarios.py": 4,- "tests/scenarios/model_hub/test_model_hub_catalog.py": 4,- "tests/scenarios/model_hub/test_model_hub_configured_route_scenarios.py": 3,- "tests/scenarios/model_hub/test_model_hub_live_resolution_scenarios.py": 3,- "tests/scenarios/model_hub/test_model_hub_migration_scenarios.py": 6,- "tests/scenarios/model_hub/test_model_hub_native_oauth_scenarios.py": 5,- "tests/scenarios/model_hub/test_model_hub_turn_contract_scenarios.py": 2,- "tests/scenarios/permissions/test_permissions_scenarios.py": 5,- "tests/test_admin_notifications.py": 3,- "tests/test_agent_activity_service.py": 4,- "tests/test_agent_auth_service.py": 3,- "tests/test_agent_backend_alive.py": 3,- "tests/test_agent_backend_catalog.py": 2,- "tests/test_agent_events_retention.py": 6,- "tests/test_agent_graph_service.py": 5,- "tests/test_agent_initiated_turn_fsm.py": 1,- "tests/test_agent_organization_onboarding.py": 9,- "tests/test_agent_run_target.py": 4,- "tests/test_agent_service.py": 5,- "tests/test_agent_silent_result.py": 1,- "tests/test_agent_steering.py": 17,- "tests/test_agent_stop_settlement.py": 2,- "tests/test_agent_tool_policy.py": 3,- "tests/test_agents_graph_route.py": 3,- "tests/test_api_key_masking.py": 1,- "tests/test_api_runtime_refresh.py": 1,- "tests/test_api_save_config_merge.py": 35,- "tests/test_async_bridge.py": 0,- "tests/test_atomic_io.py": 1,- "tests/test_audio_asr.py": 2,- "tests/test_auth_pipeline.py": 1,- "tests/test_avault_agent.py": 1,- "tests/test_backend_failure.py": 1,- "tests/test_backend_model_catalog.py": 1,- "tests/test_backend_restart.py": 3,- "tests/test_background_work_banner.py": 12,- "tests/test_bind_code_api.py": 2,- "tests/test_bind_security.py": 1,- "tests/test_caller_context.py": 1,- "tests/test_chat_discovery.py": 28,- "tests/test_ci_pipeline.py": 1,- "tests/test_ci_test_fixtures.py": 2,- "tests/test_ci_unit_test_shards.py": 2,- "tests/test_claude_agent_initiated_turn.py": 3,- "tests/test_claude_agent_sessions.py": 2,- "tests/test_claude_cli_path.py": 4,- "tests/test_claude_container_sandbox.py": 2,- "tests/test_claude_model_catalog.py": 1,- "tests/test_claude_process_reaper.py": 2,- "tests/test_claude_reasoning_options.py": 1,- "tests/test_claude_receiver_result_settle.py": 2,- "tests/test_claude_sdk_compat.py": 2,- "tests/test_claude_subprocess_env.py": 1,- "tests/test_claude_token_usage.py": 2,- "tests/test_cli_agent_models.py": 2,- "tests/test_cli_agent_run_schema.py": 11,- "tests/test_cli_definition_read_projection.py": 6,- "tests/test_cli_pagination.py": 10,- "tests/test_cli_screenshot_command.py": 1,- "tests/test_cli_setup_status.py": 1,- "tests/test_cli_task_command.py": 57,- "tests/test_cli_watch_command.py": 15,- "tests/test_cloudflare_network.py": 1,- "tests/test_codex_agent.py": 4,- "tests/test_codex_api_auth.py": 2,- "tests/test_codex_config.py": 1,- "tests/test_codex_event_handler.py": 1,- "tests/test_codex_process_match.py": 1,- "tests/test_codex_prompt_delivery_contract.py": 2,- "tests/test_codex_session.py": 1,- "tests/test_codex_token_usage.py": 1,- "tests/test_codex_transport.py": 1,- "tests/test_codex_turn_state.py": 1,- "tests/test_command_handler_user_names.py": 1,- "tests/test_command_runner.py": 5,- "tests/test_config_write_transaction.py": 14,- "tests/test_conftest_auth_home_isolation.py": 1,- "tests/test_controller_ack.py": 1,- "tests/test_controller_agent_status.py": 3,- "tests/test_controller_config_reload.py": 2,- "tests/test_controller_dispatch_loop.py": 3,- "tests/test_controller_idle_cleanup.py": 3,- "tests/test_controller_im_ready.py": 3,- "tests/test_controller_model_hub_gate.py": 3,- "tests/test_controller_platform_reconcile.py": 9,- "tests/test_controller_trace_retention.py": 3,- "tests/test_controller_vibe_agent_routing.py": 2,- "tests/test_core_services_dispatch.py": 1,- "tests/test_core_services_sessions.py": 7,- "tests/test_core_services_settings.py": 5,- "tests/test_delete_channel_scope.py": 1,- "tests/test_delivery_ack_reaction.py": 3,- "tests/test_delivery_state_matrix.py": 2,- "tests/test_dependency_network.py": 1,- "tests/test_dev_state_migration_guard.py": 1,- "tests/test_discord_api_retry.py": 1,- "tests/test_discord_guild_settings.py": 8,- "tests/test_discord_model_picker.py": 1,- "tests/test_discord_reply_anchor.py": 1,- "tests/test_discord_runtime.py": 2,- "tests/test_discovered_chats.py": 1,- "tests/test_dispatcher_stream_chunk.py": 1,- "tests/test_dock_api.py": 5,- "tests/test_docker_entrypoint_supervisor.py": 15,- "tests/test_doctor_i18n.py": 4,- "tests/test_event_loss_is_never_silent.py": 4,- "tests/test_feishu_event_dispatcher.py": 1,- "tests/test_feishu_hot_stop.py": 11,- "tests/test_feishu_post_messages.py": 1,- "tests/test_feishu_reaction_emoji.py": 2,- "tests/test_feishu_routing_card.py": 1,- "tests/test_feishu_status_bubble_footer.py": 4,- "tests/test_file_browser_backend.py": 5,- "tests/test_file_search.py": 1,- "tests/test_git_binary.py": 1,- "tests/test_git_runtime.py": 1,- "tests/test_git_runtime_release_guard.py": 1,- "tests/test_github_release.py": 1,- "tests/test_github_wait_common.py": 1,- "tests/test_global_agents_md.py": 1,- "tests/test_harness_definition_lifecycle.py": 27,- "tests/test_harness_failure_visibility.py": 51,- "tests/test_harness_health_projection.py": 5,- "tests/test_harness_live_status.py": 5,- "tests/test_harness_payload_enrichment.py": 2,- "tests/test_harness_run_projection.py": 3,- "tests/test_harness_skill_guidance.py": 1,- "tests/test_i18n_backend_keys.py": 2,- "tests/test_i18n_key_parity.py": 1,- "tests/test_im_base_auth.py": 1,- "tests/test_im_post_send_bookkeeping.py": 10,- "tests/test_im_proxy_unification.py": 1,- "tests/test_inbound_attachments.py": 3,- "tests/test_inbox_bridge.py": 1,- "tests/test_inbox_events.py": 3,- "tests/test_incus_regression.py": 3,- "tests/test_incus_regression_supervisor.py": 1,- "tests/test_incus_tenant_scaffold.py": 1,- "tests/test_install_integrity.py": 1,- "tests/test_install_script.py": 3,- "tests/test_instance_authorization.py": 12,- "tests/test_internal_client.py": 2,- "tests/test_internal_client_timeouts.py": 2,- "tests/test_internal_server.py": 33,- "tests/test_latest_version_cache.py": 1,- "tests/test_local_deps.py": 16,- "tests/test_macos_session_diagnostics.py": 3,- "tests/test_managed_runtime.py": 5,- "tests/test_managed_runtime_composite_artifacts.py": 1,- "tests/test_managed_skills.py": 2,- "tests/test_message_context_helpers.py": 0,- "tests/test_message_delivery_authority.py": 15,- "tests/test_message_dispatcher_file_uploads.py": 2,- "tests/test_message_dispatcher_platform_limits.py": 1,- "tests/test_message_dispatcher_result_fallback.py": 1,- "tests/test_message_dispatcher_scheduled.py": 8,- "tests/test_message_dispatcher_status_bubble.py": 1,- "tests/test_message_handler_attachments.py": 2,- "tests/test_message_handler_auth_setup.py": 1,- "tests/test_message_handler_harness_echo.py": 2,- "tests/test_message_handler_missing_agent.py": 2,- "tests/test_message_handler_typing.py": 3,- "tests/test_message_handler_user_info.py": 1,- "tests/test_message_mirror.py": 6,- "tests/test_message_priority_cutover.py": 1,- "tests/test_message_search.py": 3,- "tests/test_message_type_catalog.py": 1,- "tests/test_message_type_python_consumers.py": 1,- "tests/test_messages_service.py": 7,- "tests/test_migration_lock.py": 3,- "tests/test_migration_release_guard.py": 2,- "tests/test_model_hub_api.py": 11,- "tests/test_model_hub_config.py": 24,- "tests/test_model_hub_engine_release_guard.py": 1,- "tests/test_model_hub_injection.py": 3,- "tests/test_model_hub_json_wire.py": 4,- "tests/test_model_hub_l3.py": 18,- "tests/test_model_hub_oauth.py": 3,- "tests/test_model_hub_reasoning_tiers.py": 1,- "tests/test_model_hub_resolution.py": 7,- "tests/test_model_hub_runtime.py": 9,- "tests/test_model_hub_structure_guards.py": 7,- "tests/test_model_hub_tool_names.py": 4,- "tests/test_model_hub_usage.py": 5,- "tests/test_model_service.py": 1,- "tests/test_models_dev_catalog.py": 3,- "tests/test_multi_platform_runtime.py": 14,- "tests/test_native_login_single_flight.py": 2,- "tests/test_native_login_structure_guards.py": 4,- "tests/test_native_session_providers.py": 2,- "tests/test_oauth_callback_diagnostics.py": 2,- "tests/test_opencode_caller_context.py": 1,- "tests/test_opencode_client_manager.py": 2,- "tests/test_opencode_config_reconciler.py": 1,- "tests/test_opencode_default_provider_routing.py": 2,- "tests/test_opencode_provider_base_url.py": 1,- "tests/test_opencode_provider_catalog_coercion.py": 1,- "tests/test_opencode_provider_keys_reader.py": 1,- "tests/test_opencode_reasoning_variants.py": 1,- "tests/test_opencode_restore_polls.py": 3,- "tests/test_opencode_server.py": 3,- "tests/test_opencode_session_manager.py": 3,- "tests/test_opencode_stop_receipt.py": 3,- "tests/test_origin_links.py": 1,- "tests/test_pagination.py": 1,- "tests/test_permissions.py": 13,- "tests/test_platform_registry.py": 1,- "tests/test_prepare_regression.py": 1,- "tests/test_process_diagnostics.py": 1,- "tests/test_process_isolation.py": 2,- "tests/test_processing_indicator_reaction.py": 1,- "tests/test_project_access_service.py": 3,- "tests/test_project_access_sync.py": 2,- "tests/test_project_agents_md.py": 1,- "tests/test_projects_service.py": 2,- "tests/test_prompt_studio_catalog.py": 1,- "tests/test_pypi_shim.py": 1,- "tests/test_queued_message_writer_policy.py": 4,- "tests/test_read_only_query.py": 0,- "tests/test_read_only_query_vault_denylist.py": 1,- "tests/test_regression_script.py": 2,- "tests/test_release_package_version.py": 1,- "tests/test_remote_access_vibe_cloud.py": 12,- "tests/test_remote_authorization_revision.py": 33,- "tests/test_remote_resource_acl_sync.py": 6,- "tests/test_reply_enhancer_platform.py": 12,- "tests/test_reply_enhancer_secret_requests.py": 1,- "tests/test_reserved_native_session_id.py": 2,- "tests/test_resource_access_service.py": 33,- "tests/test_resource_acl_agents.py": 6,- "tests/test_resource_acl_show_pages.py": 7,- "tests/test_resource_acl_vaults.py": 5,- "tests/test_resource_governance.py": 1,- "tests/test_restart_supervisor.py": 1,- "tests/test_result_message_token_field.py": 1,- "tests/test_resume_session.py": 3,- "tests/test_routing_modal_selection.py": 1,- "tests/test_running_agents_service.py": 2,- "tests/test_runtime_activation.py": 3,- "tests/test_runtime_commands.py": 0,- "tests/test_runtime_log_sink.py": 2,- "tests/test_runtime_ownership.py": 7,- "tests/test_runtime_recovery.py": 4,- "tests/test_runtime_scope_bootstrap.py": 1,- "tests/test_runtime_service_lock.py": 6,- "tests/test_runtime_work_supervisor.py": 1,- "tests/test_save_opencode_provider_auth.py": 13,- "tests/test_scheduled_command_task_integration.py": 5,- "tests/test_scheduled_tasks.py": 88,- "tests/test_sentry_integration.py": 3,- "tests/test_service_logging_handlers.py": 1,- "tests/test_service_readiness.py": 6,- "tests/test_session_activities.py": 6,- "tests/test_session_archive.py": 5,- "tests/test_session_cli.py": 8,- "tests/test_session_delivery_fsm.py": 30,- "tests/test_session_fork.py": 19,- "tests/test_session_handler_base_id.py": 2,- "tests/test_session_route_writer_policy.py": 1,- "tests/test_session_titles.py": 2,- "tests/test_settings_disk_fallback.py": 4,- "tests/test_settings_handler.py": 3,- "tests/test_show_git.py": 3,- "tests/test_show_git_turn_entrypoints.py": 3,- "tests/test_show_identity.py": 3,- "tests/test_show_page_legacy_ui_removed.py": 1,- "tests/test_show_pages.py": 23,- "tests/test_show_pages_admin_api.py": 4,- "tests/test_show_runtime_archive_cleanup.py": 4,- "tests/test_show_runtime_manifest.py": 1,- "tests/test_show_runtime_manifest_packaging.py": 1,- "tests/test_show_runtime_orphan_sweep.py": 1,- "tests/test_show_runtime_protocol.py": 1,- "tests/test_show_session_events.py": 8,- "tests/test_skill_cli.py": 1,- "tests/test_skills_service.py": 5,- "tests/test_slack_app_mention_empty.py": 1,- "tests/test_slack_dm_mentions.py": 1,- "tests/test_slack_markdown_footer.py": 1,- "tests/test_sqlite_sessions_store.py": 36,- "tests/test_sqlite_settings_store.py": 24,- "tests/test_sqlite_state_migration.py": 74,- "tests/test_sqlite_state_startup.py": 1,- "tests/test_sse_broker.py": 1,- "tests/test_state_backups.py": 7,- "tests/test_status_bubble_footer_render.py": 2,- "tests/test_status_bubble_indicator.py": 2,- "tests/test_status_bubble_settings.py": 3,- "tests/test_subagent_router.py": 1,- "tests/test_telegram_attachment_download.py": 1,- "tests/test_telegram_bot.py": 12,- "tests/test_telegram_formatter.py": 1,- "tests/test_telegram_proxy.py": 1,- "tests/test_terminal_backend.py": 5,- "tests/test_test_failure_classifier.py": 2,- "tests/test_tmux_runtime.py": 1,- "tests/test_tunnel_quality.py": 1,- "tests/test_tunnel_recovery.py": 5,- "tests/test_turn_terminal_reaction.py": 1,- "tests/test_ui_api.py": 17,- "tests/test_ui_project_access.py": 6,- "tests/test_ui_server_fastapi.py": 21,- "tests/test_ui_server_install.py": 5,- "tests/test_ui_server_logs.py": 3,- "tests/test_ui_server_mutation_protection.py": 9,- "tests/test_ui_server_reload.py": 4,- "tests/test_ui_server_skills_routes.py": 3,- "tests/test_ui_server_voice_telemetry.py": 2,- "tests/test_ui_server_voice_transcription.py": 3,- "tests/test_ui_session_stream.py": 11,- "tests/test_ui_show_pages.py": 45,- "tests/test_update_checker_platforms.py": 40,- "tests/test_upgrade_flow.py": 17,- "tests/test_user_platform_scope.py": 6,- "tests/test_v2_compat_platforms.py": 2,- "tests/test_v2_config_platform_registry.py": 3,- "tests/test_v2_paths.py": 1,- "tests/test_v2_sessions.py": 11,- "tests/test_vault_addresses.py": 1,- "tests/test_vault_api.py": 15,- "tests/test_vault_cli.py": 14,- "tests/test_vault_crypto.py": 1,- "tests/test_vault_export_inject.py": 4,- "tests/test_vault_fetch.py": 6,- "tests/test_vault_protected_format.py": 1,- "tests/test_vault_request_callbacks.py": 6,- "tests/test_vault_request_im_notifications.py": 1,- "tests/test_vault_rest.py": 5,- "tests/test_vault_schema.py": 1,- "tests/test_vault_service.py": 5,- "tests/test_version_identity.py": 2,- "tests/test_vibe_agent_archive.py": 27,- "tests/test_vibe_agent_model_prefill.py": 7,- "tests/test_vibe_cli.py": 7,- "tests/test_wait_for_github_action_runs.py": 1,- "tests/test_wait_for_github_issue_activity.py": 1,- "tests/test_wait_for_github_pr_activity.py": 2,- "tests/test_watch_worker.py": 2,- "tests/test_watches.py": 12,- "tests/test_web_oauth_flow.py": 2,- "tests/test_web_push_notifications.py": 9,- "tests/test_web_push_service.py": 6,- "tests/test_wechat_attachment_download.py": 1,- "tests/test_wechat_auth.py": 2,- "tests/test_wechat_bot.py": 3,- "tests/test_wechat_cdn.py": 1,- "tests/test_workbench_media.py": 11,- "tests/test_workbench_only_runtime.py": 5,- "tests/test_workbench_prefs_api.py": 3,- "tests/test_workbench_session_defaults.py": 3,- "tests/test_workspace_system_session.py": 4+ "tests/agent_core/agent/test_compaction.py": 17.0,+ "tests/agent_core/agent/test_context.py": 10.0,+ "tests/agent_core/agent/test_fork.py": 8.0,+ "tests/agent_core/agent/test_loop.py": 7.0,+ "tests/agent_core/agent/test_outcomes.py": 7.0,+ "tests/agent_core/agent/test_projection.py": 7.0,+ "tests/agent_core/agent/test_recovery.py": 7.0,+ "tests/agent_core/ai/test_anthropic_prompt_cache.py": 2.0,+ "tests/agent_core/ai/test_pi_stream_differential.py": 6.0,+ "tests/agent_core/ai/test_provider_adapters.py": 7.0,+ "tests/agent_core/ai/test_transform_sse_errors.py": 3.0,+ "tests/agent_core/test_messages.py": 3.0,+ "tests/agent_core/tools/test_args.py": 2.0,+ "tests/agent_core/tools/test_bash.py": 22.0,+ "tests/agent_core/tools/test_file_kinds.py": 2.0,+ "tests/agent_core/tools/test_jobs.py": 11.0,+ "tests/agent_core/tools/test_jobs_windows.py": 1.0,+ "tests/agent_core/tools/test_normalize.py": 3.0,+ "tests/agent_core/tools/test_powershell.py": 2.0,+ "tests/agent_core/tools/test_read.py": 2.0,+ "tests/agent_core/tools/test_write_edit.py": 8.0,+ "tests/scenarios/auth_setup/test_auth_setup_scenarios.py": 175.0,+ "tests/scenarios/memory_upgrade_compatibility/test_catalog.py": 2.0,+ "tests/scenarios/message_delivery/test_message_delivery_scenarios.py": 4.0,+ "tests/scenarios/model_hub/test_model_hub_catalog.py": 6.0,+ "tests/scenarios/model_hub/test_model_hub_configured_route_scenarios.py": 6.0,+ "tests/scenarios/model_hub/test_model_hub_live_resolution_scenarios.py": 4.0,+ "tests/scenarios/model_hub/test_model_hub_migration_scenarios.py": 21.0,+ "tests/scenarios/model_hub/test_model_hub_native_oauth_scenarios.py": 4.0,+ "tests/scenarios/model_hub/test_model_hub_turn_contract_scenarios.py": 3.0,+ "tests/scenarios/model_hub/test_model_hub_valuation_scenarios.py": 3.0,+ "tests/scenarios/permissions/test_cli_invocation_authority.py": 10.0,+ "tests/scenarios/permissions/test_deferred_authority_provenance.py": 8.0,+ "tests/scenarios/permissions/test_editor_reservation_and_fork.py": 8.0,+ "tests/scenarios/permissions/test_effective_target_preflight.py": 41.0,+ "tests/scenarios/permissions/test_member_instance_operations.py": 14.0,+ "tests/scenarios/permissions/test_permissions_scenarios.py": 6.0,+ "tests/test_admin_notifications.py": 3.0,+ "tests/test_agent_activity_service.py": 6.0,+ "tests/test_agent_auth_service.py": 4.0,+ "tests/test_agent_backend_alive.py": 3.0,+ "tests/test_agent_backend_catalog.py": 3.0,+ "tests/test_agent_context_seq_migration.py": 3.0,+ "tests/test_agent_events_retention.py": 7.0,+ "tests/test_agent_graph_service.py": 7.0,+ "tests/test_agent_initiated_turn_fsm.py": 3.0,+ "tests/test_agent_input.py": 2.0,+ "tests/test_agent_install_failures.py": 2.0,+ "tests/test_agent_organization_onboarding.py": 7.0,+ "tests/test_agent_run_close_after.py": 3.0,+ "tests/test_agent_run_target.py": 6.0,+ "tests/test_agent_service.py": 5.0,+ "tests/test_agent_silent_result.py": 3.0,+ "tests/test_agent_steering.py": 17.0,+ "tests/test_agent_stop_settlement.py": 3.0,+ "tests/test_agent_tool_policy.py": 3.0,+ "tests/test_agent_transcript.py": 5.0,+ "tests/test_agents_graph_route.py": 4.0,+ "tests/test_api_key_masking.py": 2.0,+ "tests/test_api_runtime_refresh.py": 2.0,+ "tests/test_api_save_config_merge.py": 23.0,+ "tests/test_async_bridge.py": 3.0,+ "tests/test_atomic_io.py": 2.0,+ "tests/test_audio_asr.py": 2.0,+ "tests/test_auth_pipeline.py": 2.0,+ "tests/test_avault_agent.py": 3.0,+ "tests/test_backend_connection.py": 6.0,+ "tests/test_backend_failure.py": 2.0,+ "tests/test_backend_failure_retry.py": 14.0,+ "tests/test_backend_model_catalog.py": 3.0,+ "tests/test_backend_registration_contract.py": 8.0,+ "tests/test_backend_restart.py": 3.0,+ "tests/test_background_command_caller_context.py": 14.0,+ "tests/test_background_work_banner.py": 15.0,+ "tests/test_bind_code_api.py": 3.0,+ "tests/test_bind_security.py": 3.0,+ "tests/test_blocking.py": 2.0,+ "tests/test_caller_context.py": 3.0,+ "tests/test_chat_discovery.py": 16.0,+ "tests/test_ci_pipeline.py": 24.0,+ "tests/test_ci_test_fixtures.py": 5.0,+ "tests/test_ci_unit_test_shards.py": 4.0,+ "tests/test_citation_consumers.py": 6.0,+ "tests/test_citation_exits.py": 4.0,+ "tests/test_citations.py": 3.0,+ "tests/test_claude_agent_initiated_turn.py": 4.0,+ "tests/test_claude_agent_sessions.py": 3.0,+ "tests/test_claude_cli_path.py": 19.0,+ "tests/test_claude_container_sandbox.py": 3.0,+ "tests/test_claude_model_catalog.py": 3.0,+ "tests/test_claude_output_recovery_ledger.py": 6.0,+ "tests/test_claude_process_reaper.py": 5.0,+ "tests/test_claude_reasoning_options.py": 2.0,+ "tests/test_claude_receiver_result_settle.py": 3.0,+ "tests/test_claude_result_provenance.py": 3.0,+ "tests/test_claude_sdk_compat.py": 3.0,+ "tests/test_claude_session_recovery.py": 4.0,+ "tests/test_claude_subprocess_env.py": 2.0,+ "tests/test_claude_token_usage.py": 2.0,+ "tests/test_cli_agent_models.py": 2.0,+ "tests/test_cli_agent_run_schema.py": 13.0,+ "tests/test_cli_definition_read_projection.py": 10.0,+ "tests/test_cli_pagination.py": 13.0,+ "tests/test_cli_screenshot_command.py": 3.0,+ "tests/test_cli_setup_status.py": 3.0,+ "tests/test_cli_task_command.py": 29.0,+ "tests/test_cli_watch_command.py": 15.0,+ "tests/test_cloudflare_network.py": 2.0,+ "tests/test_cloudflared_runtime.py": 9.0,+ "tests/test_codex_agent.py": 6.0,+ "tests/test_codex_api_auth.py": 3.0,+ "tests/test_codex_catalog_retention.py": 5.0,+ "tests/test_codex_citations.py": 3.0,+ "tests/test_codex_config.py": 2.0,+ "tests/test_codex_event_handler.py": 2.0,+ "tests/test_codex_launch_failure.py": 4.0,+ "tests/test_codex_native_prompt_baseline.py": 2.0,+ "tests/test_codex_process_match.py": 3.0,+ "tests/test_codex_prompt_delivery_contract.py": 2.0,+ "tests/test_codex_request_provenance.py": 2.0,+ "tests/test_codex_request_routing.py": 2.0,+ "tests/test_codex_runtime_generations.py": 4.0,+ "tests/test_codex_session.py": 2.0,+ "tests/test_codex_token_usage.py": 3.0,+ "tests/test_codex_transport.py": 2.0,+ "tests/test_codex_turn_state.py": 2.0,+ "tests/test_command_handler_user_names.py": 3.0,+ "tests/test_command_runner.py": 6.0,+ "tests/test_computer_cli.py": 4.0,+ "tests/test_computer_server.py": 3.0,+ "tests/test_computer_use.py": 3.0,+ "tests/test_computer_use_backends.py": 2.0,+ "tests/test_config_write_transaction.py": 16.0,+ "tests/test_conftest_async_plugin_guard.py": 20.0,+ "tests/test_conftest_auth_home_isolation.py": 2.0,+ "tests/test_conftest_real_home_tripwire.py": 14.0,+ "tests/test_conftest_signal_guard.py": 7.0,+ "tests/test_control_ipc.py": 3.0,+ "tests/test_controller_ack.py": 3.0,+ "tests/test_controller_agent_status.py": 4.0,+ "tests/test_controller_config_reload.py": 2.0,+ "tests/test_controller_dispatch_loop.py": 3.0,+ "tests/test_controller_idle_cleanup.py": 3.0,+ "tests/test_controller_im_ready.py": 3.0,+ "tests/test_controller_model_hub_gate.py": 2.0,+ "tests/test_controller_platform_reconcile.py": 12.0,+ "tests/test_controller_trace_retention.py": 3.0,+ "tests/test_controller_vibe_agent_routing.py": 3.0,+ "tests/test_core_services_dispatch.py": 3.0,+ "tests/test_core_services_sessions.py": 8.0,+ "tests/test_core_services_settings.py": 4.0,+ "tests/test_cua_driver_packaging.py": 2.0,+ "tests/test_delete_channel_scope.py": 2.0,+ "tests/test_delivery_ack_reaction.py": 2.0,+ "tests/test_delivery_state_matrix.py": 3.0,+ "tests/test_dependency_inspection.py": 3.0,+ "tests/test_dependency_network.py": 2.0,+ "tests/test_desktop_backends.py": 43.0,+ "tests/test_desktop_computer_capabilities.py": 2.0,+ "tests/test_desktop_release.py": 10.0,+ "tests/test_desktop_runtime.py": 4.0,+ "tests/test_desktop_runtime_bundle_builder.py": 3.0,+ "tests/test_desktop_runtime_stop.py": 34.0,+ "tests/test_desktop_updater.py": 2.0,+ "tests/test_dev_state_migration_guard.py": 3.0,+ "tests/test_discord_api_retry.py": 2.0,+ "tests/test_discord_guild_settings.py": 9.0,+ "tests/test_discord_indicator_target.py": 3.0,+ "tests/test_discord_model_picker.py": 3.0,+ "tests/test_discord_reply_anchor.py": 3.0,+ "tests/test_discord_runtime.py": 3.0,+ "tests/test_discovered_chats.py": 2.0,+ "tests/test_dispatcher_stream_chunk.py": 3.0,+ "tests/test_distribution_artifacts.py": 3.0,+ "tests/test_dock_api.py": 6.0,+ "tests/test_docker_entrypoint_supervisor.py": 18.0,+ "tests/test_doctor_i18n.py": 5.0,+ "tests/test_event_loss_is_never_silent.py": 5.0,+ "tests/test_feedback_intake.py": 40.0,+ "tests/test_feedback_intake_artifacts.py": 13.0,+ "tests/test_feedback_intake_distribution.py": 2.0,+ "tests/test_feedback_intake_http.py": 3.0,+ "tests/test_feedback_intake_recovery.py": 55.0,+ "tests/test_feishu_event_dispatcher.py": 2.0,+ "tests/test_feishu_hot_stop.py": 14.0,+ "tests/test_feishu_post_messages.py": 3.0,+ "tests/test_feishu_reaction_emoji.py": 2.0,+ "tests/test_feishu_routing_card.py": 2.0,+ "tests/test_feishu_status_bubble_footer.py": 13.0,+ "tests/test_file_browser_backend.py": 6.0,+ "tests/test_file_search.py": 3.0,+ "tests/test_git_binary.py": 2.0,+ "tests/test_git_runtime.py": 2.0,+ "tests/test_git_runtime_release_guard.py": 2.0,+ "tests/test_github_release.py": 3.0,+ "tests/test_github_wait_common.py": 3.0,+ "tests/test_global_agents_md.py": 2.0,+ "tests/test_harness_definition_lifecycle.py": 6.0,+ "tests/test_harness_failure_retry.py": 10.0,+ "tests/test_harness_failure_visibility.py": 46.0,+ "tests/test_harness_health_projection.py": 7.0,+ "tests/test_harness_live_status.py": 7.0,+ "tests/test_harness_payload_enrichment.py": 3.0,+ "tests/test_harness_run_projection.py": 5.0,+ "tests/test_harness_skill_guidance.py": 3.0,+ "tests/test_host_header_boundary.py": 3.0,+ "tests/test_i18n_backend_keys.py": 2.0,+ "tests/test_i18n_key_parity.py": 2.0,+ "tests/test_im_backend_registration.py": 3.0,+ "tests/test_im_base_auth.py": 3.0,+ "tests/test_im_citation_delivery.py": 2.0,+ "tests/test_im_post_send_bookkeeping.py": 16.0,+ "tests/test_im_proxy_unification.py": 3.0,+ "tests/test_inbound_attachments.py": 2.0,+ "tests/test_inbox_bridge.py": 2.0,+ "tests/test_inbox_events.py": 23.0,+ "tests/test_incus_regression.py": 11.0,+ "tests/test_incus_regression_supervisor.py": 2.0,+ "tests/test_incus_tenant_scaffold.py": 3.0,+ "tests/test_install_generation_retirement.py": 8.0,+ "tests/test_install_integrity.py": 11.0,+ "tests/test_install_script.py": 32.0,+ "tests/test_installer_uninstall.py": 48.0,+ "tests/test_instance_authorization.py": 13.0,+ "tests/test_internal_client.py": 3.0,+ "tests/test_internal_client_timeouts.py": 2.0,+ "tests/test_internal_server.py": 24.0,+ "tests/test_latest_version_cache.py": 3.0,+ "tests/test_link_unit_delivery.py": 4.0,+ "tests/test_local_deps.py": 15.0,+ "tests/test_loop_watchdog.py": 5.0,+ "tests/test_macos_session_diagnostics.py": 2.0,+ "tests/test_managed_runtime.py": 5.0,+ "tests/test_managed_runtime_composite_artifacts.py": 3.0,+ "tests/test_managed_skills.py": 3.0,+ "tests/test_markdown_escape_delivery.py": 3.0,+ "tests/test_media_types.py": 3.0,+ "tests/test_member_management_parity.py": 19.0,+ "tests/test_memory_removal.py": 3.0,+ "tests/test_message_context_helpers.py": 2.0,+ "tests/test_message_delivery_authority.py": 20.0,+ "tests/test_message_dispatcher_file_uploads.py": 3.0,+ "tests/test_message_dispatcher_interim.py": 3.0,+ "tests/test_message_dispatcher_platform_limits.py": 2.0,+ "tests/test_message_dispatcher_result_fallback.py": 2.0,+ "tests/test_message_dispatcher_scheduled.py": 10.0,+ "tests/test_message_dispatcher_status_bubble.py": 3.0,+ "tests/test_message_facts_generic.py": 2.0,+ "tests/test_message_handler_attachments.py": 3.0,+ "tests/test_message_handler_auth_setup.py": 2.0,+ "tests/test_message_handler_harness_echo.py": 2.0,+ "tests/test_message_handler_missing_agent.py": 3.0,+ "tests/test_message_handler_typing.py": 3.0,+ "tests/test_message_handler_user_info.py": 3.0,+ "tests/test_message_mirror.py": 9.0,+ "tests/test_message_priority_cutover.py": 2.0,+ "tests/test_message_search.py": 5.0,+ "tests/test_message_type_catalog.py": 2.0,+ "tests/test_message_type_python_consumers.py": 2.0,+ "tests/test_messages_service.py": 9.0,+ "tests/test_migration_lock.py": 5.0,+ "tests/test_migration_release_guard.py": 13.0,+ "tests/test_model_hub_admission.py": 3.0,+ "tests/test_model_hub_api.py": 80.0,+ "tests/test_model_hub_authorities.py": 2.0,+ "tests/test_model_hub_background_discovery.py": 4.0,+ "tests/test_model_hub_claude_login_migration.py": 2.0,+ "tests/test_model_hub_config.py": 34.0,+ "tests/test_model_hub_config_read_compatibility.py": 8.0,+ "tests/test_model_hub_connection_credentials.py": 2.0,+ "tests/test_model_hub_credential_address.py": 4.0,+ "tests/test_model_hub_credential_replacement.py": 8.0,+ "tests/test_model_hub_engine_build.py": 3.0,+ "tests/test_model_hub_engine_release_guard.py": 2.0,+ "tests/test_model_hub_failure_presentation.py": 3.0,+ "tests/test_model_hub_google.py": 7.0,+ "tests/test_model_hub_inference_wait.py": 10.0,+ "tests/test_model_hub_injection.py": 3.0,+ "tests/test_model_hub_json_wire.py": 3.0,+ "tests/test_model_hub_l3.py": 12.0,+ "tests/test_model_hub_legacy_opencode_migration.py": 2.0,+ "tests/test_model_hub_local_error_details.py": 11.0,+ "tests/test_model_hub_migration_auth_mirror.py": 4.0,+ "tests/test_model_hub_migration_auth_recovery.py": 8.0,+ "tests/test_model_hub_migration_bearer.py": 4.0,+ "tests/test_model_hub_migration_custody_history.py": 63.0,+ "tests/test_model_hub_migration_review_boundaries.py": 20.0,+ "tests/test_model_hub_migration_shell.py": 2.0,+ "tests/test_model_hub_migration_source_identity.py": 19.0,+ "tests/test_model_hub_migration_static_cleanup.py": 51.0,+ "tests/test_model_hub_migration_transport.py": 17.0,+ "tests/test_model_hub_native_takeover.py": 23.0,+ "tests/test_model_hub_oauth.py": 2.0,+ "tests/test_model_hub_oauth_takeover.py": 2.0,+ "tests/test_model_hub_persisted_inventory.py": 9.0,+ "tests/test_model_hub_persisted_migration.py": 11.0,+ "tests/test_model_hub_pricing.py": 2.0,+ "tests/test_model_hub_progress.py": 3.0,+ "tests/test_model_hub_provenance.py": 4.0,+ "tests/test_model_hub_provisional_ownership.py": 7.0,+ "tests/test_model_hub_provisional_ownership_engine.py": 3.0,+ "tests/test_model_hub_quota.py": 2.0,+ "tests/test_model_hub_reasoning_tiers.py": 3.0,+ "tests/test_model_hub_recovery_evidence.py": 4.0,+ "tests/test_model_hub_replacement_transport.py": 4.0,+ "tests/test_model_hub_request_body_budget.py": 6.0,+ "tests/test_model_hub_resolution.py": 7.0,+ "tests/test_model_hub_retention.py": 3.0,+ "tests/test_model_hub_retry_advice.py": 5.0,+ "tests/test_model_hub_retry_lifecycle.py": 11.0,+ "tests/test_model_hub_retry_policy.py": 5.0,+ "tests/test_model_hub_routing_modes.py": 6.0,+ "tests/test_model_hub_runtime.py": 36.0,+ "tests/test_model_hub_runtime_default_upgrade.py": 3.0,+ "tests/test_model_hub_scenario_adapter.py": 3.0,+ "tests/test_model_hub_shell_core_inventory.py": 41.0,+ "tests/test_model_hub_shell_writer_roles.py": 88.0,+ "tests/test_model_hub_source_identity.py": 5.0,+ "tests/test_model_hub_source_probe.py": 50.0,+ "tests/test_model_hub_state_private.py": 2.0,+ "tests/test_model_hub_structure_guards.py": 8.0,+ "tests/test_model_hub_takeover_integration.py": 5.0,+ "tests/test_model_hub_takeover_inventory.py": 26.0,+ "tests/test_model_hub_tool_names.py": 4.0,+ "tests/test_model_hub_transport_leases.py": 2.0,+ "tests/test_model_hub_turn_mode_stamp.py": 8.0,+ "tests/test_model_hub_unverified.py": 37.0,+ "tests/test_model_hub_usage.py": 6.0,+ "tests/test_model_hub_vibey_consumer.py": 7.0,+ "tests/test_model_hub_vibey_contract_matrix.py": 4.0,+ "tests/test_model_selection_addresses.py": 4.0,+ "tests/test_models_dev_catalog.py": 2.0,+ "tests/test_multi_platform_runtime.py": 15.0,+ "tests/test_native_login_single_flight.py": 2.0,+ "tests/test_native_login_structure_guards.py": 6.0,+ "tests/test_native_oauth_store.py": 8.0,+ "tests/test_native_process_inventory.py": 38.0,+ "tests/test_native_session_providers.py": 4.0,+ "tests/test_native_takeover_lifecycle.py": 4.0,+ "tests/test_native_writer_custody.py": 3.0,+ "tests/test_oauth_callback_diagnostics.py": 3.0,+ "tests/test_opencode_caller_context.py": 5.0,+ "tests/test_opencode_default_provider_routing.py": 2.0,+ "tests/test_opencode_directory_bootstrap.py": 8.0,+ "tests/test_opencode_generations.py": 8.0,+ "tests/test_opencode_model_hub_retry.py": 2.0,+ "tests/test_opencode_provider_base_url.py": 3.0,+ "tests/test_opencode_provider_catalog_coercion.py": 2.0,+ "tests/test_opencode_provider_keys_reader.py": 2.0,+ "tests/test_opencode_reasoning_variants.py": 2.0,+ "tests/test_opencode_restore_polls.py": 7.0,+ "tests/test_opencode_server.py": 6.0,+ "tests/test_opencode_session_manager.py": 2.0,+ "tests/test_opencode_steer_superseded_reply.py": 2.0,+ "tests/test_opencode_stop_receipt.py": 3.0,+ "tests/test_org_sender_identity.py": 4.0,+ "tests/test_origin_links.py": 2.0,+ "tests/test_pagination.py": 2.0,+ "tests/test_pairing_recovery.py": 65.0,+ "tests/test_permissions.py": 14.0,+ "tests/test_platform_registry.py": 3.0,+ "tests/test_prepare_regression.py": 2.0,+ "tests/test_private_fs.py": 2.0,+ "tests/test_process_diagnostics.py": 2.0,+ "tests/test_process_isolation.py": 3.0,+ "tests/test_process_reaper.py": 41.0,+ "tests/test_process_start_token.py": 3.0,+ "tests/test_processing_indicator_reaction.py": 2.0,+ "tests/test_project_access_service.py": 4.0,+ "tests/test_project_access_sync.py": 3.0,+ "tests/test_project_agents_md.py": 2.0,+ "tests/test_projects_service.py": 10.0,+ "tests/test_prompt_render_export.py": 15.0,+ "tests/test_prompt_studio_catalog.py": 3.0,+ "tests/test_pypi_shim.py": 2.0,+ "tests/test_queued_image_delivery.py": 8.0,+ "tests/test_queued_message_writer_policy.py": 6.0,+ "tests/test_read_only_query.py": 3.0,+ "tests/test_read_only_query_vault_denylist.py": 3.0,+ "tests/test_regression_script.py": 3.0,+ "tests/test_release_checkout_pinning.py": 2.0,+ "tests/test_release_mirror.py": 3.0,+ "tests/test_release_package_version.py": 3.0,+ "tests/test_release_show_runtime.py": 3.0,+ "tests/test_release_verification.py": 64.0,+ "tests/test_remote_access_vibe_cloud.py": 51.0,+ "tests/test_remote_authorization_revision.py": 37.0,+ "tests/test_remote_resource_acl_sync.py": 8.0,+ "tests/test_removed_feature_contract.py": 11.0,+ "tests/test_reply_enhancer_platform.py": 9.0,+ "tests/test_reply_enhancer_secret_requests.py": 3.0,+ "tests/test_reserved_native_session_id.py": 2.0,+ "tests/test_resource_access_service.py": 10.0,+ "tests/test_resource_acl_agents.py": 7.0,+ "tests/test_resource_acl_show_pages.py": 7.0,+ "tests/test_resource_acl_vaults.py": 7.0,+ "tests/test_resource_governance.py": 2.0,+ "tests/test_restart_supervisor.py": 4.0,+ "tests/test_result_message_token_field.py": 2.0,+ "tests/test_resume_session.py": 3.0,+ "tests/test_retired_companion.py": 3.0,+ "tests/test_ripgrep_runtime.py": 3.0,+ "tests/test_routing_modal_selection.py": 2.0,+ "tests/test_running_agents_service.py": 3.0,+ "tests/test_runtime_activation.py": 2.0,+ "tests/test_runtime_commands.py": 2.0,+ "tests/test_runtime_generations.py": 2.0,+ "tests/test_runtime_log_sink.py": 3.0,+ "tests/test_runtime_ownership.py": 7.0,+ "tests/test_runtime_process_scan.py": 2.0,+ "tests/test_runtime_recovery.py": 6.0,+ "tests/test_runtime_scope_bootstrap.py": 3.0,+ "tests/test_runtime_service_lock.py": 7.0,+ "tests/test_runtime_spawn_ownership.py": 6.0,+ "tests/test_runtime_work_supervisor.py": 2.0,+ "tests/test_save_opencode_provider_auth.py": 10.0,+ "tests/test_scheduled_command_task_integration.py": 10.0,+ "tests/test_scheduled_tasks.py": 94.0,+ "tests/test_sentry_integration.py": 6.0,+ "tests/test_service_lock_record.py": 11.0,+ "tests/test_service_logging_handlers.py": 3.0,+ "tests/test_service_readiness.py": 7.0,+ "tests/test_session_activities.py": 8.0,+ "tests/test_session_archive.py": 6.0,+ "tests/test_session_cli.py": 9.0,+ "tests/test_session_delivery_fsm.py": 23.0,+ "tests/test_session_fork.py": 28.0,+ "tests/test_session_handler_base_id.py": 2.0,+ "tests/test_session_route_writer_policy.py": 2.0,+ "tests/test_session_titles.py": 4.0,+ "tests/test_settings_disk_fallback.py": 4.0,+ "tests/test_settings_handler.py": 2.0,+ "tests/test_show_api.py": 14.0,+ "tests/test_show_api_integration.py": 3.0,+ "tests/test_show_git.py": 6.0,+ "tests/test_show_git_turn_entrypoints.py": 4.0,+ "tests/test_show_identity.py": 3.0,+ "tests/test_show_page_legacy_ui_removed.py": 2.0,+ "tests/test_show_pages.py": 75.0,+ "tests/test_show_pages_admin_api.py": 4.0,+ "tests/test_show_router.py": 2.0,+ "tests/test_show_runtime_archive_cleanup.py": 5.0,+ "tests/test_show_runtime_manifest.py": 2.0,+ "tests/test_show_runtime_manifest_packaging.py": 2.0,+ "tests/test_show_runtime_orphan_sweep.py": 3.0,+ "tests/test_show_runtime_protocol.py": 3.0,+ "tests/test_show_session_events.py": 8.0,+ "tests/test_skill_cli.py": 2.0,+ "tests/test_skill_observability.py": 6.0,+ "tests/test_skill_observability_backends.py": 2.0,+ "tests/test_skill_observability_migration.py": 3.0,+ "tests/test_skills_service.py": 7.0,+ "tests/test_slack_app_mention_empty.py": 2.0,+ "tests/test_slack_dm_mentions.py": 2.0,+ "tests/test_slack_markdown_footer.py": 2.0,+ "tests/test_sqlite_backup_expiry.py": 13.0,+ "tests/test_sqlite_sessions_store.py": 35.0,+ "tests/test_sqlite_settings_store.py": 28.0,+ "tests/test_sqlite_state_migration.py": 73.0,+ "tests/test_sqlite_state_startup.py": 3.0,+ "tests/test_sse_broker.py": 2.0,+ "tests/test_state_backups.py": 8.0,+ "tests/test_status_bubble_footer_render.py": 3.0,+ "tests/test_status_bubble_indicator.py": 3.0,+ "tests/test_status_bubble_settings.py": 2.0,+ "tests/test_subagent_router.py": 3.0,+ "tests/test_telegram_attachment_download.py": 2.0,+ "tests/test_telegram_bot.py": 15.0,+ "tests/test_telegram_formatter.py": 2.0,+ "tests/test_telegram_proxy.py": 3.0,+ "tests/test_terminal_backend.py": 4.0,+ "tests/test_test_failure_classifier.py": 2.0,+ "tests/test_tmux_runtime.py": 3.0,+ "tests/test_transcript_store_contract.py": 6.0,+ "tests/test_tunnel_quality.py": 2.0,+ "tests/test_tunnel_recovery.py": 29.0,+ "tests/test_turn_terminal_reaction.py": 2.0,+ "tests/test_typing_keepalive.py": 3.0,+ "tests/test_ui_api.py": 98.0,+ "tests/test_ui_project_access.py": 8.0,+ "tests/test_ui_server_fastapi.py": 28.0,+ "tests/test_ui_server_install.py": 5.0,+ "tests/test_ui_server_logs.py": 3.0,+ "tests/test_ui_server_mutation_protection.py": 7.0,+ "tests/test_ui_server_reload.py": 4.0,+ "tests/test_ui_server_skills_routes.py": 3.0,+ "tests/test_ui_server_voice_telemetry.py": 4.0,+ "tests/test_ui_server_voice_transcription.py": 3.0,+ "tests/test_ui_session_stream.py": 10.0,+ "tests/test_ui_show_pages.py": 50.0,+ "tests/test_update_checker_platforms.py": 21.0,+ "tests/test_upgrade_flow.py": 3.0,+ "tests/test_upgrade_provider_metadata.py": 2.0,+ "tests/test_user_platform_scope.py": 6.0,+ "tests/test_v2_compat_platforms.py": 2.0,+ "tests/test_v2_config_platform_registry.py": 3.0,+ "tests/test_v2_paths.py": 2.0,+ "tests/test_v2_sessions.py": 12.0,+ "tests/test_vault_addresses.py": 2.0,+ "tests/test_vault_api.py": 20.0,+ "tests/test_vault_cli.py": 15.0,+ "tests/test_vault_crypto.py": 2.0,+ "tests/test_vault_export_inject.py": 5.0,+ "tests/test_vault_fetch.py": 8.0,+ "tests/test_vault_protected_format.py": 2.0,+ "tests/test_vault_request_callbacks.py": 7.0,+ "tests/test_vault_request_im_notifications.py": 3.0,+ "tests/test_vault_rest.py": 5.0,+ "tests/test_vault_schema.py": 2.0,+ "tests/test_vault_service.py": 7.0,+ "tests/test_version_identity.py": 2.0,+ "tests/test_vibe_agent_archive.py": 8.0,+ "tests/test_vibe_agent_model_prefill.py": 9.0,+ "tests/test_vibe_cli.py": 9.0,+ "tests/test_vibey_agent.py": 24.0,+ "tests/test_vibey_agent_context.py": 9.0,+ "tests/test_vibey_backend_registration.py": 10.0,+ "tests/test_vibey_project_instructions.py": 3.0,+ "tests/test_wait_for_github_action_runs.py": 2.0,+ "tests/test_wait_for_github_issue_activity.py": 2.0,+ "tests/test_wait_for_github_pr_activity.py": 20.0,+ "tests/test_watch_job_target.py": 21.0,+ "tests/test_watch_worker.py": 3.0,+ "tests/test_watches.py": 16.0,+ "tests/test_web_oauth_flow.py": 4.0,+ "tests/test_web_push_notifications.py": 10.0,+ "tests/test_web_push_provider_invalidation_migration.py": 3.0,+ "tests/test_web_push_service.py": 15.0,+ "tests/test_web_ui_watchdog.py": 3.0,+ "tests/test_wechat_attachment_download.py": 2.0,+ "tests/test_wechat_auth.py": 4.0,+ "tests/test_wechat_bot.py": 4.0,+ "tests/test_wechat_cdn.py": 2.0,+ "tests/test_workbench_media.py": 5.0,+ "tests/test_workbench_only_runtime.py": 6.0,+ "tests/test_workbench_prefs_api.py": 4.0,+ "tests/test_workbench_session_defaults.py": 4.0,+ "tests/test_workspace_system_session.py": 5.0}}diff --git a/tests/test_ci_pipeline.py b/tests/test_ci_pipeline.pyindex d3ec140f1..98d40f99c 100644--- a/tests/test_ci_pipeline.py+++ b/tests/test_ci_pipeline.py@@ -1,11 +1,9 @@from __future__ import annotations-import itertoolsimport ioimport jsonimport osfrom pathlib import Path-import shleximport shutilimport subprocessimport sys@@ -21,113 +19,6 @@ def _jobs() -> dict:return yaml.safe_load((ROOT / ".github/workflows/lint.yml").read_text())["jobs"]-def _artifact_build_commands() -> list[list[str]]:- step, = [step for step in _jobs()["build-linux-artifacts"]["steps"]- if step.get("name") == "Build package artifact"]- assert not step.get("if") and not step.get("continue-on-error")- return [shlex.split(line, comments=True) for line in step["run"].splitlines()- if line.strip() and not line.lstrip().startswith("#")]---def test_artifact_producer_only_installs_the_frontend_and_builds_the_core_distribution():- assert _artifact_build_commands() == [- ["python", "-m", "pip", "install", "--disable-pip-version-check", "build"],- ["python", "scripts/prepare_local_show_runtime_manifest.py"],- ["python", "-m", "build"],- ]--[email protected]("failed_stage", [None, 0, 1, 2])-def test_artifact_build_stops_at_each_failed_boundary(tmp_path, failed_stage):- binary = tmp_path / "bin"- binary.mkdir()- python = binary / "python"- python.write_text(- f"#!{sys.executable}\n"- "import json, os, pathlib, sys\n"- "path = pathlib.Path('commands.json')\n"- "commands = json.loads(path.read_text()) if path.exists() else []\n"- "commands.append(sys.argv)\n"- "path.write_text(json.dumps(commands))\n"- "sys.exit(7 if str(len(commands) - 1) == os.environ['FAIL_STAGE'] else 0)\n"- )- python.chmod(0o755)- step, = [step for step in _jobs()["build-linux-artifacts"]["steps"]- if step.get("name") == "Build package artifact"]- result = subprocess.run(- [shutil.which("bash"), "-e", "-c", step["run"]], cwd=tmp_path,- env={**os.environ, "PATH": str(binary), "FAIL_STAGE": str(failed_stage)},- capture_output=True, text=True, timeout=10,- )- assert result.returncode == (0 if failed_stage is None else 7), result.stderr- commands = json.loads((tmp_path / "commands.json").read_text())- expected = _artifact_build_commands()- assert [["python", *command[1:]] for command in commands] == expected[:- len(expected) if failed_stage is None else failed_stage + 1- ]---def test_ci_uv_installation_is_exact_and_cache_ownership_is_preserved():- owners = {- name: job for name, job in _jobs().items()- if any(step.get("run", "").startswith("uv ") for step in job["steps"])- }- assert set(owners) == {- "unit-test-shards", "migration-release-guard", "install-upgrade-shards",- "show-router-integration", "memory-insight-contract", "windows-agent",- }- cache_keys = {}- for name, job in owners.items():- steps = job["steps"]- install, = [step for step in steps if step.get("name") == "Install pinned uv"]- version = "0.12.10"- assert shlex.split(install["run"]) == [- "python", "-m", "pip", "install", "--disable-pip-version-check",- "--only-binary=:all:", "--no-deps", f"uv=={version}",- ]- assert not install.get("if") and not install.get("continue-on-error")- assert any(step.get("uses", "").startswith("actions/setup-python@") for step in steps[:steps.index(install)])- assert not any(step.get("uses", "").startswith("astral-sh/setup-uv@") for step in steps)- cache, = [step for step in steps if step.get("uses", "").startswith("actions/cache")]- action = "actions/cache/restore" if name in {- "unit-test-shards", "migration-release-guard", "show-router-integration",- "memory-insight-contract",- } else "actions/cache"- assert cache["uses"] == f"{action}@caa296126883cff596d87d8935842f9db880ef25"- assert cache["with"]["path"] == "~/.cache/uv"- key = cache["with"]["key"]- assert "${{ runner.os }}-${{ runner.arch }}" in key and f"uv-{version}-py3.12" in key- dependencies = "'pyproject.toml', 'uv.lock'"- assert f"hashFiles({dependencies})" in key- cache_keys[name] = key- first_consumer = next(step for step in steps if step.get("run", "").startswith("uv "))- assert steps.index(install) < steps.index(cache) < steps.index(first_consumer)- if "windows" in f"{job['runs-on']} {job.get('strategy', {})}":- # uv's Windows default is %LOCALAPPDATA%\uv\cache, not the path the cache step keeps.- redirect, = [step for step in steps if "UV_CACHE_DIR" in step.get("run", "")]- assert "UV_CACHE_DIR=$HOME\\.cache\\uv" in redirect["run"]- assert steps.index(redirect) < steps.index(first_consumer)- assert len({cache_keys[name] for name in owners}) == 1--[email protected]("exit_code", [0, 1, 7])-def test_ci_tool_install_command_propagates_failure(tmp_path, exit_code):- binary = tmp_path / "bin"- binary.mkdir()- python = binary / "python"- python.write_text(f"#!/bin/sh\nprintf '%s\\n' \"$@\"\nexit {exit_code}\n")- python.chmod(0o755)- for job in _jobs().values():- for step in job["steps"]:- if step.get("name") == "Install pinned uv":- result = subprocess.run(- [shutil.which("bash"), "-e", "-c", step["run"]], cwd=tmp_path,- env={**os.environ, "PATH": str(binary)}, capture_output=True, text=True,- )- assert result.returncode == exit_code- assert "--only-binary=:all:" in result.stdout--def _run_isolated_unit_files(tmp_path: Path,sources: dict[str, str],@@ -461,7 +352,10 @@ def test_ui_checks_run_once_without_fencing_artifact_consumers() -> None:assert not checks.get("needs")assert not build.get("needs")assert "ui-checks" in jobs["unit-tests"]["needs"]+ assert "ui-browser-checks" in jobs["unit-tests"]["needs"]assert "unit-test-shards" in jobs["unit-tests"]["needs"]+ browsers = jobs["ui-browser-checks"]+ assert not browsers.get("needs")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"]@@ -474,7 +368,7 @@ def test_ui_checks_run_once_without_fencing_artifact_consumers() -> None:assert build_commands.count("npm run build") == 1assert "npm ci" in check_commandsassert "npm ci" in build_commands- for job in (checks, build):+ for job in (checks, browsers, build):assert not job.get("if")assert not job.get("continue-on-error")assert all(not step.get("if") and not step.get("continue-on-error") for step in job["steps"])@@ -613,14 +507,21 @@ def test_existing_required_gate_fails_unless_every_dependency_succeeded(tmp_pathassert step["env"] == {"UNIT_RESULT": "${{ needs['unit-test-shards'].result }}","UI_RESULT": "${{ needs['ui-checks'].result }}",+ "BROWSER_RESULT": "${{ needs['ui-browser-checks'].result }}",}- for results in itertools.product(("success", "failure", "cancelled", "skipped", ""), repeat=2):+ # The gate checks each dependency independently; a Cartesian product adds+ # no failure class. Prove all-success and each dependency failing in turn.+ cases = [dict.fromkeys(step["env"], "success")]+ for name in step["env"]:+ for outcome in ("failure", "cancelled", "skipped", ""):+ cases.append({**cases[0], name: outcome})+ for results in cases:result = subprocess.run(["bash", "-e", "-c", step["run"]],cwd=tmp_path,- env={**os.environ, **dict(zip(step["env"], results))},+ env={**os.environ, **results},capture_output=True,text=True,check=False,)- assert (result.returncode == 0) == all(value == "success" for value in results), result.stdout+ assert (result.returncode == 0) == all(value == "success" for value in results.values()), result.stdoutdiff --git a/tests/test_ci_unit_test_shards.py b/tests/test_ci_unit_test_shards.pyindex 4aaa9f9d8..0622ea290 100644--- a/tests/test_ci_unit_test_shards.py+++ b/tests/test_ci_unit_test_shards.py@@ -65,9 +65,10 @@ def test_plan_shards_rejects_invalid_shard_total(tmp_path: Path, shard_total: inplan_shards([_test_file(tmp_path, "test_one.py")], shard_total)-def test_measured_plan_runs_every_discovered_file_exactly_once() -> None:[email protected]("shard_total", [1, 9])+def test_measured_plan_runs_every_discovered_file_exactly_once(shard_total: int) -> None:files = discover_unit_test_files()- shards = plan_shards(files, 6, load_timings())+ shards = plan_shards(files, shard_total, load_timings())assert sorted(path for _, selected in shards for path in selected) == filesdiff --git a/tests/test_claude_output_recovery_ledger.py b/tests/test_claude_output_recovery_ledger.pyindex 725c6a50d..ce5a6819e 100644--- a/tests/test_claude_output_recovery_ledger.py+++ b/tests/test_claude_output_recovery_ledger.py@@ -14,7 +14,6 @@ from modules.agents.service import AgentServicefrom modules.claude_sdk_compat import TextBlockfrom modules.im import MessageContextfrom storage.db import create_sqlite_engine-from storage.importer import ensure_sqlite_statefrom storage.session_activities import SQLiteSessionActivityStorefrom tests.test_claude_agent_initiated_turn import (AssistantMessage,@@ -234,9 +233,9 @@ async def test_human_phase_and_successor_cannot_overwrite_or_be_released_by_old_@pytest.fixture-def activity_store(tmp_path):+def activity_store(tmp_path, sqlite_db_factory):db_path = tmp_path / "state" / "vibe.sqlite"- ensure_sqlite_state(db_path=db_path, primary_platform="avibe")+ sqlite_db_factory(db_path)engine = create_sqlite_engine(db_path)yield SQLiteSessionActivityStore(engine)engine.dispose()diff --git a/tests/test_feedback_intake.py b/tests/test_feedback_intake.pyindex f1133bdd3..06df833ff 100644--- a/tests/test_feedback_intake.py+++ b/tests/test_feedback_intake.py@@ -115,7 +115,10 @@ def github(tmp_path, monkeypatch):server.lock = threading.Lock()server.written, server.release = threading.Event(), threading.Event()server.mode = "normal"- thread = threading.Thread(target=server.serve_forever, daemon=True)+ thread = threading.Thread(+ target=lambda: server.serve_forever(poll_interval=0.01),+ daemon=True,+ )thread.start()private = tmp_path.resolve() / "private"private.mkdir(mode=0o700)diff --git a/tests/test_feedback_intake_recovery.py b/tests/test_feedback_intake_recovery.pyindex f67b7568c..665cba752 100644--- a/tests/test_feedback_intake_recovery.py+++ b/tests/test_feedback_intake_recovery.py@@ -165,7 +165,10 @@ def intake(github, monkeypatch):server.disconnect = Falseserver.arrived, server.release = threading.Event(), threading.Event()server.recovery_arrived = threading.Event()- thread = threading.Thread(target=server.serve_forever,daemon=True)+ thread = threading.Thread(+ target=lambda: server.serve_forever(poll_interval=0.01),+ daemon=True,+ )thread.start()monkeypatch.setenv("AVIBE_FEEDBACK_TEST_SHARE_BASE_URL",f"http://127.0.0.1:{server.server_port}")upstream_get = github.RequestHandlerClass.do_GETdiff --git a/tests/test_memory_removal.py b/tests/test_memory_removal.pyindex c7a75fd4e..1ae47436a 100644--- a/tests/test_memory_removal.py+++ b/tests/test_memory_removal.py@@ -6,7 +6,7 @@ from pathlib import Pathimport pytestimport config.v2_config as v2_config-from config.v2_config import V2Config, config_write_transaction+from config.v2_config import V2Configdef test_obsolete_memory_config_is_ignored_on_round_trip(tmp_path: Path, monkeypatch):@@ -27,14 +27,6 @@ def test_obsolete_memory_config_is_ignored_on_round_trip(tmp_path: Path, monkeypassert saved["runtime"]["default_cwd"] == str(tmp_path / "work")-def test_config_write_transaction_loads_test_owned_snapshot(tmp_path: Path, monkeypatch):- monkeypatch.setenv("AVIBE_HOME", str(tmp_path / "home"))- path = tmp_path / "config.json"- config = V2Config.default()- config.save(path)- with config_write_transaction(path) as snapshot:- assert snapshot.runtime.default_cwd == config.runtime.default_cwd-@pytest.mark.parametrize("obsolete", [True, None, "legacy", [], {"enabled": True}])def test_json_obsolete_memory_shapes_are_ignored(obsolete, tmp_path):payload = {diff --git a/tests/test_removed_feature_contract.py b/tests/test_removed_feature_contract.pyindex 895dc853f..796b1ee1c 100644--- a/tests/test_removed_feature_contract.py+++ b/tests/test_removed_feature_contract.py@@ -60,13 +60,6 @@ def test_legacy_data_identity_survives_config_and_service_probes(tmp_path, monkeassert snapshot() == before-def test_removed_cli_command_is_unknown():- result = subprocess.run([sys.executable, "-m", "vibe", "memory", "status"],- capture_output=True, text=True, timeout=30)- assert result.returncode == 2- assert "invalid choice: 'memory'" in result.stderr--@pytest.mark.parametrize(("method", "path"), [("GET", "status"), ("GET", "settings"), ("PATCH", "settings"),("GET", "profile"), ("GET", "processing-record"), ("GET", "failures"),diff --git a/tests/test_vibey_agent.py b/tests/test_vibey_agent.pyindex 6eb49aaa7..2d64b7127 100644--- a/tests/test_vibey_agent.py+++ b/tests/test_vibey_agent.py@@ -59,7 +59,6 @@ from modules.im import MessageContextfrom storage import message_deliveriesfrom storage.agent_transcript import resolve_fork_pointfrom storage.db import create_sqlite_engine-from storage.importer import ensure_sqlite_statefrom storage.models import agent_events, agent_sessions, messages, session_turnsfrom storage.settings_service import upsert_scopefrom tests.agent_core.fakes import ORIGIN, FakeJobHost, FakeTool, ScriptedProvider, assistant@@ -70,9 +69,13 @@ SESSION = "ses_vibey"@pytest.fixture()-def engine():- ensure_sqlite_state()- engine = create_sqlite_engine()+def engine(tmp_path, sqlite_db_factory):+ from config import paths++ db_path = paths.get_sqlite_state_path()+ if not db_path.exists():+ db_path = sqlite_db_factory(db_path)+ engine = create_sqlite_engine(db_path)yield engineengine.dispose()diff --git a/ui/e2e/model-catalog/README.md b/ui/e2e/model-catalog/README.mdindex a14cce292..423f48c11 100644--- a/ui/e2e/model-catalog/README.md+++ b/ui/e2e/model-catalog/README.md@@ -28,8 +28,8 @@ contracts remain covered by their existing tests; this is not live acceptance.The live `playwright.config.ts` excludes this fixture directory. The consuming`scripts/modelCatalogDiscovery.test.mjs` checks both real configs with `--list`:-live discovery excludes the fixture, while isolated discovery retains the original-36 catalog scenarios and discovers every fixture spec on desktop and mobile.+live discovery excludes the fixture, while isolated discovery finds every fixture+spec on desktop and mobile.Collection starts no browser, web server or fixture.`gateway-status.spec.ts` consumes `MH-GATEWAY-STATUS-001`. It renders the realdiff --git a/ui/package.json b/ui/package.jsonindex c0248acb9..92735b4bf 100644--- a/ui/package.json+++ b/ui/package.json@@ -15,7 +15,7 @@"lint:baseline": "node scripts/lint-baseline.mjs --update","preview": "vite preview","test": "vitest run",- "typecheck:tests": "tsc -p src/components/settings/models/tsconfig.tests.json --noEmit && tsc -p tsconfig.i18n-tests.json --noEmit && tsc -p src/i18n/tsconfig.guard.json --noEmit && tsc -p src/components/onboarding/providers/tsconfig.tests.json --noEmit",+ "typecheck:tests": "tsc -p tsconfig.tests.json --noEmit && tsc -p src/i18n/tsconfig.guard.json --noEmit","test:crypto": "vitest run src/lib/vaultCrypto.test.ts","e2e": "playwright test","e2e:headed": "playwright test --headed",diff --git a/ui/scripts/glowScale.test.mjs b/ui/scripts/glowScale.test.mjsindex 3336d2e4c..df1ae5936 100644--- a/ui/scripts/glowScale.test.mjs+++ b/ui/scripts/glowScale.test.mjs@@ -6,11 +6,8 @@ import { describe, expect, it } from 'vitest';import postcss from 'postcss';import { customPropertiesIn } from './customProperties.mjs';-import { intendedFiles } from './lintPolicy.mjs';-import { typeScriptComments } from './nonRenderingText.mjs';import { GLOW_TOKEN } from './shadowLayer.mjs';import { eachStylesheet } from './stylesheets.mjs';-import { WHOLE_TREE_SCAN } from './wholeTreeScan.mjs';// `validate:theme` already forces every glow in the tree to be a// `--shadow-glow-*` token. That check is about spelling: it says a call site@@ -34,7 +31,6 @@ import { WHOLE_TREE_SCAN } from './wholeTreeScan.mjs';// covered without editing the test, and a rung nudged off the rule fails here// instead of shipping.-const UI_ROOT = fileURLToPath(new URL('../', import.meta.url));const SRC_ROOT = fileURLToPath(new URL('../src/', import.meta.url));const CSS = fs.readFileSync(new URL('../src/index.css', import.meta.url), 'utf8');@@ -361,74 +357,4 @@ describe('the accent glow scale', () => {expect(pattern, `${role} states no exception for the ${theme} theme it is declared in`).toBeDefined();expect(value.trim(), why).toMatch(pattern);});-- // Which comments count as design glow annotations, and what each one measures.- //- // A wash is `0 y<n>px`, and the card scale owns those; this scale is only ever- // centred, so an annotation naming a y-offset is not its. The offset can be- // written before or after the blur -- welCard puts it after -- so the whole- // comment is the unit, not a window around the word, which is why these are- // parsed rather than grepped.- //- // `blur` also names things that are not shadows -- a backdrop filter, a- // privacy blur on a screenshot -- and reading `blur 10` out of one of those- // would fail this suite over a number no shadow ever wanted. So the comment- // must also name what it is measuring. A sigil (`@design-glow`) would be- // sharper, but only until the annotation that forgets to carry it: that turns- // this false positive into a silent miss, which is the worse direction.- // Naming the shadow is what a design annotation already does -- every- // contributing one in this tree says "glow" or "shadow" -- so the marker- // maintains itself.- //- // A function rather than three lines inside the loop, because the whole-tree- // test can only ever report that some number leaked in; it cannot say which- // comment shape let it. The probes below say that.- const ANNOTATED_BLUR = (comment) => {- const blur = comment.match(/\bblur (?<blur>\d+)/);- if (!blur) return null;- if (!/\b(glow|shadow)\b/i.test(comment)) return null;- if (/\by\d/.test(comment)) return null;- return Number(blur.groups.blur);- };-- it.each([- ['a glow annotation', '// diagPulse: mint glow, blur 16', 16],- ['a shadow annotation', '/* StepCard shadow at blur 48 */', 48],- ['either word cased as prose', '// Glow: blur 24', 24],- ['a backdrop filter', '// the sheet sits over a backdrop blur 10 panel', null],- ['a privacy blur', '// screenshots ship with the avatar under blur 12', null],- ['a wash, which the card scale owns', '// welCard: glow 0 y4px blur 64', null],- ['a comment naming no blur at all', '// mint glow at #5BFFA070', null],- ])('reads %s', (_, comment, expected) => {- expect(ANNOTATED_BLUR(comment)).toBe(expected);- });-- // The rule fixes the shape of a rung; it does not decide which blurs exist.- // That is design.pen's, and the annotations are how it reaches the source: a- // component that names `blur 24` and then renders a 32px glow has been- // redesigned by a codemod. Checking that the scale can SPELL each annotated- // blur is the half that holds without guessing which element in a file an- // annotation refers to -- welCard's does not describe the shadow nearest it.- it('can spell every blur a design annotation names', () => {- const annotated = new Set();-- for (const relative of intendedFiles(UI_ROOT, { extensions: ['.ts', '.tsx'] })) {- const source = fs.readFileSync(new URL(relative, new URL(UI_ROOT, 'file:')), 'utf8');- for (const comment of typeScriptComments(source, relative)) {- const blur = ANNOTATED_BLUR(comment);- if (blur !== null) annotated.add(blur);- }- }-- expect(annotated.size).toBeGreaterThan(0);-- // Read off ROLE_BLUR rather than off the declarations, so this asks the- // scale the test pins and not whatever index.css currently happens to say.- // Taking it from the file made the two agree by construction: a rung nudged- // to 40px became "spellable" in the same edit that broke its frame.- const spellable = new Set(Object.values(ROLE_BLUR)- .flatMap((blur) => (typeof blur === 'number' ? [blur] : Object.values(blur))));-- expect([...annotated].filter((blur) => !spellable.has(blur)).sort((a, b) => a - b)).toEqual([]);- }, WHOLE_TREE_SCAN);});diff --git a/ui/scripts/lintBaseline.test.mjs b/ui/scripts/lintBaseline.test.mjsindex a87a6f6ab..20db4fd3e 100644--- a/ui/scripts/lintBaseline.test.mjs+++ b/ui/scripts/lintBaseline.test.mjs@@ -1,8 +1,3 @@-import { spawnSync } from 'node:child_process';-import fs from 'node:fs';-import path from 'node:path';-import { fileURLToPath } from 'node:url';-import { describe, expect, it } from 'vitest';import {@@ -29,23 +24,13 @@ describe('compareToBaseline accepts the recorded debt unchanged', () => {});});- // The gate is a count ratchet, so a violation deleted at one site and- // reintroduced at another inside the same (file, rule) pair passes. Recorded- // as an intended property rather than left implicit: a reader who assumes- // otherwise is relying on a guarantee this file does not make, and the same- // trade-off is the one ESLint's own suppressions file makes.- it('accepts a baselined violation replaced one-for-one within the same pair', () => {- const ledger = { 'src/a.ts': { 'no-explicit-any': 3 } };- expect(compareToBaseline(ledger, { 'src/a.ts': { 'no-explicit-any': 3 } })).toEqual({- unclassified: [],- expanded: [],- stale: [],- });+ it('reports an empty baseline against an empty run as clean', () => {+ expect(compareToBaseline({}, {})).toEqual({ unclassified: [], expanded: [], stale: [] });});- // The bound on that residual, in one place: a swap can only ever hide inside- // debt that is already recorded, at a count that cannot grow, in the file that- // already carries it.+ // The count ratchet's accepted residual (see the lint-baseline.mjs header) is+ // bounded here: a swap can only hide inside debt that is already recorded, at+ // a count that cannot grow, in the file that already carries it.it('catches the same swap the moment it changes the count, the rule or the file', () => {const ledger = { 'src/a.ts': { 'no-explicit-any': 3 } };expect(compareToBaseline(ledger, { 'src/a.ts': { 'no-explicit-any': 4 } }).expanded).toHaveLength(1);@@ -266,89 +251,8 @@ describe('integrityLines fails on an incomplete measurement even when every tall});});-describe('an incomplete measurement blocks --update too, not just the verdict', () => {- // The ordering has to hold in the real script: `lint:baseline` exists to- // rewrite the ledger, so if it ran before the integrity checks, any of the- // failures above could be laundered into a freshly written green baseline.- // Asserted against the actual command rather than an injected fake, because a- // fake would only pin the ordering a test author already imagined.- const UI_ROOT = fileURLToPath(new URL('../', import.meta.url));- const BASELINE = path.join(UI_ROOT, 'eslint-baseline.json');- const PROBE = path.join(UI_ROOT, 'update-integrity-probe.ts');-- // The probe has to be a real file in the real tree: the gate measures ``ui/``- // from its own location, so there is no temporary copy to point it at, and a- // fixture the domain walk cannot find would not exercise the thing under test.- // It therefore exists on disk for as long as the gate takes to run, and a test- // process killed hard enough to skip the ``finally`` leaves it behind — where- // it fails ``npm run lint`` for everyone in that checkout, naming a file- // nobody wrote. So the file says what it is and who is responsible for it.- // Only the directive's line number moves, and nothing asserts that.- const PROBE_SOURCE = [- '// Temporary fixture: written by ui/scripts/lintBaseline.test.mjs, and deleted',- '// by it. Finding this file in a working tree means a test run was killed',- '// before it could clean up. Delete it and the lint gate goes green again.',- '/* eslint @typescript-eslint/no-explicit-any: "off" */',- 'export const f = (v: any) => v;',- '',- ].join('\n');-- const runGate = (args) =>- spawnSync(process.execPath, ['scripts/lint-baseline.mjs', ...args], {- cwd: UI_ROOT,- encoding: 'utf8',- timeout: 300_000,- });-- it('refuses to write a baseline while an integrity check is failing', () => {- const before = fs.readFileSync(BASELINE);- try {- fs.writeFileSync(PROBE, PROBE_SOURCE);- const result = runGate(['--update']);- expect(result.status).toBe(1);- expect(result.stderr).toContain('INLINE');- expect(result.stderr).toContain('update-integrity-probe.ts');- // Exactly one: the preamble above is prose that happens to mention lint,- // so this is what keeps it from quietly becoming a second directive and- // changing what the run is being failed for.- expect(result.stderr.match(/INLINE/g)).toHaveLength(1);- expect(fs.readFileSync(BASELINE).equals(before)).toBe(true);- } finally {- fs.rmSync(PROBE, { force: true });- fs.writeFileSync(BASELINE, before);- }- }, 300_000);-});--describe('the gate script stays reviewable text', () => {- const source = fs.readFileSync(fileURLToPath(new URL('./lint-baseline.mjs', import.meta.url)));-- it('contains no raw NUL byte', () => {- // The (file, rule) key joins on NUL. Written as a literal byte it makes the- // whole script binary to git, so the gate everyone is asked to trust stops- // showing up in diffs and review. The escape has identical runtime meaning.- expect(source.includes(0)).toBe(false);- });-- it('still joins the pair on a character neither half can contain', () => {- expect(pairKey('src/a.ts', 'no-explicit-any')).toBe('src/a.ts\0no-explicit-any');- });-+describe('pairKey', () => {it('cannot confuse two different pairs that share a prefix', () => {expect(pairKey('src/a.ts', 'b/c')).not.toBe(pairKey('src/a.ts b', 'c'));});});--describe('compareToBaseline cannot pass vacuously', () => {- it('fails when the lint run produced nothing at all', () => {- // A broken glob or a crashed ESLint run yields an empty report. That must- // read as "the measurement is gone", never as "the code is clean".- const { stale } = compareToBaseline({ 'src/a.ts': { 'no-explicit-any': 3 } }, {});- expect(stale).toHaveLength(1);- });-- it('reports an empty baseline against an empty run as clean', () => {- // The one honest empty case: nothing recorded, nothing found.- expect(compareToBaseline({}, {})).toEqual({ unclassified: [], expanded: [], stale: [] });- });-});diff --git a/ui/scripts/lintPolicy.test.mjs b/ui/scripts/lintPolicy.test.mjsindex e23719df0..724ea74e5 100644--- a/ui/scripts/lintPolicy.test.mjs+++ b/ui/scripts/lintPolicy.test.mjs@@ -6,7 +6,6 @@ import { fileURLToPath } from 'node:url';import { afterAll, beforeAll, describe, expect, it } from 'vitest';import { ESLint, Linter } from 'eslint';import globals from 'globals';-import ts from 'typescript';import sharedConfig from '../eslint.config.js';import { EXPECTED_BROWSER_GLOBALS } from './browserGlobals.mjs';@@ -22,14 +21,12 @@ import {policyDifferences,withoutRules,} from './lintPolicy.mjs';-import { WHOLE_TREE_SCAN } from './wholeTreeScan.mjs';// What the gate measures, measured. Every case here is a way the lint run could// look at less than it claims to while `eslint-baseline.json` stays green — the// failure mode the ledger structurally cannot see, because it records what was// found and never what was looked at.-const UI_ROOT = fileURLToPath(new URL('../', import.meta.url));const SCRIPTS_ROOT = fileURLToPath(new URL('./', import.meta.url));let eslint;@@ -105,97 +102,6 @@ describe('intendedFiles walks the whole repo-owned TypeScript tree', () => {});});-describe('the real UI tree is what the gate measures', () => {- it('covers the root config file the previous scope contract could not see', () => {- // `basePath` narrowed the rule-bearing entry to `src/` with every field the- // old hand-written contract listed left byte-identical, and `vite.config.ts`- // silently stopped being linted. It is in the domain by construction now.- expect(intendedFiles(UI_ROOT)).toContain('vite.config.ts');- }, WHOLE_TREE_SCAN);-- it('covers nested sources without anyone listing them', () => {- const found = intendedFiles(UI_ROOT);- expect(found.length).toBeGreaterThan(100);- expect(found.every((file) => file.endsWith('.ts') || file.endsWith('.tsx'))).toBe(true);- expect(found.some((file) => file.split('/').length > 3)).toBe(true);- }, WHOLE_TREE_SCAN);-- it('resolves exactly the pinned policy for every one of them', async () => {- const drifted = [];- for (const file of intendedFiles(UI_ROOT)) {- const differences = policyDifferences(effectivePolicyOf(await eslint.calculateConfigForFile(path.join(UI_ROOT, file))));- if (differences.length > 0) drifted.push({ file, differences });- }- expect(groupByDifferences(drifted)).toEqual([]);- }, WHOLE_TREE_SCAN);-- // The rule those three are instances of, and the reason it is asserted rather- // than remembered: a test that walks the real tree is not a unit test, so- // vitest's default clock measures the runner's contention instead of the- // test's subject. The two that forgot did not fail on a defect -- they failed- // on a busy CI machine, six pushes in a row, on the one gate whose entire job- // is to tell a defect from a correct file.- //- // The members are found by asking the parser which `it()` reaches for the- // walk, rather than by listing the ones that happened to be slow the week this- // was written. That is the same lesson as the scan these tests guard: a- // question about structure answered by structure. A whole-tree test added- // later is covered without editing this, and one that drops its clock fails- // here instead of on someone else's pull request.- //- // Structural is not a preference here, it is the only thing that works. The- // first cut asked whether the test's TEXT contained `intendedFiles(` and- // `new URL('../'`, and this test failed on itself: those spellings are in the- // marker, so the guard read its own source and reported the search string as a- // finding. A call is a call and a string that spells one is not.- it('gives every whole-tree test a clock that measures a hang, not a busy runner', () => {- const untimed = [];- const misnamed = [];-- for (const file of fs.readdirSync(SCRIPTS_ROOT).filter((name) => name.endsWith('.test.mjs'))) {- const source = fs.readFileSync(path.join(SCRIPTS_ROOT, file), 'utf8');- const tree = ts.createSourceFile(file, source, ts.ScriptTarget.Latest, true);-- const names = (node) =>- (ts.isIdentifier(node) && node.text === 'UI_ROOT') || Boolean(ts.forEachChild(node, names));-- const walksTheTree = (node) =>- (ts.isCallExpression(node)- && node.expression.getText(tree) === 'intendedFiles'- && node.arguments.some(names))- || Boolean(ts.forEachChild(node, walksTheTree));-- const visit = (node) => {- // The real tree has exactly one spelling, which is what makes the marker- // above complete: a walk introduced under some other name would be- // invisible to it, so the name itself is pinned here.- if (ts.isNewExpression(node)- && node.expression.getText(tree) === 'URL'- && node.arguments?.[0] && ts.isStringLiteral(node.arguments[0])- && node.arguments[0].text === '../') {- let bound = node.parent;- while (bound && !ts.isVariableDeclaration(bound)) bound = bound.parent;- const name = bound ? bound.name.getText(tree) : 'the tree root, bound to no name';- if (name !== 'UI_ROOT') misnamed.push(`${file} > ${name}`);- }-- if (ts.isCallExpression(node) && ['it', 'test'].includes(node.expression.getText(tree))) {- const [name, body, timeout] = node.arguments;- if (body && walksTheTree(body) && timeout === undefined) {- untimed.push(`${file} > ${name.getText(tree)}`);- }- }-- node.forEachChild(visit);- };- visit(tree);- }-- expect(misnamed).toEqual([]);- expect(untimed).toEqual([]);- });-});-// ─── the policy ──────────────────────────────────────────────────────────────const resolved = async (filePath = 'src/__probe__/probe.ts') =>diff --git a/ui/scripts/modelCatalogDiscovery.test.mjs b/ui/scripts/modelCatalogDiscovery.test.mjsindex 002b1eb23..72bc51f32 100644--- a/ui/scripts/modelCatalogDiscovery.test.mjs+++ b/ui/scripts/modelCatalogDiscovery.test.mjs@@ -35,15 +35,6 @@ test('live E2E discovery never collects the model catalog fixture', () => {expect(specs.filter((spec) => spec.file.startsWith('model-catalog/'))).toEqual([]);}, 35_000);-test('isolated catalog discovery retains all scenario-labelled browser cases', () => {- const specs = collect('playwright.model-catalog.config.ts')- .filter((spec) => spec.file === 'catalog.spec.ts');- expect(specs.flatMap((spec) => spec.tests)).toHaveLength(36);- for (const spec of specs) {- expect(spec.title).toContain('MH-MENU-COMPOSE-001');- }-}, 35_000);-test('isolated discovery includes every fixture spec on both viewports', () => {const specs = collect('playwright.model-catalog.config.ts');const files = readdirSync(new URL('../e2e/model-catalog/', import.meta.url))diff --git a/ui/scripts/nonRenderingText.test.mjs b/ui/scripts/nonRenderingText.test.mjsindex 817b1e1ea..2f91db6de 100644--- a/ui/scripts/nonRenderingText.test.mjs+++ b/ui/scripts/nonRenderingText.test.mjs@@ -1,10 +1,6 @@-import fs from 'node:fs';-import { fileURLToPath } from 'node:url';-import postcss from 'postcss';import { describe, expect, it } from 'vitest';-import { intendedFiles } from './lintPolicy.mjs';import {cssBearingRangesIn,cssRangesIn,@@ -13,7 +9,6 @@ import {rendersAtAll,withoutNonRenderingText,} from './nonRenderingText.mjs';-import { WHOLE_TREE_SCAN } from './wholeTreeScan.mjs';// `validate:theme` reads whole source files with regular expressions, so the set// of bytes it treats as CSS is decided here and nowhere else. Ten review rounds@@ -29,8 +24,6 @@ import { WHOLE_TREE_SCAN } from './wholeTreeScan.mjs';// Blanking too much would silence the whole guard while every case above it// still passed.-const UI_ROOT = fileURLToPath(new URL('../', import.meta.url));-// A glow no role in the scale carries, so its presence in the output is only// ever the fixture's own.const GLOW = '0 0 93px red';@@ -128,23 +121,27 @@ describe('withoutNonRenderingText', () => {// Every offence the scan reports is located by slicing the source up to a// match index, so a blanked file that is one character shorter than its// original moves every line number after it. Blanking replaces bodies with- // spaces for exactly this reason, and the property is asserted over the real- // tree rather than over fixtures: three files here contain astral characters,- // whose UTF-16 code units are what TypeScript's offsets count and what a- // code-point-wise rewrite silently loses.- it('preserves length and line breaks across every scanned file', () => {- const drifted = [];-- for (const relative of intendedFiles(UI_ROOT, { extensions: ['.ts', '.tsx', '.css'] })) {- const raw = fs.readFileSync(new URL(relative, new URL(UI_ROOT, 'file:')), 'utf8');- const blanked = withoutNonRenderingText(raw, relative);- if (blanked.length !== raw.length || blanked.split('\n').length !== raw.split('\n').length) {- drifted.push(relative);- }+ // spaces for exactly this reason. Astral characters are the shape that broke+ // it: their UTF-16 code units are what TypeScript's offsets count and what a+ // code-point-wise rewrite silently loses, so each fixture puts one ahead of+ // the text it blanks and asserts the exact output.+ it.each([+ ['probe.ts', "// \u{1F642} icon\n/* box-shadow: 0 0 93px red */\nexport const after = 1;\n", [0, 1]],+ ['probe.tsx', "// \u{1F642} icon\nexport const A = () => <p>{/* 93px */}</p>;\n", [0]],+ ['probe.css', "/* \u{1F642} icon */\n/* box-shadow: 0 0 93px red */\n.a { color: red; }\n", [0, 1]],+ ])('preserves length and line breaks in %s after an astral character', (file, source, blankedLines) => {+ const blanked = withoutNonRenderingText(source, file);+ const lines = source.split('\n');+ const expected = lines.map((line, index) => (blankedLines.includes(index) ? ' '.repeat(line.length) : line));+ expect(blanked.length).toBe(source.length);+ if (file.endsWith('.tsx')) {+ expect(blanked.split('\n')[0]).toBe(expected[0]);+ expect(blanked.split('\n')[1]).not.toContain('93px');+ expect(blanked.split('\n')[1]).toContain('export const A = () => <p>');+ } else {+ expect(blanked).toBe(expected.join('\n'));}-- expect(drifted).toEqual([]);- }, WHOLE_TREE_SCAN);+ });// TSX is not a superset of TS. `<T>(x: T) => …` is a generic arrow in a `.ts`// file and an unclosed JSX element in a `.tsx` one, so reading every file with@@ -207,20 +204,6 @@ describe('withoutNonRenderingText', () => {expect(withoutNonRenderingText(condition, 'probe.css')).not.toContain('93px');});-- it('is applied to every extension the scan reads', () => {- const scan = fs.readFileSync(new URL('validate-theme.mjs', import.meta.url), 'utf8');- const extensions = scan.match(/extensions:\s*\[([^\]]*)\]/g) ?? [];- const scanned = extensions.at(-1) ?? '';-- // The bug this replaces was a conditional naming one suffix, which turned a- // rule about rendering into a rule about file names. If the scan grows an- // extension, the dispatcher has to have an opinion about it.- for (const extension of scanned.match(/'\.\w+'/g) ?? []) {- const probe = `probe${extension.slice(1, -1)}`;- expect(withoutNonRenderingText('/* box-shadow: 0 0 93px red */\n', probe)).not.toContain('93px');- }- });});// The same question one granularity up: a file the bundler never reaches drawsdiff --git a/ui/scripts/wholeTreeScan.mjs b/ui/scripts/wholeTreeScan.mjsdeleted file mode 100644index a943c48db..000000000--- a/ui/scripts/wholeTreeScan.mjs+++ /dev/null@@ -1,19 +0,0 @@-// How long a test that walks the whole UI tree may run before it is treated as-// hung.-//-// vitest's 5s default is a UNIT test's clock, and these are not unit tests. They-// read and parse every source file in the repository on purpose: the properties-// they assert -- that blanking non-rendering text preserves every file's length,-// that the glow scale can spell every blur design.pen annotates, that the lint-// domain resolves one policy for every file in it -- are about the real tree and-// cannot be stated over fixtures. Three of the files they cover contain astral-// characters, which is exactly the case a hand-written fixture does not have.-//-// So the number is a hang detector, not a performance budget. The work is under-// two seconds on a developer machine; a CI runner executing 213 test files over-// a shared pair of cores multiplies that enough to cross five, which is how-// these tests spent six pushes failing intermittently -- red CI naming no defect-// at all, on the one gate whose whole purpose is to tell a defect from a-// correct file. Under a minute is contention. Over it is a loop that will not-// end on its own.-export const WHOLE_TREE_SCAN = 60_000;diff --git a/ui/src/components/onboarding/providers/tsconfig.tests.json b/ui/src/components/onboarding/providers/tsconfig.tests.jsondeleted file mode 100644index e5177643a..000000000--- a/ui/src/components/onboarding/providers/tsconfig.tests.json+++ /dev/null@@ -1,22 +0,0 @@-{- "extends": "../../../../tsconfig.app.json",- "compilerOptions": {- "composite": false,- "noEmit": true,- "tsBuildInfoFile": "../../../../node_modules/.tmp/setup-providers-tests.tsbuildinfo"- },- "include": [- "./**/*.ts",- "./**/*.tsx",- "../setupAction.types.test.ts",- "../setupConfig.test.ts",- "../SetupFlowShell.test.tsx",- "../WizardCompletion.test.tsx",- "../setupTargets.test.ts",- "../setupTargets.ts",- "../entryGate.test.ts",- "../entryGate.ts",- "../../../i18n/i18next.d.ts"- ],- "exclude": []-}diff --git a/ui/src/components/settings/models/tsconfig.tests.json b/ui/src/components/settings/models/tsconfig.tests.jsondeleted file mode 100644index d474ba89e..000000000--- a/ui/src/components/settings/models/tsconfig.tests.json+++ /dev/null@@ -1,10 +0,0 @@-{- "extends": "../../../../tsconfig.app.json",- "compilerOptions": {- "composite": false,- "noEmit": true,- "tsBuildInfoFile": "../../../../node_modules/.tmp/model-hub-tests.tsbuildinfo"- },- "include": ["./**/*.ts", "./**/*.tsx", "../../../i18n/i18next.d.ts"],- "exclude": []-}diff --git a/ui/tsconfig.i18n-tests.json b/ui/tsconfig.i18n-tests.jsondeleted file mode 100644index 7aa1e0ec6..000000000--- a/ui/tsconfig.i18n-tests.json+++ /dev/null@@ -1,5 +0,0 @@-{- "extends": "./tsconfig.app.json",- "include": ["src/i18n/i18next.d.ts", "src/i18n/translationContract.test.ts"],- "exclude": []-}diff --git a/ui/tsconfig.tests.json b/ui/tsconfig.tests.jsonnew file mode 100644index 000000000..eed4036bf--- /dev/null+++ b/ui/tsconfig.tests.json@@ -0,0 +1,20 @@+{+ "extends": "./tsconfig.app.json",+ "include": [+ "src/i18n/i18next.d.ts",+ "src/i18n/translationContract.test.ts",+ "src/components/settings/models/**/*.ts",+ "src/components/settings/models/**/*.tsx",+ "src/components/onboarding/providers/**/*.ts",+ "src/components/onboarding/providers/**/*.tsx",+ "src/components/onboarding/setupAction.types.test.ts",+ "src/components/onboarding/setupConfig.test.ts",+ "src/components/onboarding/SetupFlowShell.test.tsx",+ "src/components/onboarding/WizardCompletion.test.tsx",+ "src/components/onboarding/setupTargets.test.ts",+ "src/components/onboarding/setupTargets.ts",+ "src/components/onboarding/entryGate.test.ts",+ "src/components/onboarding/entryGate.ts"+ ],+ "exclude": []+}