Skip to content

armgit / avibe

Public Imported from GitHub
0

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.

perf(ci): shorten the mandatory validation critical path (#1879)

Call White928924dd82bb
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
index f1f65fe04..f3deb0e83 100644
--- a/.github/workflows/lint.yml
+++ b/.github/workflows/lint.yml
@@ -31,6 +31,26 @@ jobs:
pip install pre-commit
pre-commit run --all-files
+ ui-checks:
+ 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: Validate and test UI
+ working-directory: ui
+ run: |
+ npm ci
+ npm run validate:theme
+ npm run lint
+ # Production tsc excludes test files, and vitest only strips types.
+ npm run typecheck:tests
+ npm test
+
build-linux-artifacts:
runs-on: ubuntu-latest
steps:
@@ -50,13 +70,6 @@ jobs:
working-directory: ui
run: |
npm ci
- npm run validate:theme
- npm run lint
- # `npm run build` runs `tsc -b`, whose projects exclude every
- # `*.test.ts(x)`, and vitest strips types without checking them. So no
- # gate below reads a test file's types; this one does.
- npm run typecheck:tests
- npm test
npm run build
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
@@ -139,16 +152,23 @@ jobs:
unit-tests:
runs-on: ubuntu-latest
- needs: unit-test-shards
+ # 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]
if: always()
steps:
- - name: Verify unit test shards
+ - name: Verify unit test shards and UI checks
+ env:
+ UNIT_RESULT: ${{ needs['unit-test-shards'].result }}
+ UI_RESULT: ${{ needs['ui-checks'].result }}
run: |
- if [ "${{ needs['unit-test-shards'].result }}" != "success" ]; then
- echo "Unit test shards finished with result: ${{ needs['unit-test-shards'].result }}"
- exit 1
- fi
- echo "All unit test shards passed."
+ for result in "$UNIT_RESULT" "$UI_RESULT"; do
+ if [ "$result" != "success" ]; then
+ echo "Unit/UI checks finished with result: $result"
+ exit 1
+ fi
+ done
+ echo "All unit test shards and UI checks passed."
memory-insight-contract:
runs-on: ubuntu-latest
diff --git a/docs/plans/ci-critical-path.md b/docs/plans/ci-critical-path.md
new file mode 100644
index 000000000..130d6c543
--- /dev/null
+++ b/docs/plans/ci-critical-path.md
@@ -0,0 +1,56 @@
+# CI Critical Path
+
+## Baseline
+
+Read at master `9993ce41ce3669e5d05ae167564daffb6cb4cbc5`.
+Successful lint runs on September 5, 2026:
+
+| Run | Source | Wall time | Artifact build | Install regression | Slowest Python shard |
+| --- | --- | --- | --- | --- | --- |
+| [33952795137](https://github.com/avibe-bot/avibe/actions/runs/33952795137) | `9993ce41ce` | 13m24s | 8m00s | 5m17s | 9m35s |
+| [33951672367](https://github.com/avibe-bot/avibe/actions/runs/33951672367) | `d5bd8d1cda` | 11m46s | 7m26s | 4m13s | 9m23s |
+
+The artifact build followed by install regression is the critical path.
+In the first run, UI validation and tests consumed approximately four minutes
+before the production bundle could be built. Unit dependency installation took
+two to three seconds; adding more dependency caches is not the first lever.
+
+## Changes and Invariants
+
+- UI validation runs independently from production artifact creation. Every
+ existing theme, lint, test-typecheck, test, and production-build command remains
+ gated. The existing `unit-tests` aggregate requires both Python shards and
+ `ui-checks` to succeed, including fail-closed handling of skipped/cancelled jobs.
+ Artifact consumers still require the real production artifact build.
+- Packaged upgrade tests build the two core/Memory version pairs once per module,
+ reducing sixteen wheel builds to four. Each case copies those immutable inputs
+ into its own wheelhouse and installs into its own virtual environment. Deleting
+ Memory wheels in the missing-package case cannot affect another test or the
+ shared inputs. All upgrade and optional-import assertions remain unchanged.
+- The existing six-shard planner uses a refreshed timing snapshot containing all
+ 396 files from run 33952795137. No planner algorithm or test selection changes.
+ Every discovered file, including newly added files without timing samples, must
+ appear in exactly one shard; unknown files retain the structural estimate.
+
+Replaying the measured durations with the refreshed assignment gives about
+7m23s per shard instead of a 9m24s slowest test step. As a holdout, run
+33951672367 gives 6m42s to 7m14s with that same assignment. These are scheduling
+estimates, not a promise about runner speed or queue time. Compare actual PR job
+timestamps after the change before claiming an end-to-end improvement.
+
+## Evidence and Boundaries
+
+- Workflow contract tests execute the aggregate shell gate across all dependency
+ outcomes and verify that UI checks cannot be bypassed by the split.
+- The real packaged upgrade tests cover core-only status, paired upgrades,
+ core-only upgrades, and refusal when Memory is missing. Their fixture isolation
+ also has a focused mutation test. Related scenarios: MEMORY-INDEP-021 and
+ MEMORY-INDEP-024/025.
+- Full UI checks and builds remain required; so do package distribution/sdist
+ contracts, released migration guards, pinned Memory runtime contracts, Docker
+ install/upgrade regressions, and Windows installation smoke tests.
+- There is one additional lightweight Node setup/npm install for the independent
+ UI job. No new dependencies, services, path-based skips, or reduced coverage.
+- Timing snapshots remain advisory and may age. Refresh from complete successful
+ shard logs, preserve the source run/commit, and validate against another run
+ before changing the snapshot again. Automatic refresh is outside this change.
diff --git a/scripts/ci_unit_test_timings.json b/scripts/ci_unit_test_timings.json
index 424e6b3e3..9b87ce834 100644
--- a/scripts/ci_unit_test_timings.json
+++ b/scripts/ci_unit_test_timings.json
@@ -1,295 +1,402 @@
{
"schema_version": 1,
- "source": "GitHub Actions run 31034359265 (d2077a91e8)",
+ "source": "GitHub Actions run 33952795137 (9993ce41ce)",
"durations_seconds": {
- "tests/scenarios/auth_setup/test_auth_setup_scenarios.py": 11,
- "tests/scenarios/message_delivery/test_message_delivery_scenarios.py": 7,
- "tests/scenarios/model_hub/test_model_hub_live_resolution_scenarios.py": 3,
- "tests/scenarios/model_hub/test_model_hub_migration_scenarios.py": 8,
- "tests/scenarios/model_hub/test_model_hub_native_oauth_scenarios.py": 2,
- "tests/test_agent_activity_service.py": 7,
- "tests/test_agent_auth_service.py": 3,
+ "tests/scenarios/auth_setup/test_auth_setup_scenarios.py": 15,
+ "tests/scenarios/memory_im_attachment_capture/test_memory_im_attachment_capture_catalog.py": 6,
+ "tests/scenarios/memory_im_attachment_capture/test_memory_im_attachment_capture_scenarios.py": 7,
+ "tests/scenarios/memory_independence/test_memory_independence_catalog.py": 1,
+ "tests/scenarios/memory_independence/test_memory_package_shape.py": 18,
+ "tests/scenarios/memory_list/test_memory_list_scenarios.py": 3,
+ "tests/scenarios/memory_runtime_install/test_memory_runtime_install_scenarios.py": 8,
+ "tests/scenarios/message_delivery/test_message_delivery_scenarios.py": 3,
+ "tests/scenarios/model_hub/test_model_hub_catalog.py": 8,
+ "tests/scenarios/model_hub/test_model_hub_configured_route_scenarios.py": 3,
+ "tests/scenarios/model_hub/test_model_hub_live_resolution_scenarios.py": 4,
+ "tests/scenarios/model_hub/test_model_hub_migration_scenarios.py": 3,
+ "tests/scenarios/model_hub/test_model_hub_native_oauth_scenarios.py": 4,
+ "tests/scenarios/model_hub/test_model_hub_turn_contract_scenarios.py": 4,
+ "tests/scenarios/permissions/test_permissions_scenarios.py": 6,
+ "tests/test_admin_notifications.py": 4,
+ "tests/test_agent_activity_service.py": 6,
+ "tests/test_agent_auth_service.py": 5,
"tests/test_agent_backend_alive.py": 3,
"tests/test_agent_backend_catalog.py": 2,
- "tests/test_agent_graph_service.py": 4,
+ "tests/test_agent_events_retention.py": 15,
+ "tests/test_agent_graph_service.py": 6,
"tests/test_agent_initiated_turn_fsm.py": 2,
- "tests/test_agent_run_target.py": 4,
- "tests/test_agent_service.py": 3,
- "tests/test_agent_silent_result.py": 2,
- "tests/test_agent_steering.py": 14,
- "tests/test_agent_stop_settlement.py": 2,
- "tests/test_agent_tool_policy.py": 3,
+ "tests/test_agent_organization_onboarding.py": 7,
+ "tests/test_agent_run_target.py": 5,
+ "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": 3,
+ "tests/test_agent_tool_policy.py": 4,
"tests/test_agents_graph_route.py": 4,
"tests/test_api_key_masking.py": 2,
"tests/test_api_runtime_refresh.py": 2,
- "tests/test_api_save_config_merge.py": 18,
- "tests/test_async_bridge.py": 1,
- "tests/test_audio_asr.py": 3,
- "tests/test_auth_pipeline.py": 2,
+ "tests/test_api_save_config_merge.py": 38,
+ "tests/test_async_bridge.py": 2,
+ "tests/test_atomic_io.py": 2,
+ "tests/test_audio_asr.py": 2,
+ "tests/test_auth_pipeline.py": 1,
"tests/test_avault_agent.py": 2,
- "tests/test_backend_failure.py": 2,
+ "tests/test_backend_failure.py": 1,
"tests/test_backend_model_catalog.py": 2,
- "tests/test_backend_restart.py": 3,
- "tests/test_background_work_banner.py": 8,
+ "tests/test_backend_restart.py": 4,
+ "tests/test_background_work_banner.py": 14,
"tests/test_bind_code_api.py": 2,
"tests/test_bind_security.py": 2,
- "tests/test_caller_context.py": 2,
- "tests/test_chat_discovery.py": 21,
- "tests/test_claude_agent_initiated_turn.py": 2,
- "tests/test_claude_agent_sessions.py": 3,
- "tests/test_claude_cli_path.py": 4,
- "tests/test_claude_container_sandbox.py": 2,
- "tests/test_claude_model_catalog.py": 2,
+ "tests/test_caller_context.py": 3,
+ "tests/test_chat_discovery.py": 34,
+ "tests/test_ci_unit_test_shards.py": 2,
+ "tests/test_claude_agent_initiated_turn.py": 4,
+ "tests/test_claude_agent_sessions.py": 4,
+ "tests/test_claude_cli_path.py": 5,
+ "tests/test_claude_container_sandbox.py": 3,
+ "tests/test_claude_model_catalog.py": 1,
"tests/test_claude_process_reaper.py": 2,
"tests/test_claude_reasoning_options.py": 2,
- "tests/test_claude_receiver_result_settle.py": 2,
+ "tests/test_claude_receiver_result_settle.py": 3,
"tests/test_claude_sdk_compat.py": 3,
"tests/test_claude_subprocess_env.py": 2,
- "tests/test_claude_token_usage.py": 2,
+ "tests/test_claude_token_usage.py": 3,
"tests/test_cli_agent_models.py": 3,
- "tests/test_cli_agent_run_schema.py": 10,
- "tests/test_cli_definition_read_projection.py": 5,
- "tests/test_cli_pagination.py": 8,
- "tests/test_cli_screenshot_command.py": 2,
- "tests/test_cli_setup_status.py": 1,
- "tests/test_cli_task_command.py": 48,
- "tests/test_cli_watch_command.py": 25,
+ "tests/test_cli_agent_run_schema.py": 12,
+ "tests/test_cli_definition_read_projection.py": 6,
+ "tests/test_cli_pagination.py": 18,
+ "tests/test_cli_screenshot_command.py": 1,
+ "tests/test_cli_setup_status.py": 3,
+ "tests/test_cli_task_command.py": 78,
+ "tests/test_cli_watch_command.py": 17,
"tests/test_cloudflare_network.py": 2,
- "tests/test_codex_agent.py": 3,
- "tests/test_codex_api_auth.py": 2,
+ "tests/test_codex_agent.py": 5,
+ "tests/test_codex_api_auth.py": 3,
"tests/test_codex_config.py": 2,
"tests/test_codex_event_handler.py": 2,
"tests/test_codex_process_match.py": 2,
- "tests/test_codex_session.py": 2,
+ "tests/test_codex_prompt_delivery_contract.py": 1,
+ "tests/test_codex_session.py": 1,
"tests/test_codex_token_usage.py": 2,
- "tests/test_codex_transport.py": 2,
+ "tests/test_codex_transport.py": 3,
"tests/test_codex_turn_state.py": 2,
- "tests/test_command_handler_user_names.py": 2,
+ "tests/test_command_handler_user_names.py": 3,
"tests/test_command_runner.py": 6,
- "tests/test_conftest_auth_home_isolation.py": 1,
- "tests/test_controller_ack.py": 2,
- "tests/test_controller_agent_status.py": 3,
+ "tests/test_config_write_transaction.py": 14,
+ "tests/test_conftest_auth_home_isolation.py": 2,
+ "tests/test_controller_ack.py": 1,
+ "tests/test_controller_agent_status.py": 4,
"tests/test_controller_config_reload.py": 2,
"tests/test_controller_dispatch_loop.py": 3,
- "tests/test_controller_idle_cleanup.py": 2,
+ "tests/test_controller_idle_cleanup.py": 3,
"tests/test_controller_im_ready.py": 3,
- "tests/test_controller_model_hub_gate.py": 2,
- "tests/test_controller_platform_reconcile.py": 8,
- "tests/test_controller_vibe_agent_routing.py": 2,
+ "tests/test_controller_memory_data_reset.py": 4,
+ "tests/test_controller_model_hub_gate.py": 3,
+ "tests/test_controller_platform_reconcile.py": 11,
+ "tests/test_controller_trace_retention.py": 3,
+ "tests/test_controller_vibe_agent_routing.py": 4,
"tests/test_core_services_dispatch.py": 2,
- "tests/test_core_services_sessions.py": 7,
- "tests/test_core_services_settings.py": 3,
+ "tests/test_core_services_sessions.py": 8,
+ "tests/test_core_services_settings.py": 5,
"tests/test_delete_channel_scope.py": 2,
- "tests/test_delivery_state_matrix.py": 2,
+ "tests/test_delivery_ack_reaction.py": 4,
+ "tests/test_delivery_state_matrix.py": 3,
"tests/test_dependency_network.py": 2,
"tests/test_dev_state_migration_guard.py": 2,
"tests/test_discord_api_retry.py": 2,
- "tests/test_discord_guild_settings.py": 6,
+ "tests/test_discord_guild_settings.py": 8,
"tests/test_discord_model_picker.py": 2,
"tests/test_discord_reply_anchor.py": 3,
- "tests/test_discord_runtime.py": 3,
+ "tests/test_discord_runtime.py": 2,
"tests/test_discovered_chats.py": 2,
"tests/test_dispatcher_stream_chunk.py": 2,
- "tests/test_dock_api.py": 10,
+ "tests/test_dock_api.py": 6,
"tests/test_docker_entrypoint_supervisor.py": 16,
+ "tests/test_doctor_i18n.py": 5,
+ "tests/test_event_loss_is_never_silent.py": 4,
+ "tests/test_fake_memory_provider.py": 2,
"tests/test_feishu_event_dispatcher.py": 1,
- "tests/test_feishu_hot_stop.py": 11,
+ "tests/test_feishu_hot_stop.py": 12,
"tests/test_feishu_post_messages.py": 2,
+ "tests/test_feishu_reaction_emoji.py": 3,
"tests/test_feishu_routing_card.py": 1,
- "tests/test_feishu_status_bubble_footer.py": 10,
- "tests/test_file_browser_backend.py": 3,
+ "tests/test_feishu_status_bubble_footer.py": 8,
+ "tests/test_file_browser_backend.py": 4,
"tests/test_file_search.py": 2,
- "tests/test_git_binary.py": 2,
+ "tests/test_git_binary.py": 1,
+ "tests/test_git_runtime.py": 2,
"tests/test_git_runtime_release_guard.py": 2,
- "tests/test_git_runtime.py": 1,
+ "tests/test_github_release.py": 2,
"tests/test_github_wait_common.py": 2,
- "tests/test_global_agents_md.py": 1,
- "tests/test_harness_definition_lifecycle.py": 17,
- "tests/test_harness_failure_visibility.py": 102,
- "tests/test_harness_health_projection.py": 5,
+ "tests/test_global_agents_md.py": 2,
+ "tests/test_harness_definition_lifecycle.py": 30,
+ "tests/test_harness_failure_visibility.py": 163,
+ "tests/test_harness_health_projection.py": 6,
+ "tests/test_harness_live_status.py": 7,
"tests/test_harness_payload_enrichment.py": 3,
"tests/test_harness_run_projection.py": 4,
"tests/test_harness_skill_guidance.py": 2,
"tests/test_i18n_backend_keys.py": 2,
- "tests/test_i18n_key_parity.py": 1,
+ "tests/test_i18n_key_parity.py": 2,
"tests/test_im_base_auth.py": 2,
- "tests/test_im_post_send_bookkeeping.py": 6,
+ "tests/test_im_post_send_bookkeeping.py": 11,
"tests/test_im_proxy_unification.py": 2,
- "tests/test_inbox_bridge.py": 2,
- "tests/test_inbox_events.py": 3,
- "tests/test_incus_regression_supervisor.py": 2,
- "tests/test_incus_regression.py": 2,
+ "tests/test_inbound_attachments.py": 3,
+ "tests/test_inbox_bridge.py": 1,
+ "tests/test_inbox_events.py": 5,
+ "tests/test_incus_regression.py": 3,
+ "tests/test_incus_regression_supervisor.py": 1,
"tests/test_incus_tenant_scaffold.py": 2,
- "tests/test_install_script.py": 3,
+ "tests/test_install_integrity.py": 2,
+ "tests/test_install_script.py": 4,
+ "tests/test_instance_authorization.py": 14,
"tests/test_internal_client.py": 2,
- "tests/test_internal_server.py": 24,
- "tests/test_local_deps.py": 11,
+ "tests/test_internal_client_timeouts.py": 3,
+ "tests/test_internal_server.py": 34,
+ "tests/test_latest_version_cache.py": 2,
+ "tests/test_local_deps.py": 17,
"tests/test_macos_session_diagnostics.py": 3,
- "tests/test_managed_runtime.py": 1,
+ "tests/test_managed_runtime.py": 6,
+ "tests/test_managed_runtime_composite_artifacts.py": 3,
+ "tests/test_managed_skills.py": 2,
+ "tests/test_memory_adapter.py": 4,
+ "tests/test_memory_admission.py": 5,
+ "tests/test_memory_artifact_contract.py": 1,
+ "tests/test_memory_attachments.py": 2,
+ "tests/test_memory_blocking.py": 3,
+ "tests/test_memory_cli.py": 3,
+ "tests/test_memory_config.py": 3,
+ "tests/test_memory_confined_filesystem.py": 5,
+ "tests/test_memory_disabled_isolation.py": 23,
+ "tests/test_memory_distribution.py": 2,
+ "tests/test_memory_everos.py": 3,
+ "tests/test_memory_im_attachments.py": 3,
+ "tests/test_memory_insight.py": 2,
+ "tests/test_memory_legacy_cleanup.py": 2,
+ "tests/test_memory_loader.py": 2,
+ "tests/test_memory_modality.py": 2,
+ "tests/test_memory_module.py": 2,
+ "tests/test_memory_native_processing_record.py": 2,
+ "tests/test_memory_operation_lock.py": 3,
+ "tests/test_memory_process.py": 2,
+ "tests/test_memory_processing_record.py": 2,
+ "tests/test_memory_project_ids.py": 2,
+ "tests/test_memory_provider_root.py": 2,
+ "tests/test_memory_python_compat.py": 2,
+ "tests/test_memory_recall_policy.py": 2,
+ "tests/test_memory_runtime.py": 3,
+ "tests/test_memory_runtime_factory.py": 3,
+ "tests/test_memory_runtime_release.py": 2,
+ "tests/test_memory_runtime_release_guard.py": 1,
+ "tests/test_memory_sidecar.py": 2,
+ "tests/test_memory_slice3.py": 9,
+ "tests/test_memory_store.py": 2,
+ "tests/test_memory_supervisor.py": 2,
+ "tests/test_memory_ui_access.py": 2,
+ "tests/test_memory_upgrade_packaged.py": 1,
+ "tests/test_memory_wake.py": 4,
+ "tests/test_memory_writer.py": 2,
"tests/test_message_context_helpers.py": 2,
- "tests/test_message_delivery_authority.py": 12,
+ "tests/test_message_delivery_authority.py": 17,
"tests/test_message_dispatcher_file_uploads.py": 3,
"tests/test_message_dispatcher_platform_limits.py": 2,
"tests/test_message_dispatcher_result_fallback.py": 2,
- "tests/test_message_dispatcher_scheduled.py": 7,
+ "tests/test_message_dispatcher_scheduled.py": 9,
"tests/test_message_dispatcher_status_bubble.py": 2,
- "tests/test_message_handler_attachments.py": 2,
+ "tests/test_message_handler_attachments.py": 3,
"tests/test_message_handler_auth_setup.py": 2,
- "tests/test_message_handler_harness_echo.py": 2,
- "tests/test_message_handler_missing_agent.py": 3,
+ "tests/test_message_handler_harness_echo.py": 3,
+ "tests/test_message_handler_missing_agent.py": 2,
"tests/test_message_handler_typing.py": 3,
"tests/test_message_handler_user_info.py": 2,
- "tests/test_message_mirror.py": 4,
+ "tests/test_message_mirror.py": 7,
"tests/test_message_priority_cutover.py": 2,
"tests/test_message_search.py": 4,
- "tests/test_message_type_catalog.py": 2,
+ "tests/test_message_type_catalog.py": 1,
"tests/test_message_type_python_consumers.py": 2,
- "tests/test_messages_service.py": 7,
- "tests/test_model_hub_api.py": 3,
- "tests/test_model_hub_config.py": 3,
+ "tests/test_messages_service.py": 8,
+ "tests/test_migration_lock.py": 4,
+ "tests/test_migration_release_guard.py": 3,
+ "tests/test_model_hub_api.py": 12,
+ "tests/test_model_hub_config.py": 27,
+ "tests/test_model_hub_engine_release_guard.py": 2,
"tests/test_model_hub_injection.py": 3,
- "tests/test_model_hub_l3.py": 3,
- "tests/test_model_hub_oauth.py": 2,
- "tests/test_model_hub_resolution.py": 3,
- "tests/test_model_hub_runtime.py": 6,
- "tests/test_multi_platform_runtime.py": 11,
- "tests/test_native_session_providers.py": 2,
+ "tests/test_model_hub_json_wire.py": 4,
+ "tests/test_model_hub_l3.py": 19,
+ "tests/test_model_hub_oauth.py": 3,
+ "tests/test_model_hub_reasoning_tiers.py": 3,
+ "tests/test_model_hub_resolution.py": 6,
+ "tests/test_model_hub_runtime.py": 10,
+ "tests/test_model_hub_structure_guards.py": 7,
+ "tests/test_model_hub_tool_names.py": 4,
+ "tests/test_model_hub_usage.py": 6,
+ "tests/test_model_service.py": 2,
+ "tests/test_models_dev_catalog.py": 2,
+ "tests/test_multi_platform_runtime.py": 16,
+ "tests/test_native_login_single_flight.py": 2,
+ "tests/test_native_login_structure_guards.py": 6,
+ "tests/test_native_session_providers.py": 4,
+ "tests/test_oauth_callback_diagnostics.py": 2,
"tests/test_opencode_caller_context.py": 2,
- "tests/test_opencode_client_manager.py": 1,
+ "tests/test_opencode_client_manager.py": 3,
"tests/test_opencode_config_reconciler.py": 2,
"tests/test_opencode_default_provider_routing.py": 3,
"tests/test_opencode_provider_base_url.py": 2,
"tests/test_opencode_provider_catalog_coercion.py": 2,
"tests/test_opencode_provider_keys_reader.py": 2,
- "tests/test_opencode_restore_polls.py": 3,
- "tests/test_opencode_server.py": 3,
- "tests/test_opencode_session_manager.py": 2,
+ "tests/test_opencode_reasoning_variants.py": 2,
+ "tests/test_opencode_restore_polls.py": 5,
+ "tests/test_opencode_server.py": 4,
+ "tests/test_opencode_session_manager.py": 3,
+ "tests/test_opencode_stop_receipt.py": 3,
"tests/test_origin_links.py": 2,
- "tests/test_pagination.py": 1,
+ "tests/test_pagination.py": 2,
+ "tests/test_permissions.py": 14,
"tests/test_platform_registry.py": 2,
- "tests/test_prepare_regression.py": 2,
- "tests/test_process_diagnostics.py": 1,
- "tests/test_process_isolation.py": 2,
+ "tests/test_prepare_regression.py": 1,
+ "tests/test_process_diagnostics.py": 2,
+ "tests/test_process_isolation.py": 3,
"tests/test_processing_indicator_reaction.py": 2,
+ "tests/test_project_access_service.py": 4,
+ "tests/test_project_access_sync.py": 3,
"tests/test_project_agents_md.py": 2,
"tests/test_projects_service.py": 4,
+ "tests/test_prompt_studio_catalog.py": 2,
"tests/test_pypi_shim.py": 2,
- "tests/test_queued_message_writer_policy.py": 3,
- "tests/test_read_only_query_vault_denylist.py": 2,
+ "tests/test_queued_message_writer_policy.py": 5,
"tests/test_read_only_query.py": 2,
+ "tests/test_read_only_query_vault_denylist.py": 1,
"tests/test_regression_script.py": 2,
- "tests/test_remote_access_vibe_cloud.py": 6,
- "tests/test_reply_enhancer_platform.py": 2,
+ "tests/test_release_package_version.py": 2,
+ "tests/test_remote_access_vibe_cloud.py": 14,
+ "tests/test_remote_authorization_revision.py": 36,
+ "tests/test_remote_resource_acl_sync.py": 7,
+ "tests/test_reply_enhancer_platform.py": 12,
"tests/test_reply_enhancer_secret_requests.py": 2,
- "tests/test_reserved_native_session_id.py": 2,
+ "tests/test_reserved_native_session_id.py": 3,
+ "tests/test_resource_access_service.py": 33,
+ "tests/test_resource_acl_agents.py": 9,
+ "tests/test_resource_acl_show_pages.py": 8,
+ "tests/test_resource_acl_vaults.py": 5,
"tests/test_resource_governance.py": 2,
"tests/test_restart_supervisor.py": 2,
"tests/test_result_message_token_field.py": 2,
"tests/test_resume_session.py": 3,
"tests/test_routing_modal_selection.py": 2,
- "tests/test_running_agents_service.py": 2,
+ "tests/test_running_agents_service.py": 3,
"tests/test_runtime_activation.py": 3,
"tests/test_runtime_commands.py": 2,
"tests/test_runtime_log_sink.py": 3,
- "tests/test_runtime_ownership.py": 8,
- "tests/test_runtime_recovery.py": 4,
+ "tests/test_runtime_ownership.py": 9,
+ "tests/test_runtime_recovery.py": 5,
"tests/test_runtime_scope_bootstrap.py": 2,
- "tests/test_runtime_service_lock.py": 2,
+ "tests/test_runtime_service_lock.py": 5,
"tests/test_runtime_work_supervisor.py": 2,
- "tests/test_save_opencode_provider_auth.py": 12,
- "tests/test_scheduled_command_task_integration.py": 5,
- "tests/test_scheduled_tasks.py": 131,
- "tests/test_sentry_integration.py": 3,
+ "tests/test_save_opencode_provider_auth.py": 13,
+ "tests/test_scheduled_command_task_integration.py": 7,
+ "tests/test_scheduled_tasks.py": 171,
+ "tests/test_sentry_integration.py": 4,
"tests/test_service_logging_handlers.py": 3,
- "tests/test_session_activities.py": 5,
- "tests/test_session_archive.py": 4,
- "tests/test_session_cli.py": 7,
- "tests/test_session_delivery_fsm.py": 21,
- "tests/test_session_fork.py": 15,
- "tests/test_session_handler_base_id.py": 2,
+ "tests/test_service_readiness.py": 7,
+ "tests/test_session_activities.py": 7,
+ "tests/test_session_archive.py": 5,
+ "tests/test_session_cli.py": 8,
+ "tests/test_session_delivery_fsm.py": 30,
+ "tests/test_session_fork.py": 32,
+ "tests/test_session_handler_base_id.py": 3,
"tests/test_session_route_writer_policy.py": 2,
- "tests/test_session_titles.py": 2,
+ "tests/test_session_titles.py": 3,
"tests/test_settings_disk_fallback.py": 4,
- "tests/test_settings_handler.py": 2,
- "tests/test_show_git_turn_entrypoints.py": 3,
+ "tests/test_settings_handler.py": 3,
"tests/test_show_git.py": 4,
+ "tests/test_show_git_turn_entrypoints.py": 3,
+ "tests/test_show_identity.py": 3,
+ "tests/test_show_page_legacy_ui_removed.py": 2,
+ "tests/test_show_pages.py": 20,
"tests/test_show_pages_admin_api.py": 4,
- "tests/test_show_pages.py": 10,
- "tests/test_show_runtime_manifest_packaging.py": 1,
- "tests/test_show_runtime_manifest.py": 2,
+ "tests/test_show_runtime_archive_cleanup.py": 4,
+ "tests/test_show_runtime_manifest.py": 1,
+ "tests/test_show_runtime_manifest_packaging.py": 2,
"tests/test_show_runtime_orphan_sweep.py": 2,
+ "tests/test_show_runtime_protocol.py": 2,
"tests/test_show_session_events.py": 7,
- "tests/test_skills_service.py": 2,
- "tests/test_slack_app_mention_empty.py": 1,
- "tests/test_slack_dm_mentions.py": 2,
+ "tests/test_skill_cli.py": 1,
+ "tests/test_skills_service.py": 6,
+ "tests/test_slack_app_mention_empty.py": 2,
+ "tests/test_slack_dm_mentions.py": 3,
"tests/test_slack_markdown_footer.py": 2,
- "tests/test_sqlite_sessions_store.py": 29,
- "tests/test_sqlite_settings_store.py": 20,
- "tests/test_sqlite_state_migration.py": 36,
+ "tests/test_sqlite_sessions_store.py": 38,
+ "tests/test_sqlite_settings_store.py": 26,
+ "tests/test_sqlite_state_migration.py": 108,
"tests/test_sqlite_state_startup.py": 2,
- "tests/test_sse_broker.py": 2,
- "tests/test_state_backups.py": 5,
+ "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": 3,
- "tests/test_status_bubble_settings.py": 2,
+ "tests/test_status_bubble_settings.py": 3,
"tests/test_subagent_router.py": 2,
- "tests/test_telegram_bot.py": 9,
+ "tests/test_telegram_attachment_download.py": 2,
+ "tests/test_telegram_bot.py": 12,
"tests/test_telegram_formatter.py": 2,
"tests/test_telegram_proxy.py": 2,
- "tests/test_terminal_backend.py": 2,
- "tests/test_test_failure_classifier.py": 3,
- "tests/test_tmux_runtime.py": 1,
+ "tests/test_terminal_backend.py": 5,
+ "tests/test_test_failure_classifier.py": 2,
+ "tests/test_tmux_runtime.py": 2,
"tests/test_tunnel_quality.py": 2,
- "tests/test_tunnel_recovery.py": 4,
- "tests/test_ui_api.py": 24,
- "tests/test_ui_server_fastapi.py": 15,
+ "tests/test_tunnel_recovery.py": 5,
+ "tests/test_turn_terminal_reaction.py": 2,
+ "tests/test_ui_api.py": 18,
+ "tests/test_ui_memory_routes.py": 4,
+ "tests/test_ui_project_access.py": 8,
+ "tests/test_ui_server_fastapi.py": 21,
"tests/test_ui_server_install.py": 3,
- "tests/test_ui_server_logs.py": 3,
- "tests/test_ui_server_mutation_protection.py": 8,
+ "tests/test_ui_server_logs.py": 4,
+ "tests/test_ui_server_mutation_protection.py": 9,
"tests/test_ui_server_reload.py": 3,
"tests/test_ui_server_skills_routes.py": 3,
- "tests/test_ui_server_voice_telemetry.py": 2,
- "tests/test_ui_server_voice_transcription.py": 2,
- "tests/test_ui_session_stream.py": 9,
- "tests/test_ui_show_pages.py": 289,
- "tests/test_update_checker_platforms.py": 29,
- "tests/test_upgrade_flow.py": 2,
- "tests/test_user_platform_scope.py": 4,
- "tests/test_v2_compat_platforms.py": 2,
+ "tests/test_ui_server_voice_telemetry.py": 3,
+ "tests/test_ui_server_voice_transcription.py": 3,
+ "tests/test_ui_session_stream.py": 12,
+ "tests/test_ui_show_pages.py": 47,
+ "tests/test_update_checker_platforms.py": 39,
+ "tests/test_upgrade_flow.py": 18,
+ "tests/test_user_platform_scope.py": 6,
+ "tests/test_v2_compat_platforms.py": 3,
"tests/test_v2_config_platform_registry.py": 2,
"tests/test_v2_paths.py": 2,
- "tests/test_v2_sessions.py": 10,
- "tests/test_vault_addresses.py": 1,
- "tests/test_vault_api.py": 82,
- "tests/test_vault_cli.py": 65,
- "tests/test_vault_crypto.py": 2,
- "tests/test_vault_export_inject.py": 11,
- "tests/test_vault_fetch.py": 16,
+ "tests/test_v2_sessions.py": 13,
+ "tests/test_vault_addresses.py": 2,
+ "tests/test_vault_api.py": 16,
+ "tests/test_vault_cli.py": 15,
+ "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": 2,
- "tests/test_vault_request_callbacks.py": 4,
+ "tests/test_vault_request_callbacks.py": 6,
"tests/test_vault_request_im_notifications.py": 3,
- "tests/test_vault_rest.py": 9,
+ "tests/test_vault_rest.py": 5,
"tests/test_vault_schema.py": 2,
- "tests/test_vault_service.py": 5,
- "tests/test_version_identity.py": 2,
- "tests/test_vibe_agent_archive.py": 23,
- "tests/test_vibe_agent_model_prefill.py": 6,
- "tests/test_vibe_cli.py": 4,
- "tests/test_wait_for_github_action_runs.py": 1,
- "tests/test_wait_for_github_issue_activity.py": 2,
+ "tests/test_vault_service.py": 6,
+ "tests/test_version_identity.py": 3,
+ "tests/test_vibe_agent_archive.py": 47,
+ "tests/test_vibe_agent_model_prefill.py": 7,
+ "tests/test_vibe_cli.py": 7,
+ "tests/test_wait_for_github_action_runs.py": 2,
+ "tests/test_wait_for_github_issue_activity.py": 1,
"tests/test_wait_for_github_pr_activity.py": 2,
"tests/test_watch_worker.py": 3,
- "tests/test_watches.py": 28,
- "tests/test_web_oauth_flow.py": 2,
- "tests/test_web_push_notifications.py": 3,
- "tests/test_web_push_service.py": 5,
- "tests/test_wechat_auth.py": 3,
+ "tests/test_watches.py": 12,
+ "tests/test_web_oauth_flow.py": 3,
+ "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": 4,
"tests/test_wechat_bot.py": 4,
"tests/test_wechat_cdn.py": 2,
- "tests/test_workbench_media.py": 6,
- "tests/test_workbench_only_runtime.py": 4,
- "tests/test_workbench_prefs_api.py": 4,
- "tests/test_workbench_session_defaults.py": 3,
+ "tests/test_workbench_media.py": 13,
+ "tests/test_workbench_only_runtime.py": 6,
+ "tests/test_workbench_prefs_api.py": 3,
+ "tests/test_workbench_session_defaults.py": 4,
"tests/test_workspace_system_session.py": 4
}
}
diff --git a/tests/test_ci_pipeline.py b/tests/test_ci_pipeline.py
new file mode 100644
index 000000000..fe6869772
--- /dev/null
+++ b/tests/test_ci_pipeline.py
@@ -0,0 +1,63 @@
+from __future__ import annotations
+
+import itertools
+import os
+from pathlib import Path
+import subprocess
+
+import yaml
+
+
+ROOT = Path(__file__).resolve().parents[1]
+
+
+def _jobs() -> dict:
+ return yaml.safe_load((ROOT / ".github/workflows/lint.yml").read_text())["jobs"]
+
+
+def test_ui_checks_run_once_without_fencing_artifact_consumers() -> None:
+ jobs = _jobs()
+ checks = jobs["ui-checks"]
+ build = jobs["build-linux-artifacts"]
+ assert not checks.get("needs")
+ assert not build.get("needs")
+ assert "ui-checks" in jobs["unit-tests"]["needs"]
+ assert "unit-test-shards" in jobs["unit-tests"]["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"]
+ assert all(step.get("working-directory") == "ui" for step in check_steps)
+ check_commands = "\n".join(step["run"] for step in check_steps).splitlines()
+ build_commands = "\n".join(step["run"] for step in build_steps).splitlines()
+ for command in ("npm run validate:theme", "npm run lint", "npm run typecheck:tests", "npm test"):
+ assert check_commands.count(command) == 1
+ assert command not in build_commands
+ assert build_commands.count("npm run build") == 1
+ assert "npm ci" in check_commands
+ assert "npm ci" in build_commands
+ for job in (checks, 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"])
+ for name in ("install-upgrade-regression", "windows-install-smoke"):
+ assert jobs[name]["needs"] == "build-linux-artifacts"
+
+
+def test_existing_required_gate_fails_unless_every_dependency_succeeded(tmp_path: Path) -> None:
+ gate = _jobs()["unit-tests"]
+ assert gate["if"] == "always()"
+ step, = gate["steps"]
+ assert step["env"] == {
+ "UNIT_RESULT": "${{ needs['unit-test-shards'].result }}",
+ "UI_RESULT": "${{ needs['ui-checks'].result }}",
+ }
+ for results in itertools.product(("success", "failure", "cancelled", "skipped", ""), repeat=2):
+ result = subprocess.run(
+ ["bash", "-e", "-c", step["run"]],
+ cwd=tmp_path,
+ env={**os.environ, **dict(zip(step["env"], results))},
+ capture_output=True,
+ text=True,
+ check=False,
+ )
+ assert (result.returncode == 0) == all(value == "success" for value in results), result.stdout
diff --git a/tests/test_ci_unit_test_shards.py b/tests/test_ci_unit_test_shards.py
index 82df57474..a456b616b 100644
--- a/tests/test_ci_unit_test_shards.py
+++ b/tests/test_ci_unit_test_shards.py
@@ -4,7 +4,7 @@ from pathlib import Path
import pytest
-from scripts.ci_unit_test_shards import load_timings, plan_shards
+from scripts.ci_unit_test_shards import discover_unit_test_files, load_timings, plan_shards
def _test_file(root: Path, name: str, *, tests: int = 1, lines: int = 1) -> Path:
@@ -54,3 +54,10 @@ def test_load_timings_ignores_malformed_values(tmp_path: Path) -> None:
def test_plan_shards_rejects_invalid_shard_total(tmp_path: Path, shard_total: int) -> None:
with pytest.raises(ValueError, match="shard_total"):
plan_shards([_test_file(tmp_path, "test_one.py")], shard_total)
+
+
+def test_measured_plan_runs_every_discovered_file_exactly_once() -> None:
+ files = discover_unit_test_files()
+ shards = plan_shards(files, 6, load_timings())
+
+ assert sorted(path for _, selected in shards for path in selected) == files
diff --git a/tests/test_memory_upgrade_packaged.py b/tests/test_memory_upgrade_packaged.py
index 53ffb2e68..4469def13 100644
--- a/tests/test_memory_upgrade_packaged.py
+++ b/tests/test_memory_upgrade_packaged.py
@@ -63,11 +63,19 @@ def _venv(path: Path) -> Path:
@pytest.fixture(scope="module")
-def packaged_dependency_seed(tmp_path_factory: pytest.TempPathFactory) -> Path:
+def packaged_release_wheels(tmp_path_factory: pytest.TempPathFactory) -> Path:
+ wheelhouse = tmp_path_factory.mktemp("packaged-release-wheels")
+ for version in ("3.0.14", "3.0.15"):
+ _build_release_wheels(version, wheelhouse)
+ return wheelhouse
+
+
[email protected](scope="module")
+def packaged_dependency_seed(
+ tmp_path_factory: pytest.TempPathFactory, packaged_release_wheels: Path
+) -> Path:
seed_root = tmp_path_factory.mktemp("packaged-dependency-seed")
- source_wheelhouse = seed_root / "source"
- source_wheelhouse.mkdir()
- _build_release_wheels("3.0.14", source_wheelhouse)
+ source_wheelhouse = packaged_release_wheels
dependency_seed = seed_root / "dependencies"
dependency_seed.mkdir()
seed = subprocess.run(
@@ -93,6 +101,28 @@ def packaged_dependency_seed(tmp_path_factory: pytest.TempPathFactory) -> Path:
return dependency_seed
+def wheelhouse(tmp_path: Path, packaged_release_wheels: Path) -> Path:
+ # Builds are immutable inputs; removals and installs stay local to each case.
+ return Path(shutil.copytree(packaged_release_wheels, tmp_path / "wheelhouse"))
+
+
+def test_wheelhouse_mutations_do_not_change_shared_builds_or_other_cases(tmp_path: Path) -> None:
+ shared = tmp_path / "shared"
+ shared.mkdir()
+ for name in ("avibe_os-3.0.14.whl", "avibe_memory-3.0.14.whl", "future-package.whl"):
+ (shared / name).write_bytes(name.encode())
+ before = {path.name: path.read_bytes() for path in shared.iterdir()}
+ first = wheelhouse.__wrapped__(tmp_path / "first", shared)
+ second = wheelhouse.__wrapped__(tmp_path / "second", shared)
+ for path in first.iterdir():
+ path.write_bytes(b"changed")
+ path.unlink()
+
+ assert {path.name: path.read_bytes() for path in shared.iterdir()} == before
+ assert {path.name: path.read_bytes() for path in second.iterdir()} == before
+
+
def _install_initial(python: Path, wheelhouse: Path, *, memory: bool, dependency_seed: Path) -> None:
for artifact in dependency_seed.iterdir():
if artifact.name.lower().startswith(("avibe_os-", "avibe_memory-")):
@@ -124,10 +154,8 @@ def _plan_env(wheelhouse: Path) -> dict[str, str]:
def test_memory_indep_021_packaged_core_only_status_blocks_optional_imports(
tmp_path: Path,
packaged_dependency_seed: Path,
+ wheelhouse: Path,
) -> None:
- wheelhouse = tmp_path / "wheelhouse"
- wheelhouse.mkdir()
- _build_release_wheels("3.0.14", wheelhouse)
python = _venv(tmp_path / "core-only-status-venv")
_install_initial(
python,
@@ -192,17 +220,13 @@ assert not any(
def test_packaged_memory_shape_survives_synchronous_upgrade(
tmp_path: Path,
packaged_dependency_seed: Path,
+ wheelhouse: Path,
) -> None:
"""Run the public planner and executor across a paired package upgrade."""
if not (ROOT / "vibe" / "show_runtime_manifest.json").is_file():
pytest.fail("packaged wheel smoke requires the prepared local Show Runtime manifest")
- wheelhouse = tmp_path / "wheelhouse"
- wheelhouse.mkdir()
- for version in ("3.0.14", "3.0.15"):
- _build_release_wheels(version, wheelhouse)
-
environment = tmp_path / "memory-venv"
python = _venv(environment)
_install_initial(python, wheelhouse, memory=True, dependency_seed=packaged_dependency_seed)
@@ -229,12 +253,8 @@ def test_packaged_memory_shape_survives_synchronous_upgrade(
@pytest.mark.integration
def test_packaged_core_only_upgrade_preserves_core_only_shape(
- tmp_path: Path, packaged_dependency_seed: Path
+ tmp_path: Path, packaged_dependency_seed: Path, wheelhouse: Path
) -> None:
- wheelhouse = tmp_path / "wheelhouse"
- wheelhouse.mkdir()
- for version in ("3.0.14", "3.0.15"):
- _build_release_wheels(version, wheelhouse)
python = _venv(tmp_path / "core-only-venv")
_install_initial(python, wheelhouse, memory=False, dependency_seed=packaged_dependency_seed)
plan = build_upgrade_plan(
@@ -252,11 +272,9 @@ def test_packaged_core_only_upgrade_preserves_core_only_shape(
@pytest.mark.integration
-def test_packaged_missing_memory_fails_before_install(tmp_path: Path, packaged_dependency_seed: Path) -> None:
- wheelhouse = tmp_path / "wheelhouse"
- wheelhouse.mkdir()
- _build_release_wheels("3.0.14", wheelhouse)
- _build_release_wheels("3.0.15", wheelhouse)
+def test_packaged_missing_memory_fails_before_install(
+ tmp_path: Path, packaged_dependency_seed: Path, wheelhouse: Path
+) -> None:
python = _venv(tmp_path / "missing-memory-venv")
_install_initial(python, wheelhouse, memory=True, dependency_seed=packaged_dependency_seed)
for wheel in wheelhouse.glob("avibe_memory-*.whl"):