From 5bb4da91ea5d9d898c82c129fd53f9a258f2fce6 Mon Sep 17 00:00:00 2001 From: Xinmin Zeng <135568692+fancyboi999@users.noreply.github.com> Date: Thu, 19 Nov 2026 18:27:23 -0800 Subject: [PATCH] ci(tests): isolate offline benchmark suites into path-triggered workflow (#8414) --- .github/workflows/backend-benchmark-tests.yml | 86 +++++ backend/.test_durations | 355 ------------------ backend/Makefile | 18 +- backend/pyproject.toml | 1 + backend/tests/AGENTS.md | 9 + .../tests/test_bench_checkpoint_channels.py | 2 + .../tests/test_bench_checkpoint_production.py | 2 + backend/tests/test_bench_concurrency.py | 4 + .../test_bench_context_memory_comparison.py | 2 + backend/tests/test_bench_context_snapshot.py | 2 + backend/tests/test_bench_deermem_eviction.py | 2 + .../test_bench_deermem_scope_isolation.py | 2 + backend/tests/test_bench_opensandbox.py | 2 + backend/tests/test_bench_sandbox_prewarm.py | 2 + backend/tests/test_bench_sandbox_provider.py | 2 + backend/tests/test_bench_sandbox_resources.py | 2 + .../test_bench_scheduled_budget_evidence.py | 2 + backend/tests/test_bench_scheduled_tasks.py | 2 + .../test_bench_tool_result_probe_cleanup.py | 2 + backend/tests/test_bench_worker.py | 4 + backend/tests/test_benchmark_ci.py | 99 +++++ backend/tests/test_bundled_extension_ci.py | 2 +- backend/tests/test_client_live_policy.py | 6 +- backend/tests/test_make_test_parallel.py | 2 +- 24 files changed, 246 insertions(+), 366 deletions(-) create mode 100644 .github/workflows/backend-benchmark-tests.yml create mode 100644 backend/tests/test_benchmark_ci.py diff --git a/.github/workflows/backend-benchmark-tests.yml b/.github/workflows/backend-benchmark-tests.yml new file mode 100644 index 0000000000..94bfc350d4 --- /dev/null +++ b/.github/workflows/backend-benchmark-tests.yml @@ -0,0 +1,86 @@ +name: Backend Benchmark Tests + +# Offline benchmark script suites (`backend/tests/test_bench_*.py`) carry the +# `benchmark` marker. Core backend shards exclude them so benchmark harness +# tests do not inflate unrelated PRs; this workflow runs them whenever benchmark +# scripts, benchmark tests, or shared test infrastructure change. +# +# `test_benchmark_ci.py` keeps the marker registration, Makefile targets, and +# trigger paths in sync. + +on: + pull_request: + types: [opened, synchronize, reopened, ready_for_review] + paths: + - 'backend/scripts/benchmark/**' + - 'backend/tests/conftest.py' + - 'backend/tests/support/**' + - 'backend/tests/test_bench_*.py' + - 'backend/tests/test_benchmark_ci.py' + - 'backend/pyproject.toml' + - 'backend/uv.lock' + - 'backend/Makefile' + - '.github/workflows/backend-benchmark-tests.yml' + push: + branches: [main, "*-dev"] + paths: + - 'backend/scripts/benchmark/**' + - 'backend/tests/conftest.py' + - 'backend/tests/support/**' + - 'backend/tests/test_bench_*.py' + - 'backend/tests/test_benchmark_ci.py' + - 'backend/pyproject.toml' + - 'backend/uv.lock' + - 'backend/Makefile' + - '.github/workflows/backend-benchmark-tests.yml' + +permissions: + contents: read + +concurrency: + group: backend-benchmark-tests-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + backend-benchmark-tests: + if: github.event_name != 'pull_request' || github.event.pull_request.draft == false + runs-on: ubuntu-latest + timeout-minutes: 10 + + services: + postgres: + image: postgres:17 + env: + POSTGRES_USER: deerflow + POSTGRES_PASSWORD: deerflow + POSTGRES_DB: deerflow_test + ports: + - 5432:5432 + options: >- + --health-cmd pg_isready + --health-interval 10s + --health-timeout 5s + --health-retries 5 + + env: + TEST_POSTGRES_URI: postgresql://deerflow:deerflow@localhost:5432/deerflow_test?sslmode=disable + + steps: + - uses: actions/checkout@v6 + + - uses: actions/setup-python@v6 + with: + python-version: '3.12' + + - uses: astral-sh/setup-uv@v7 + with: + # Must match backend/Dockerfile's UV_IMAGE tag; pinned by backend/tests/test_ci_uv_version_pin.py + version: "0.11.1" + + - name: Install backend dependencies + working-directory: backend + run: uv sync --group dev --extra postgres + + - name: Run offline benchmark script tests + working-directory: backend + run: make test-benchmark diff --git a/backend/.test_durations b/backend/.test_durations index 54c688d9ba..8551f0d142 100644 --- a/backend/.test_durations +++ b/backend/.test_durations @@ -3393,361 +3393,6 @@ "tests/test_batch_task_tool.py::test_bound_batch_tools_use_the_explicit_submitter": 0.0021061639999970794, "tests/test_batch_task_tool.py::test_cancel_batch_keeps_the_existing_submitter_signature": 0.0012598150000826536, "tests/test_batch_task_tool.py::test_followup_captures_configurable_settings_with_context_precedence": 0.0019488290000140296, - "tests/test_bench_checkpoint_channels.py::test_case_rejects_non_positive_snapshot_frequency": 0.0008456469999487126, - "tests/test_bench_checkpoint_channels.py::test_controller_writes_versioned_jsonl_without_sensitive_case_paths": 0.003194856999982676, - "tests/test_bench_checkpoint_channels.py::test_cross_mode_validation_rejects_materialized_state_mismatch": 0.00095190799993361, - "tests/test_bench_checkpoint_channels.py::test_deterministic_message_has_exact_payload_bytes_and_stable_identity": 0.0007578119999607225, - "tests/test_bench_checkpoint_channels.py::test_expand_cases_alternates_modes_without_cross_product_reordering": 0.0007855739999627076, - "tests/test_bench_checkpoint_channels.py::test_expand_cases_sweeps_delta_frequencies_without_duplicating_full_cases": 0.0008187060000750535, - "tests/test_bench_checkpoint_channels.py::test_help_explains_delta_only_runs_bypass_full_payload_cap": 0.0024871499999790103, - "tests/test_bench_checkpoint_channels.py::test_memory_case_keeps_timings_when_private_storage_stats_change": 1.0548500740000009, - "tests/test_bench_checkpoint_channels.py::test_memory_smoke_case_materializes_at_low_snapshot_frequency": 1.2980689690000418, - "tests/test_bench_checkpoint_channels.py::test_memory_smoke_case_materializes_expected_state[delta]": 1.0696976200000563, - "tests/test_bench_checkpoint_channels.py::test_memory_smoke_case_materializes_expected_state[full]": 1.0683964489999767, - "tests/test_bench_checkpoint_channels.py::test_oversized_filter_applies_full_cap_to_every_swept_delta_cadence": 0.0007670300000199859, - "tests/test_bench_checkpoint_channels.py::test_oversized_filter_does_not_suppress_a_delta_only_diagnostic": 0.000744908999990912, - "tests/test_bench_checkpoint_channels.py::test_oversized_filter_skips_full_and_delta_as_a_comparable_pair": 0.0007681030000412647, - "tests/test_bench_checkpoint_channels.py::test_parse_choice_csv_reports_duplicate_values": 0.0009782349999909457, - "tests/test_bench_checkpoint_channels.py::test_parse_positive_int_csv_deduplicates_in_input_order": 0.0011376950000681063, - "tests/test_bench_checkpoint_channels.py::test_parse_positive_int_csv_rejects_invalid_values[-1]": 0.0008292469999560126, - "tests/test_bench_checkpoint_channels.py::test_parse_positive_int_csv_rejects_invalid_values[0]": 0.0008654559999854428, - "tests/test_bench_checkpoint_channels.py::test_parse_positive_int_csv_rejects_invalid_values[1,,2]": 0.0008166839999717013, - "tests/test_bench_checkpoint_channels.py::test_parse_positive_int_csv_rejects_invalid_values[]": 0.0009200970000051711, - "tests/test_bench_checkpoint_channels.py::test_parse_positive_int_csv_rejects_invalid_values[one]": 0.0008023969999726432, - "tests/test_bench_checkpoint_channels.py::test_postgres_backend_requires_explicit_connection_uri": 0.0037292809999485144, - "tests/test_bench_checkpoint_channels.py::test_postgres_failure_does_not_expose_connection_uri": 0.005397792999985995, - "tests/test_bench_checkpoint_channels.py::test_postgres_smoke_case_reports_normalized_storage[asyncio]": 1.4065971720000334, - "tests/test_bench_checkpoint_channels.py::test_postgres_storage_stats_normalize_checkpoint_tables[asyncio]": 0.0015444690000094852, - "tests/test_bench_checkpoint_channels.py::test_profiled_case_writes_loadable_stats": 1.0859909420000236, - "tests/test_bench_checkpoint_channels.py::test_shared_backend_thread_ids_are_case_scoped_and_stable": 0.0007702959999846826, - "tests/test_bench_checkpoint_channels.py::test_sqlite_smoke_case_reports_durable_and_logical_storage[delta]": 1.078647430999979, - "tests/test_bench_checkpoint_channels.py::test_sqlite_smoke_case_reports_durable_and_logical_storage[full]": 1.0860697599999867, - "tests/test_bench_checkpoint_production.py::test_case_rejects_frequency_on_full_mode": 0.0008175639999876694, - "tests/test_bench_checkpoint_production.py::test_case_rejects_nonpositive_turns": 0.0009244360000479901, - "tests/test_bench_checkpoint_production.py::test_case_rejects_turns_consumed_by_warmup[1]": 0.0009143760000256407, - "tests/test_bench_checkpoint_production.py::test_case_rejects_turns_consumed_by_warmup[2]": 0.0008605560000205514, - "tests/test_bench_checkpoint_production.py::test_cross_mode_digest_gate_fails_both_rows_on_mismatch": 0.0008046699999795237, - "tests/test_bench_checkpoint_production.py::test_cross_mode_gate_tolerates_missing_pair": 0.0007504390000008243, - "tests/test_bench_checkpoint_production.py::test_expand_cases_alternates_mode_order": 0.0008703940000600596, - "tests/test_bench_checkpoint_production.py::test_expand_cases_sweeps_frequency_for_delta_only": 0.0010035839999886775, - "tests/test_bench_checkpoint_production.py::test_merged_busy_ms_unions_overlapping_intervals": 0.0011337890000504558, - "tests/test_bench_checkpoint_production.py::test_run_case_fails_when_warm_cache_is_not_hit": 0.4968907780000791, - "tests/test_bench_checkpoint_production.py::test_run_case_succeeds_end_to_end_small[delta-10]": 0.45318308600008095, - "tests/test_bench_checkpoint_production.py::test_run_case_succeeds_end_to_end_small[full-None]": 0.4535194070001012, - "tests/test_bench_checkpoint_production.py::test_scripted_model_is_deterministic_across_instances": 0.0024215969999659137, - "tests/test_bench_checkpoint_production.py::test_timing_saver_records_cumulative_ms": 0.001308467000001201, - "tests/test_bench_concurrency.py::test_summarize_counts_completed_ops_across_workers": 0.0008231759999262067, - "tests/test_bench_concurrency.py::test_summarize_groups_errors_by_exception_type": 0.00083881399996244, - "tests/test_bench_concurrency.py::test_summarize_handles_empty_results_without_crashing": 0.0007634429999257009, - "tests/test_bench_concurrency.py::test_summarize_percentiles_are_monotonic_and_within_observed_range": 0.0008422319999112915, - "tests/test_bench_concurrency.py::test_summarize_percentiles_match_hand_computed_nearest_rank_values": 0.0007948310000074343, - "tests/test_bench_concurrency.py::test_summarize_percentiles_match_hand_computed_values_at_documented_sample_size": 0.0008264399999688976, - "tests/test_bench_concurrency.py::test_summarize_separates_crashed_workers_from_completed_ops": 0.0008181250000234286, - "tests/test_bench_concurrency.py::test_summarize_surfaces_crashed_worker_diagnostics_not_just_a_count": 0.0007815870000058567, - "tests/test_bench_concurrency.py::test_summarize_throughput_uses_slowest_worker_operation_window": 0.0007688329999950838, - "tests/test_bench_concurrency.py::test_summary_indicates_failure_for_an_all_crashed_sweep": 0.0007554090000780889, - "tests/test_bench_concurrency.py::test_summary_indicates_failure_is_false_for_a_clean_run": 0.0007743439999785551, - "tests/test_bench_concurrency.py::test_summary_indicates_failure_when_completed_ops_falls_short_without_a_crash": 0.0007606880000139427, - "tests/test_bench_concurrency.py::test_summary_indicates_failure_when_every_op_errored_without_a_crash": 0.0007918270000573102, - "tests/test_bench_context_memory_comparison.py::test_offline_cli_records_real_gateway_context": 10.486445236999998, - "tests/test_bench_context_memory_comparison.py::test_scope_isolation_requires_a_scope_rejection[extraction_error]": 9.817026444000021, - "tests/test_bench_context_memory_comparison.py::test_scope_isolation_requires_a_scope_rejection[no_scope_rejection]": 10.186802860999933, - "tests/test_bench_context_snapshot.py::test_capped_artifact_is_not_normal_completion_and_stays_in_costs": 0.0008575200000109362, - "tests/test_bench_context_snapshot.py::test_config_rejects_credentials_instead_of_recording_them": 0.00776152900004945, - "tests/test_bench_context_snapshot.py::test_grader_detects_boolean_numeric_input_mutation[False]": 0.04303194899995333, - "tests/test_bench_context_snapshot.py::test_grader_detects_boolean_numeric_input_mutation[True]": 0.043251820999955726, - "tests/test_bench_context_snapshot.py::test_grader_preserves_valid_booleans_and_numeric_equality[0-0-json]": 0.001059508000025744, - "tests/test_bench_context_snapshot.py::test_grader_preserves_valid_booleans_and_numeric_equality[0-0-python]": 0.04365012100004151, - "tests/test_bench_context_snapshot.py::test_grader_preserves_valid_booleans_and_numeric_equality[1.0-1-json]": 0.0010417039999879307, - "tests/test_bench_context_snapshot.py::test_grader_preserves_valid_booleans_and_numeric_equality[1.0-1-python]": 0.043616656000040166, - "tests/test_bench_context_snapshot.py::test_grader_preserves_valid_booleans_and_numeric_equality[False-False-json]": 0.001005137999982253, - "tests/test_bench_context_snapshot.py::test_grader_preserves_valid_booleans_and_numeric_equality[False-False-python]": 0.04403494200005298, - "tests/test_bench_context_snapshot.py::test_grader_preserves_valid_booleans_and_numeric_equality[True-True-json]": 0.0010182819999613457, - "tests/test_bench_context_snapshot.py::test_grader_preserves_valid_booleans_and_numeric_equality[True-True-python]": 0.04478476000002729, - "tests/test_bench_context_snapshot.py::test_grader_preserves_valid_booleans_and_numeric_equality[actual4-expected4-json]": 0.0009925329999873611, - "tests/test_bench_context_snapshot.py::test_grader_preserves_valid_booleans_and_numeric_equality[actual4-expected4-python]": 0.04326066800001627, - "tests/test_bench_context_snapshot.py::test_grader_rejects_boolean_numeric_substitutions[False-0-json]": 0.0010677129999976387, - "tests/test_bench_context_snapshot.py::test_grader_rejects_boolean_numeric_substitutions[False-0-python]": 0.04305929899999228, - "tests/test_bench_context_snapshot.py::test_grader_rejects_boolean_numeric_substitutions[True-1-json]": 0.0010059590000537355, - "tests/test_bench_context_snapshot.py::test_grader_rejects_boolean_numeric_substitutions[True-1-python]": 0.04365028900002699, - "tests/test_bench_context_snapshot.py::test_grader_rejects_boolean_numeric_substitutions[actual2-expected2-json]": 0.001033220000010715, - "tests/test_bench_context_snapshot.py::test_grader_rejects_boolean_numeric_substitutions[actual2-expected2-python]": 0.04340911600002073, - "tests/test_bench_context_snapshot.py::test_grader_rejects_boolean_numeric_substitutions[actual3-expected3-json]": 0.0010163589999478972, - "tests/test_bench_context_snapshot.py::test_grader_rejects_boolean_numeric_substitutions[actual3-expected3-python]": 0.04334961300003215, - "tests/test_bench_context_snapshot.py::test_grader_rejects_boolean_numeric_substitutions[actual4-expected4-json]": 0.0010358240000414298, - "tests/test_bench_context_snapshot.py::test_grader_rejects_boolean_numeric_substitutions[actual4-expected4-python]": 0.04338771499999439, - "tests/test_bench_context_snapshot.py::test_invoice_grader_allows_divmod_and_detects_rounding_errors": 0.13103807000004508, - "tests/test_bench_context_snapshot.py::test_json_grader_rejects_nonobjects_and_wrong_shapes[\"text\"]": 0.0008155320000469146, - "tests/test_bench_context_snapshot.py::test_json_grader_rejects_nonobjects_and_wrong_shapes[[]]": 0.0008661260000053517, - "tests/test_bench_context_snapshot.py::test_json_grader_rejects_nonobjects_and_wrong_shapes[invalid]": 0.0008502559999783443, - "tests/test_bench_context_snapshot.py::test_json_grader_rejects_nonobjects_and_wrong_shapes[null]": 0.0008137180000176159, - "tests/test_bench_context_snapshot.py::test_json_grader_rejects_nonobjects_and_wrong_shapes[{\"unexpected\":1}]": 0.0008575199999540928, - "tests/test_bench_context_snapshot.py::test_offline_summary_cli_needs_no_provider_config": 0.08917538800000102, - "tests/test_bench_context_snapshot.py::test_provider_auth_and_metadata_redaction[asyncio-]": 0.4947364849999758, - "tests/test_bench_context_snapshot.py::test_provider_auth_and_metadata_redaction[asyncio-configured-test-key]": 0.007184968000046865, - "tests/test_bench_context_snapshot.py::test_published_results_include_all_pairs_and_reproduce_summary": 0.0015580350000732324, - "tests/test_bench_context_snapshot.py::test_python_grader_keeps_standard_types_and_rejects_mutation": 0.08663988699998981, - "tests/test_bench_context_snapshot.py::test_python_grader_rejects_imports_and_times_out": 0.24475691200001393, - "tests/test_bench_context_snapshot.py::test_usage_counts_lead_and_worker_and_preserves_unknown_cost": 0.0010395209999956023, - "tests/test_bench_deermem_eviction.py::test_all_stopword_predictions_cannot_pass_overlap": 0.0007301910000023781, - "tests/test_bench_deermem_eviction.py::test_build_answer_task_renders_only_kept_facts": 0.008213167999940651, - "tests/test_bench_deermem_eviction.py::test_build_client_uses_configured_timeout_and_bearer_header": 0.009921863999977631, - "tests/test_bench_deermem_eviction.py::test_cli_contract_validation_is_offline": 0.00872473800006901, - "tests/test_bench_deermem_eviction.py::test_cli_run_qa_fails_fast_without_provider_environment": 0.011416169000085574, - "tests/test_bench_deermem_eviction.py::test_collect_and_integrity_checks_reject_incomplete_or_tampered_rows": 0.015451325000015004, - "tests/test_bench_deermem_eviction.py::test_committed_protocol_is_pinned_and_does_not_copy_longmemeval_text": 0.005893422999974973, - "tests/test_bench_deermem_eviction.py::test_config_pins_the_committed_grader_version": 0.00442070000002559, - "tests/test_bench_deermem_eviction.py::test_confirmation_scenario_is_deterministic_and_uses_production_policies": 0.001178162999963206, - "tests/test_bench_deermem_eviction.py::test_conflicting_numeric_answers_are_rejected": 0.000757931999999073, - "tests/test_bench_deermem_eviction.py::test_correction_reserve_retains_a_low_confidence_correction": 0.001025936000019101, - "tests/test_bench_deermem_eviction.py::test_distractor_bank_is_filtered_sorted_and_bounded": 0.0008029569999621344, - "tests/test_bench_deermem_eviction.py::test_distractor_offset_derivation_and_wraparound_are_pinned": 0.0007661089999828619, - "tests/test_bench_deermem_eviction.py::test_distractor_selection_requires_a_large_enough_bank": 0.0008046899999953894, - "tests/test_bench_deermem_eviction.py::test_empty_and_insufficient_predictions_are_rejected": 0.0007423339999945711, - "tests/test_bench_deermem_eviction.py::test_empty_reference_is_a_contract_error": 0.000750127000003431, - "tests/test_bench_deermem_eviction.py::test_exact_match_ignores_case_punctuation_and_number_words": 0.000761646999990262, - "tests/test_bench_deermem_eviction.py::test_exact_mcnemar_matches_the_two_sided_exact_binomial": 0.0010991020000119534, - "tests/test_bench_deermem_eviction.py::test_extract_evidence_uses_marked_turns_and_per_session_user_fallback": 0.0007933489999913945, - "tests/test_bench_deermem_eviction.py::test_grader_is_blind_by_construction": 0.000790786000038679, - "tests/test_bench_deermem_eviction.py::test_grading_is_blind_and_joined_by_row_id": 0.010475624999969568, - "tests/test_bench_deermem_eviction.py::test_grading_rejects_a_row_reassigned_to_another_valid_case": 0.012182998999946903, - "tests/test_bench_deermem_eviction.py::test_load_longmemeval_indexes_unique_rows": 0.002447543999892332, - "tests/test_bench_deermem_eviction.py::test_load_longmemeval_rejects_hash_mismatch": 0.0025167239999746016, - "tests/test_bench_deermem_eviction.py::test_normalization_lowercases_strips_and_maps_number_words": 0.0007696060000057514, - "tests/test_bench_deermem_eviction.py::test_numbers_inside_an_explicit_reference_range_are_accepted": 0.0008119440000200484, - "tests/test_bench_deermem_eviction.py::test_overlap_requires_sixty_percent_in_both_directions": 0.0007771279999815306, - "tests/test_bench_deermem_eviction.py::test_paired_bootstrap_is_seed_deterministic_and_signed_second_minus_first": 0.012721510000005765, - "tests/test_bench_deermem_eviction.py::test_policy_result_contains_ids_and_scores_but_not_dataset_text": 0.0009665239999776531, - "tests/test_bench_deermem_eviction.py::test_provider_settings_errors_name_the_missing_variables": 0.004480108999985077, - "tests/test_bench_deermem_eviction.py::test_public_policy_run_omits_dataset_text_and_refuses_overwrite": 0.027254064999908678, - "tests/test_bench_deermem_eviction.py::test_published_rows_contain_only_allowed_metadata": 0.005435051999995721, - "tests/test_bench_deermem_eviction.py::test_published_statistics_are_recomputable_from_the_rows": 0.3475926610000215, - "tests/test_bench_deermem_eviction.py::test_published_summary_matches_the_rows_and_run_provenance_is_secret_free": 0.005568933000006382, - "tests/test_bench_deermem_eviction.py::test_rendering_omits_the_date_line_when_absent": 0.0008311209999760649, - "tests/test_bench_deermem_eviction.py::test_rendering_pins_fact_order_date_line_and_block_format": 0.000876214000015807, - "tests/test_bench_deermem_eviction.py::test_rendering_rejects_empty_or_duplicate_facts": 0.0008903799999870898, - "tests/test_bench_deermem_eviction.py::test_request_answer_parses_prediction_and_non_secret_metadata": 0.004883085999949799, - "tests/test_bench_deermem_eviction.py::test_request_answer_rejects_non_retryable_and_malformed_responses": 0.005397582999989936, - "tests/test_bench_deermem_eviction.py::test_request_answer_retries_retryable_failures_and_gives_up": 0.005720347000021775, - "tests/test_bench_deermem_eviction.py::test_required_policy_version_is_checked_against_production": 0.004516949999981534, - "tests/test_bench_deermem_eviction.py::test_resume_revalidates_stored_rows_against_the_current_task": 0.013130307999972501, - "tests/test_bench_deermem_eviction.py::test_run_answer_calls_persists_rows_and_resumes_without_new_calls": 0.016956450000009227, - "tests/test_bench_deermem_eviction.py::test_run_answer_calls_refuses_to_reuse_a_row_bound_to_another_case": 0.018754825000087294, - "tests/test_bench_deermem_eviction.py::test_run_answer_calls_reports_failures_without_writing_rows": 0.010985843000014484, - "tests/test_bench_deermem_eviction.py::test_run_directory_is_bound_to_the_full_protocol_identity": 0.4091782739998848, - "tests/test_bench_deermem_eviction.py::test_selection_recomputation_accepts_a_manifest_matching_the_published_rule": 0.0013741390000063802, - "tests/test_bench_deermem_eviction.py::test_selection_recomputation_applies_every_published_exclusion": 0.0013158300000100098, - "tests/test_bench_deermem_eviction.py::test_selection_recomputation_rejects_ids_that_break_the_rule": 0.0013642309999681856, - "tests/test_bench_deermem_eviction.py::test_selection_recomputation_requires_enough_eligible_rows": 0.0013481809999689176, - "tests/test_bench_deermem_eviction.py::test_substring_matches_are_token_level_and_bidirectional": 0.0008035289999952511, - "tests/test_bench_deermem_eviction.py::test_summary_and_statistics_keep_suites_separate": 0.054587770000011915, - "tests/test_bench_deermem_eviction.py::test_summary_keeps_policy_and_scenario_groups_separate": 0.0011387379998950564, - "tests/test_bench_deermem_eviction.py::test_verify_run_identity_is_read_only_and_names_the_changed_artifact": 0.026467293999928643, - "tests/test_bench_deermem_eviction.py::test_written_report_redacts_dataset_text_and_refuses_overwrite": 0.09538491499995416, - "tests/test_bench_deermem_scope_isolation.py::test_contract_is_versioned_and_canaries_are_unique": 0.0011747550000222873, - "tests/test_bench_deermem_scope_isolation.py::test_contract_rejects_duplicate_canary": 0.0028423159999988457, - "tests/test_bench_deermem_scope_isolation.py::test_contract_rejects_reused_routing_canary": 0.002983359000040764, - "tests/test_bench_deermem_scope_isolation.py::test_failed_live_extraction_is_not_sealed_and_resume_retries[json]": 0.057038233000014316, - "tests/test_bench_deermem_scope_isolation.py::test_failed_live_extraction_is_not_sealed_and_resume_retries[provider]": 0.058383886999990864, - "tests/test_bench_deermem_scope_isolation.py::test_legacy_fact_only_rows_are_not_reported_or_reused": 0.07229072300003736, - "tests/test_bench_deermem_scope_isolation.py::test_missing_live_key_fails_before_model_construction": 0.004893965999940519, - "tests/test_bench_deermem_scope_isolation.py::test_offline_runner_executes_production_scope_and_routing_paths": 0.07548230799994826, - "tests/test_bench_deermem_scope_isolation.py::test_report_recomputes_metrics_and_rejects_tampered_outcome": 0.06084311800003661, - "tests/test_bench_deermem_scope_isolation.py::test_report_refuses_to_overwrite_evidence": 0.0628787130000319, - "tests/test_bench_deermem_scope_isolation.py::test_resume_reuses_protocol_bound_rows_and_rejects_changed_manifest": 0.06459941399987201, - "tests/test_bench_deermem_scope_isolation.py::test_routing_does_not_treat_shared_summaries_as_agent_leaks": 0.06393324300000813, - "tests/test_bench_deermem_scope_isolation.py::test_semantic_verdict_checks_persisted_summaries[project-False-history-earlierContext]": 0.019855413999948723, - "tests/test_bench_deermem_scope_isolation.py::test_semantic_verdict_checks_persisted_summaries[project-False-history-longTermBackground]": 0.019467785000017557, - "tests/test_bench_deermem_scope_isolation.py::test_semantic_verdict_checks_persisted_summaries[project-False-history-recentMonths]": 0.018940183000040633, - "tests/test_bench_deermem_scope_isolation.py::test_semantic_verdict_checks_persisted_summaries[project-False-user-personalContext]": 0.01875150999995867, - "tests/test_bench_deermem_scope_isolation.py::test_semantic_verdict_checks_persisted_summaries[project-False-user-topOfMind]": 0.018932438999968326, - "tests/test_bench_deermem_scope_isolation.py::test_semantic_verdict_checks_persisted_summaries[project-False-user-workContext]": 0.01919008599998051, - "tests/test_bench_deermem_scope_isolation.py::test_semantic_verdict_checks_persisted_summaries[user-True-history-earlierContext]": 0.020605494999983875, - "tests/test_bench_deermem_scope_isolation.py::test_semantic_verdict_checks_persisted_summaries[user-True-history-longTermBackground]": 0.019402882000008503, - "tests/test_bench_deermem_scope_isolation.py::test_semantic_verdict_checks_persisted_summaries[user-True-history-recentMonths]": 0.019829117000028873, - "tests/test_bench_deermem_scope_isolation.py::test_semantic_verdict_checks_persisted_summaries[user-True-user-personalContext]": 0.02004261199999746, - "tests/test_bench_deermem_scope_isolation.py::test_semantic_verdict_checks_persisted_summaries[user-True-user-topOfMind]": 0.020182766000004904, - "tests/test_bench_deermem_scope_isolation.py::test_semantic_verdict_checks_persisted_summaries[user-True-user-workContext]": 0.019470599999976912, - "tests/test_bench_deermem_scope_isolation.py::test_storage_failure_does_not_produce_a_semantic_row": 0.06315866999995023, - "tests/test_bench_deermem_scope_isolation.py::test_unsuccessful_rows_are_rejected_and_not_reused": 0.07401771400003554, - "tests/test_bench_opensandbox.py::test_aio_factory_forwards_health_check_skip_to_config_and_snapshot[0.0]": 0.0008669480000662588, - "tests/test_bench_opensandbox.py::test_aio_factory_forwards_health_check_skip_to_config_and_snapshot[7.5]": 0.0008484030000204257, - "tests/test_bench_opensandbox.py::test_aio_factory_forwards_health_check_skip_to_config_and_snapshot[inf]": 0.000833034000038424, - "tests/test_bench_opensandbox.py::test_cli_measures_real_reclaim_and_destroys_all_created_remotes[False]": 0.005200232000049709, - "tests/test_bench_opensandbox.py::test_cli_measures_real_reclaim_and_destroys_all_created_remotes[True]": 0.004807414000026711, - "tests/test_bench_opensandbox.py::test_factory_preserves_connection_config_without_exporting_secrets": 0.0035099280000281396, - "tests/test_bench_opensandbox.py::test_failed_command_still_releases_and_destroys_remote": 0.004333815000109098, - "tests/test_bench_opensandbox.py::test_failed_destroy_invalidates_measurement_and_fails_shutdown": 0.003500241000040205, - "tests/test_bench_opensandbox.py::test_idle_reaping_forces_a_new_remote": 0.004458169000031376, - "tests/test_bench_opensandbox.py::test_idle_timeout_scenario_rejects_infinite_timeout_before_provider_creation[aio-docker]": 0.001256980999926327, - "tests/test_bench_opensandbox.py::test_idle_timeout_scenario_rejects_infinite_timeout_before_provider_creation[boxlite]": 0.0012886099999604994, - "tests/test_bench_opensandbox.py::test_idle_timeout_scenario_rejects_infinite_timeout_before_provider_creation[opensandbox]": 0.0013407570000367741, - "tests/test_bench_opensandbox.py::test_image_override_and_failed_construction_restore_config": 0.00338063700002067, - "tests/test_bench_opensandbox.py::test_invalid_health_check_skip_fails_before_provider_creation[-5-aio-docker]": 0.001337530999990122, - "tests/test_bench_opensandbox.py::test_invalid_health_check_skip_fails_before_provider_creation[-5-boxlite]": 0.0013915829999859852, - "tests/test_bench_opensandbox.py::test_invalid_health_check_skip_fails_before_provider_creation[-inf-aio-docker]": 0.0013320710000357394, - "tests/test_bench_opensandbox.py::test_invalid_health_check_skip_fails_before_provider_creation[-inf-boxlite]": 0.0013596119999874645, - "tests/test_bench_opensandbox.py::test_invalid_health_check_skip_fails_before_provider_creation[NaN-aio-docker]": 0.001655446999961896, - "tests/test_bench_opensandbox.py::test_invalid_health_check_skip_fails_before_provider_creation[NaN-boxlite]": 0.001339543999961279, - "tests/test_bench_opensandbox.py::test_invalid_health_check_skip_fails_before_provider_creation[nan-aio-docker]": 0.0013186850000010963, - "tests/test_bench_opensandbox.py::test_invalid_health_check_skip_fails_before_provider_creation[nan-boxlite]": 0.0013332829998944362, - "tests/test_bench_opensandbox.py::test_invalid_idle_timeout_fails_before_provider_creation[-5-aio-docker]": 0.0014400629999613557, - "tests/test_bench_opensandbox.py::test_invalid_idle_timeout_fails_before_provider_creation[-5-boxlite]": 0.0014026630000216755, - "tests/test_bench_opensandbox.py::test_invalid_idle_timeout_fails_before_provider_creation[-5-opensandbox]": 0.0014608729999281422, - "tests/test_bench_opensandbox.py::test_invalid_idle_timeout_fails_before_provider_creation[-inf-aio-docker]": 0.0014694790000362445, - "tests/test_bench_opensandbox.py::test_invalid_idle_timeout_fails_before_provider_creation[-inf-boxlite]": 0.0013476100000389124, - "tests/test_bench_opensandbox.py::test_invalid_idle_timeout_fails_before_provider_creation[-inf-opensandbox]": 0.0013528189999760798, - "tests/test_bench_opensandbox.py::test_invalid_idle_timeout_fails_before_provider_creation[NaN-aio-docker]": 0.0013479299999517025, - "tests/test_bench_opensandbox.py::test_invalid_idle_timeout_fails_before_provider_creation[NaN-boxlite]": 0.0013672159999487121, - "tests/test_bench_opensandbox.py::test_invalid_idle_timeout_fails_before_provider_creation[NaN-opensandbox]": 0.0013617750000207707, - "tests/test_bench_opensandbox.py::test_invalid_idle_timeout_fails_before_provider_creation[nan-aio-docker]": 0.0015220469999803754, - "tests/test_bench_opensandbox.py::test_invalid_idle_timeout_fails_before_provider_creation[nan-boxlite]": 0.0013395250000485248, - "tests/test_bench_opensandbox.py::test_invalid_idle_timeout_fails_before_provider_creation[nan-opensandbox]": 0.0014253140000164422, - "tests/test_bench_opensandbox.py::test_nonnegative_timing_values_reach_provider_factory[0---health-check-skip-seconds-aio-docker]": 0.0033867070000042077, - "tests/test_bench_opensandbox.py::test_nonnegative_timing_values_reach_provider_factory[0---health-check-skip-seconds-boxlite]": 0.003344047999974009, - "tests/test_bench_opensandbox.py::test_nonnegative_timing_values_reach_provider_factory[0---idle-timeout-aio-docker]": 0.0035516870000265044, - "tests/test_bench_opensandbox.py::test_nonnegative_timing_values_reach_provider_factory[0---idle-timeout-boxlite]": 0.003378742999984752, - "tests/test_bench_opensandbox.py::test_nonnegative_timing_values_reach_provider_factory[2.5---health-check-skip-seconds-aio-docker]": 0.0033710990000486163, - "tests/test_bench_opensandbox.py::test_nonnegative_timing_values_reach_provider_factory[2.5---health-check-skip-seconds-boxlite]": 0.0038453989999425175, - "tests/test_bench_opensandbox.py::test_nonnegative_timing_values_reach_provider_factory[2.5---idle-timeout-aio-docker]": 0.003541347999998834, - "tests/test_bench_opensandbox.py::test_nonnegative_timing_values_reach_provider_factory[2.5---idle-timeout-boxlite]": 0.0033995820000427557, - "tests/test_bench_opensandbox.py::test_nonnegative_timing_values_reach_provider_factory[None---health-check-skip-seconds-aio-docker]": 0.003366579999976693, - "tests/test_bench_opensandbox.py::test_nonnegative_timing_values_reach_provider_factory[None---health-check-skip-seconds-boxlite]": 0.003485372000056941, - "tests/test_bench_opensandbox.py::test_nonnegative_timing_values_reach_provider_factory[None---idle-timeout-aio-docker]": 0.0033812880000141377, - "tests/test_bench_opensandbox.py::test_nonnegative_timing_values_reach_provider_factory[None---idle-timeout-boxlite]": 0.003555654000024333, - "tests/test_bench_opensandbox.py::test_nonnegative_timing_values_reach_provider_factory[inf---health-check-skip-seconds-aio-docker]": 0.003616859999965527, - "tests/test_bench_opensandbox.py::test_nonnegative_timing_values_reach_provider_factory[inf---health-check-skip-seconds-boxlite]": 0.0034206710000717067, - "tests/test_bench_opensandbox.py::test_nonnegative_timing_values_reach_provider_factory[inf---idle-timeout-aio-docker]": 0.00340587300001971, - "tests/test_bench_opensandbox.py::test_nonnegative_timing_values_reach_provider_factory[inf---idle-timeout-boxlite]": 0.0033995009999898684, - "tests/test_bench_opensandbox.py::test_replica_pressure_keeps_concurrent_scopes_separate": 0.0061785920000261285, - "tests/test_bench_opensandbox.py::test_shutdown_attempts_every_remote_before_reporting_failure": 0.0030381329999613627, - "tests/test_bench_opensandbox.py::test_shutdown_failure_is_also_visible_in_jsonl": 0.005204800999933923, - "tests/test_bench_opensandbox.py::test_state_reuse_preserves_remote_files": 0.00462732599987703, - "tests/test_bench_opensandbox.py::test_unsupported_options_fail_before_creating_resources[extra0]": 0.003371329000060541, - "tests/test_bench_opensandbox.py::test_unsupported_options_fail_before_creating_resources[extra1]": 0.0035815119999824674, - "tests/test_bench_sandbox_prewarm.py::test_cancelled_graph_drains_started_acquire_before_reporting_cleanup[asyncio-False]": 0.017572938000057547, - "tests/test_bench_sandbox_prewarm.py::test_cancelled_graph_drains_started_acquire_before_reporting_cleanup[asyncio-True]": 0.01514511000004859, - "tests/test_bench_sandbox_prewarm.py::test_expected_model_failure_cannot_mask_cleanup_failure[asyncio]": 0.016947082999990926, - "tests/test_bench_sandbox_prewarm.py::test_failed_acquire_records_its_own_finish_time[asyncio]": 0.003570400999933554, - "tests/test_bench_sandbox_prewarm.py::test_failed_batch_destroy_is_recorded_and_stops_matrix[asyncio]": 0.019608036999898104, - "tests/test_bench_sandbox_prewarm.py::test_invalid_resource_interval_rejected_before_provider_creation[-1]": 0.003156945999933214, - "tests/test_bench_sandbox_prewarm.py::test_invalid_resource_interval_rejected_before_provider_creation[0]": 0.0032637969999882444, - "tests/test_bench_sandbox_prewarm.py::test_invalid_resource_interval_rejected_before_provider_creation[nan]": 0.003104928000027485, - "tests/test_bench_sandbox_prewarm.py::test_matrix_retains_each_variant_and_cleans_exact_batch_resources[asyncio]": 0.06751624099996434, - "tests/test_bench_sandbox_prewarm.py::test_no_tool_and_failure_close_actual_graph_ownership[asyncio-fenced_no_tool-1]": 0.016986927000004926, - "tests/test_bench_sandbox_prewarm.py::test_no_tool_and_failure_close_actual_graph_ownership[asyncio-model_error-1]": 0.015282276999982969, - "tests/test_bench_sandbox_prewarm.py::test_no_tool_and_failure_close_actual_graph_ownership[asyncio-plain-0]": 0.015203308999957699, - "tests/test_bench_sandbox_prewarm.py::test_non_aio_config_rejected_before_provisioning": 0.0041619439999749375, - "tests/test_bench_sandbox_prewarm.py::test_prewarm_reused_uses_event_order_with_coarse_clock[asyncio-next-tick]": 0.020154730000058407, - "tests/test_bench_sandbox_prewarm.py::test_prewarm_reused_uses_event_order_with_coarse_clock[asyncio-same-tick]": 0.02071234999993976, - "tests/test_bench_sandbox_prewarm.py::test_real_graph_baseline_waits_until_tool_to_start[asyncio]": 0.01976393199998938, - "tests/test_bench_sandbox_prewarm.py::test_real_graph_prewarm_starts_during_model_and_is_claimed_once[asyncio]": 0.021369842000012795, - "tests/test_bench_sandbox_prewarm.py::test_shutdown_failure_still_stops_sampler_and_propagates": 0.004555412000001979, - "tests/test_bench_sandbox_prewarm.py::test_tool_semantic_failure_is_not_a_successful_latency_row[asyncio]": 0.0196045810000669, - "tests/test_bench_sandbox_prewarm.py::test_two_users_keep_trace_and_execution_ownership_separate[asyncio]": 0.03807633399998167, - "tests/test_bench_sandbox_provider.py::test_aio_factory_uses_current_config_contract_and_reports_effective_image": 0.0010375389999808249, - "tests/test_bench_sandbox_provider.py::test_aio_no_warmpool_destroys_container_not_metadata": 0.0008047719999808578, - "tests/test_bench_sandbox_provider.py::test_aio_provider_default_leaves_image_unset": 0.0030485520000524957, - "tests/test_bench_sandbox_provider.py::test_boxlite_factory_restores_module_state": 0.0008317710000369516, - "tests/test_bench_sandbox_provider.py::test_boxlite_shim_workaround_loud_fails_for_other_versions": 0.0025052719999507644, - "tests/test_bench_sandbox_provider.py::test_boxlite_shim_workaround_retries_after_fixing_permissions": 0.0029286280000064835, - "tests/test_bench_sandbox_provider.py::test_console_percentiles_match_json_summary_for_two_samples": 0.001344302999939373, - "tests/test_bench_sandbox_provider.py::test_default_summary_does_not_merge_cold_baseline_with_warm_pool": 0.0033427750000214473, - "tests/test_bench_sandbox_provider.py::test_deferred_destroy_is_failed_measurement": 0.0007842820000405482, - "tests/test_bench_sandbox_provider.py::test_error_string_output_records_failed_turn": 0.0007736530000101993, - "tests/test_bench_sandbox_provider.py::test_explicit_aio_provider_image_is_forwarded": 0.0030192680000027394, - "tests/test_bench_sandbox_provider.py::test_failed_acquire_records_elapsed_time_without_fabricating_later_stages": 0.0007676509999896552, - "tests/test_bench_sandbox_provider.py::test_failed_pressure_acquire_releases_peers_without_barrier_timeout": 0.0031653759999699105, - "tests/test_bench_sandbox_provider.py::test_failed_turn_releases_acquired_sandbox": 0.0008287470000141184, - "tests/test_bench_sandbox_provider.py::test_failed_turn_separates_execution_release_and_cleanup_times[False-False]": 0.0009861590000355136, - "tests/test_bench_sandbox_provider.py::test_failed_turn_separates_execution_release_and_cleanup_times[False-True]": 0.0011290290000260939, - "tests/test_bench_sandbox_provider.py::test_failed_turn_separates_execution_release_and_cleanup_times[True-False]": 0.0009093259999986003, - "tests/test_bench_sandbox_provider.py::test_failed_turn_separates_execution_release_and_cleanup_times[True-True]": 0.0009202189999655275, - "tests/test_bench_sandbox_provider.py::test_failed_warmup_stops_benchmark": 0.0031546220000109315, - "tests/test_bench_sandbox_provider.py::test_failed_workload_cli_exits_nonzero_and_keeps_rows": 0.0033041830000115624, - "tests/test_bench_sandbox_provider.py::test_fault_injection_uses_returned_aio_identity": 0.002552400000013222, - "tests/test_bench_sandbox_provider.py::test_health_check_skip_seconds_is_forwarded_and_serialized": 0.003140706000067439, - "tests/test_bench_sandbox_provider.py::test_new_invocation_cannot_reuse_previous_thread_identity": 0.002761495000015657, - "tests/test_bench_sandbox_provider.py::test_partial_pressure_batch_preserves_actual_active_count": 0.0033388350000223, - "tests/test_bench_sandbox_provider.py::test_provider_failure_text_cannot_be_a_successful_measurement[Command exited with code 1]": 0.0008642919999601872, - "tests/test_bench_sandbox_provider.py::test_provider_failure_text_cannot_be_a_successful_measurement[Command produced no output change for 30 seconds; it may still be running. Command outcome is unknown and was not retried.]": 0.0008178970000471963, - "tests/test_bench_sandbox_provider.py::test_provider_failure_text_cannot_be_a_successful_measurement[Command was terminated because its shell session ended.]": 0.0008426820000408952, - "tests/test_bench_sandbox_provider.py::test_provider_failure_text_cannot_be_a_successful_measurement[traceback\\nExit Code: 1]": 0.0008577199999422191, - "tests/test_bench_sandbox_provider.py::test_replica_pressure_holds_concurrent_aio_clients_and_records_users": 0.004389425999988816, - "tests/test_bench_sandbox_provider.py::test_summary_failed_data_exits_nonzero": 0.0033324549999633746, - "tests/test_bench_sandbox_provider.py::test_summary_ignores_non_provider_records[False]": 0.00328575800000408, - "tests/test_bench_sandbox_provider.py::test_summary_ignores_non_provider_records[True]": 0.0033125790000099187, - "tests/test_bench_sandbox_provider.py::test_summary_preserves_all_failure_group": 0.000774594000063189, - "tests/test_bench_sandbox_provider.py::test_summary_rejects_prewarm_only_input_without_traceback[configuration-only]": 0.0030774969999924906, - "tests/test_bench_sandbox_provider.py::test_summary_rejects_prewarm_only_input_without_traceback[prewarm-case-only]": 0.0031214489999911166, - "tests/test_bench_sandbox_provider.py::test_summary_rejects_prewarm_only_input_without_traceback[prewarm-run]": 0.00311545799996793, - "tests/test_bench_sandbox_provider.py::test_summary_reports_incomplete_provider_timings[acquire_ms]": 0.0030961720000277637, - "tests/test_bench_sandbox_provider.py::test_summary_reports_incomplete_provider_timings[total_ms]": 0.003088237999975263, - "tests/test_bench_sandbox_provider.py::test_warm_hit_uses_reclaim_instrumentation_not_pre_acquire_sample": 0.0007545960000356899, - "tests/test_bench_sandbox_resources.py::test_cli_interrupt_exits_sampler_context_before_returning": 0.0027684560000125202, - "tests/test_bench_sandbox_resources.py::test_cli_requires_bounded_positive_duration[-1]": 0.0030101199999421624, - "tests/test_bench_sandbox_resources.py::test_cli_requires_bounded_positive_duration[0]": 0.002970475999916289, - "tests/test_bench_sandbox_resources.py::test_cli_requires_bounded_positive_duration[inf]": 0.003067417000011119, - "tests/test_bench_sandbox_resources.py::test_cli_requires_bounded_positive_duration[nan]": 0.003165531999968607, - "tests/test_bench_sandbox_resources.py::test_docker_memory_units[0B-0]": 0.001142705000006572, - "tests/test_bench_sandbox_resources.py::test_docker_memory_units[1.25GiB-1342177280]": 0.0009054790000391222, - "tests/test_bench_sandbox_resources.py::test_docker_memory_units[1.5kB-1500]": 0.0009465659999818854, - "tests/test_bench_sandbox_resources.py::test_docker_memory_units[1TiB-1099511627776]": 0.0008720170000060534, - "tests/test_bench_sandbox_resources.py::test_docker_memory_units[2 MB-2000000]": 0.0009125629999857665, - "tests/test_bench_sandbox_resources.py::test_docker_memory_units[2MiB-2097152]": 0.000890921999996408, - "tests/test_bench_sandbox_resources.py::test_invalid_inventory_does_not_dispatch_stats": 0.0008388850000073944, - "tests/test_bench_sandbox_resources.py::test_inventory_failure_is_unknown_and_does_not_leak_command_output[failure0-docker_ps_failed]": 0.0009177229999863812, - "tests/test_bench_sandbox_resources.py::test_inventory_failure_is_unknown_and_does_not_leak_command_output[failure1-docker_ps_timeout]": 0.0009485809999887351, - "tests/test_bench_sandbox_resources.py::test_inventory_failure_is_unknown_and_does_not_leak_command_output[failure2-docker_ps_unavailable]": 0.000943742000004022, - "tests/test_bench_sandbox_resources.py::test_inventory_filters_exact_prefix_and_stats_targets_only_owned_ids": 0.0011058970000021873, - "tests/test_bench_sandbox_resources.py::test_known_empty_inventory_records_zero_without_unscoped_stats": 0.0007872359999510081, - "tests/test_bench_sandbox_resources.py::test_missing_or_invalid_memory_is_unknown[-1MiB]": 0.0008145490000401878, - "tests/test_bench_sandbox_resources.py::test_missing_or_invalid_memory_is_unknown[1.0unknown]": 0.0007690349999620594, - "tests/test_bench_sandbox_resources.py::test_missing_or_invalid_memory_is_unknown[N/A]": 0.0008298579999745925, - "tests/test_bench_sandbox_resources.py::test_missing_or_invalid_memory_is_unknown[]": 0.000769234000074448, - "tests/test_bench_sandbox_resources.py::test_missing_or_invalid_memory_is_unknown[infB]": 0.0007876289999444452, - "tests/test_bench_sandbox_resources.py::test_missing_or_invalid_memory_is_unknown[nanMiB]": 0.000828213999966465, - "tests/test_bench_sandbox_resources.py::test_missing_stats_never_become_zero_or_count_other_containers[]": 0.0010101959999815335, - "tests/test_bench_sandbox_resources.py::test_missing_stats_never_become_zero_or_count_other_containers[{\"ID\": \"aaaaaaaaaaaa\", \"MemUsage\": \"N/A\", \"CPUPerc\": \"--\"}]": 0.0008617469999876448, - "tests/test_bench_sandbox_resources.py::test_missing_stats_never_become_zero_or_count_other_containers[{\"ID\": \"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\", \"Name\": \"production\", \"MemUsage\": \"2MiB / 8GiB\", \"CPUPerc\": \"50%\"}]": 0.0008911619999594222, - "tests/test_bench_sandbox_resources.py::test_missing_stats_never_become_zero_or_count_other_containers[{broken json]": 0.0008615269999268094, - "tests/test_bench_sandbox_resources.py::test_sampler_drains_inflight_sample_and_records_sampled_peak": 0.0029726629999800025, - "tests/test_bench_sandbox_resources.py::test_sampler_requires_explicit_bounded_prefix[*all*]": 0.00252183499998182, - "tests/test_bench_sandbox_resources.py::test_sampler_requires_explicit_bounded_prefix[-]": 0.0025067660000104297, - "tests/test_bench_sandbox_resources.py::test_sampler_requires_explicit_bounded_prefix[]": 0.002495877000001201, - "tests/test_bench_sandbox_resources.py::test_sampler_requires_explicit_bounded_prefix[bad prefix-]": 0.002544526000008318, - "tests/test_bench_sandbox_resources.py::test_sampler_requires_explicit_bounded_prefix[deerflow]": 0.0026038360000484317, - "tests/test_bench_sandbox_resources.py::test_stats_timeout_retains_inventory_but_not_fabricated_resource_values": 0.0008248499999581327, - "tests/test_bench_sandbox_resources.py::test_summary_preserves_unknown_measurements_and_output_is_exclusive": 0.002905875000010383, - "tests/test_bench_scheduled_budget_evidence.py::test_missing_native_goal_evidence_cannot_be_fabricated_as_zero": 0.009669795000036174, - "tests/test_bench_scheduled_budget_evidence.py::test_public_history_projection_omits_older_goals_but_native_accessor_reads_real_counters[delta]": 0.018525916000044163, - "tests/test_bench_scheduled_budget_evidence.py::test_public_history_projection_omits_older_goals_but_native_accessor_reads_real_counters[full]": 0.023234790000003613, - "tests/test_bench_scheduled_tasks.py::test_arm_check_cannot_treat_an_uninstalled_goal_as_a_successful_goal_arm": 0.0009073829999692862, - "tests/test_bench_scheduled_tasks.py::test_budget_evidence_uses_actual_checkpoint_goal_counters_and_no_missing_evidence_default": 0.000734147999992274, - "tests/test_bench_scheduled_tasks.py::test_completion_requires_host_delivery_and_successful_run[present_files]": 0.0008235159999685493, - "tests/test_bench_scheduled_tasks.py::test_completion_requires_host_delivery_and_successful_run[present_shared_artifact]": 0.0008027769999898737, - "tests/test_bench_scheduled_tasks.py::test_cost_reads_production_usage_buckets_and_detects_model_deviation": 0.0008805529998880957, - "tests/test_bench_scheduled_tasks.py::test_fixture_reader_cannot_open_arbitrary_paths_or_urls": 0.0013225840000359312, - "tests/test_bench_scheduled_tasks.py::test_grading_checks_opened_artifact_values_independently_of_success_claim": 0.000974136999957409, - "tests/test_bench_scheduled_tasks.py::test_interactive_failure_prevents_another_paid_stage": 0.009183379999967656, - "tests/test_bench_scheduled_tasks.py::test_live_target_must_be_a_bare_disposable_loopback_origin[http://127.0.0.1/prefix]": 0.0008615380000378536, - "tests/test_bench_scheduled_tasks.py::test_live_target_must_be_a_bare_disposable_loopback_origin[http://127.0.0.1?token=secret]": 0.0008393250000722219, - "tests/test_bench_scheduled_tasks.py::test_live_target_must_be_a_bare_disposable_loopback_origin[http://127.0.0.1@external.example]": 0.0009631280000235165, - "tests/test_bench_scheduled_tasks.py::test_live_target_must_be_a_bare_disposable_loopback_origin[https://example.com]": 0.0011352909999686744, - "tests/test_bench_scheduled_tasks.py::test_paired_prompt_is_identical_for_both_arms_and_uses_synthetic_source": 0.0009306480000077499, - "tests/test_bench_scheduled_tasks.py::test_production_fixture_seed_and_scheduler_launch_install_only_goal_arm_metadata": 0.23546516599998313, - "tests/test_bench_scheduled_tasks.py::test_spend_guard_refuses_over_budget_or_unbounded_admission": 0.000768474000039987, - "tests/test_bench_scheduled_tasks.py::test_token_cap_does_not_erase_observed_completion_or_substitute_for_delivery[False-False]": 0.0008872859999655702, - "tests/test_bench_scheduled_tasks.py::test_token_cap_does_not_erase_observed_completion_or_substitute_for_delivery[True-True]": 0.000825589999976728, - "tests/test_bench_tool_result_probe_cleanup.py::test_failing_run_still_leaves_unrelated_files_alone": 0.003377017999923737, - "tests/test_bench_tool_result_probe_cleanup.py::test_successful_run_leaves_unrelated_files_alone": 0.027446050000037303, - "tests/test_bench_worker.py::test_default_ops_per_worker_and_read_ratio_produce_a_mixed_workload": 0.0008284849999995458, - "tests/test_bench_worker.py::test_full_read_ratio_is_all_reads": 0.0007850339999322387, - "tests/test_bench_worker.py::test_read_count_rounds_rather_than_truncates": 0.0007884790000503017, - "tests/test_bench_worker.py::test_reads_are_spread_across_the_sequence_not_clustered": 0.0007712080000032984, - "tests/test_bench_worker.py::test_small_op_counts_still_get_an_exact_mix": 0.0007837919999929, - "tests/test_bench_worker.py::test_sqlite_worker_engine_matches_the_app_connection_pragmas": 0.008132877000036842, - "tests/test_bench_worker.py::test_zero_read_ratio_is_all_writes": 0.0007918069999846011, "tests/test_blob_store.py::test_blob_ref_kind_is_path_safe": 0.0009789880000994344, "tests/test_blob_store.py::test_blob_ref_matches_detects_corruption": 0.0008852920000208542, "tests/test_blob_store.py::test_blob_ref_validates_digest_shape": 0.0010469449999845892, diff --git a/backend/Makefile b/backend/Makefile index 6502028424..e193a086b3 100644 --- a/backend/Makefile +++ b/backend/Makefile @@ -22,7 +22,7 @@ gateway: # Run all six duration-balanced shards locally (matching CI); wait for every shard on failure. TEST_JOBS ?= 6 TEST_SHARD_TARGETS := test-shard-1 test-shard-2 test-shard-3 test-shard-4 test-shard-5 test-shard-6 -.PHONY: test test-shard test-bundled-extensions $(TEST_SHARD_TARGETS) +.PHONY: test test-shard test-bundled-extensions test-benchmark $(TEST_SHARD_TARGETS) test: $(MAKE) --no-print-directory -k -j$(TEST_JOBS) $(TEST_SHARD_TARGETS) @@ -49,14 +49,14 @@ DURATIONS_FILE ?= .test_durations test-shard: @test -f "$(DURATIONS_FILE)" || \ (echo "error: $(DURATIONS_FILE) is missing; run 'make test-shard-durations' to regenerate the duration baseline" >&2; exit 1) - PYTHONPATH=. PYTHONIOENCODING=utf-8 PYTHONUTF8=1 uv run pytest -m "not live and not bundled_extension" --ignore=tests/blocking_io --splits $(SPLITS) --group $(GROUP) --splitting-algorithm least_duration --durations-path=$(DURATIONS_FILE) tests/ -q + PYTHONPATH=. PYTHONIOENCODING=utf-8 PYTHONUTF8=1 uv run pytest -m "not live and not bundled_extension and not benchmark" --ignore=tests/blocking_io --splits $(SPLITS) --group $(GROUP) --splitting-algorithm least_duration --durations-path=$(DURATIONS_FILE) tests/ -q # Regenerate .test_durations from the offline core suite (non-live, -# non-blocking-I/O, non-bundled-extension) so duration-aware sharding reflects -# real wall-clock cost. Run locally or in a periodic job, then commit the -# refreshed file. +# non-blocking-I/O, non-bundled-extension, non-benchmark) so duration-aware +# sharding reflects real wall-clock cost. Run locally or in a periodic job, then +# commit the refreshed file. test-shard-durations: - PYTHONPATH=. PYTHONIOENCODING=utf-8 PYTHONUTF8=1 uv run pytest -m "not live and not bundled_extension" --ignore=tests/blocking_io --store-durations --clean-durations --durations-path=$(DURATIONS_FILE) tests/ -q + PYTHONPATH=. PYTHONIOENCODING=utf-8 PYTHONUTF8=1 uv run pytest -m "not live and not bundled_extension and not benchmark" --ignore=tests/blocking_io --store-durations --clean-durations --durations-path=$(DURATIONS_FILE) tests/ -q # Bundled extension examples own their behavior suites; the core shards exclude # them so an optional example cannot fail an unrelated core PR. The extension CI @@ -65,6 +65,12 @@ test-shard-durations: test-bundled-extensions: PYTHONPATH=. PYTHONIOENCODING=utf-8 PYTHONUTF8=1 uv run pytest -m "bundled_extension and not live" tests/ -q +# Offline benchmark script suites carry the `benchmark` marker; the core shards +# exclude them so benchmark harness scripts do not slow down unrelated core PRs. +# The benchmark CI workflow runs this target when benchmark scripts or tests change. +test-benchmark: + PYTHONPATH=. PYTHONIOENCODING=utf-8 PYTHONUTF8=1 uv run pytest -m "benchmark and not live" tests/ -q + lint: uv run ruff check . uv run ruff format --check . diff --git a/backend/pyproject.toml b/backend/pyproject.toml index da07ffa2c8..c1a252957a 100644 --- a/backend/pyproject.toml +++ b/backend/pyproject.toml @@ -90,6 +90,7 @@ markers = [ "integration: tests that require an external service (e.g. Redis); skipped when unavailable", "live: tests that call real external APIs and require explicit opt-in", "bundled_extension: behavior tests owned by a bundled extension example; excluded from the core shards and run by the bundled extension CI job", + "benchmark: tests for offline benchmark scripts under backend/scripts/benchmark/; excluded from the core shards and run by the benchmark CI job", ] [tool.uv] diff --git a/backend/tests/AGENTS.md b/backend/tests/AGENTS.md index 354c3d6a00..e7816457fe 100644 --- a/backend/tests/AGENTS.md +++ b/backend/tests/AGENTS.md @@ -78,6 +78,15 @@ guarantee still fails core CI, and `test_bundled_extension_ci.py` keeps the workflow's test-file list in step with the marker. Run the bundled suites with `make test-bundled-extensions`. +## Benchmark script tests + +Tests for offline benchmark harnesses under `backend/scripts/benchmark/` live in +`test_bench_*.py` and carry `pytest.mark.benchmark` at module level. Core shards +exclude them so offline benchmark scripts do not inflate unrelated PRs; +`.github/workflows/backend-benchmark-tests.yml` runs them when benchmark scripts +or tests change, and `test_benchmark_ci.py` keeps the workflow and marker in +sync. Run them locally with `make test-benchmark`. + ## Blocking-I/O tests Every test under `blocking_io/` runs with a detector that fails on a blocking diff --git a/backend/tests/test_bench_checkpoint_channels.py b/backend/tests/test_bench_checkpoint_channels.py index c6bea47997..bec1ea386e 100644 --- a/backend/tests/test_bench_checkpoint_channels.py +++ b/backend/tests/test_bench_checkpoint_channels.py @@ -10,6 +10,8 @@ from typing import Any import pytest +pytestmark = pytest.mark.benchmark + def _load_module(): path = Path(__file__).resolve().parents[1] / "scripts/benchmark/checkpoint/bench_channels.py" diff --git a/backend/tests/test_bench_checkpoint_production.py b/backend/tests/test_bench_checkpoint_production.py index 029838cc1b..ee4d95e32a 100644 --- a/backend/tests/test_bench_checkpoint_production.py +++ b/backend/tests/test_bench_checkpoint_production.py @@ -8,6 +8,8 @@ from pathlib import Path import pytest +pytestmark = pytest.mark.benchmark + def _load_module(): path = Path(__file__).resolve().parents[1] / "scripts/benchmark/checkpoint/bench_production.py" diff --git a/backend/tests/test_bench_concurrency.py b/backend/tests/test_bench_concurrency.py index bb7a3b3d27..459364b6a4 100644 --- a/backend/tests/test_bench_concurrency.py +++ b/backend/tests/test_bench_concurrency.py @@ -10,6 +10,10 @@ import importlib.util import sys from pathlib import Path +import pytest + +pytestmark = pytest.mark.benchmark + def _load_module(): path = Path(__file__).resolve().parents[1] / "scripts/benchmark/concurrency/run_concurrency_bench.py" diff --git a/backend/tests/test_bench_context_memory_comparison.py b/backend/tests/test_bench_context_memory_comparison.py index a9a1ce4276..8f756f4cbd 100644 --- a/backend/tests/test_bench_context_memory_comparison.py +++ b/backend/tests/test_bench_context_memory_comparison.py @@ -8,6 +8,8 @@ from pathlib import Path import pytest +pytestmark = pytest.mark.benchmark + BACKEND = Path(__file__).resolve().parents[1] MODULE = "scripts.benchmark.context_memory_comparison" MANIFEST = BACKEND / "scripts/benchmark/context_memory_comparison/manifest.json" diff --git a/backend/tests/test_bench_context_snapshot.py b/backend/tests/test_bench_context_snapshot.py index d88ef809cc..1ba3576157 100644 --- a/backend/tests/test_bench_context_snapshot.py +++ b/backend/tests/test_bench_context_snapshot.py @@ -11,6 +11,8 @@ from scripts.benchmark.context_snapshot.cases import CASES, Case from scripts.benchmark.context_snapshot.grading import passed, score from scripts.benchmark.context_snapshot.report import clean_success, summarize, usage +pytestmark = pytest.mark.benchmark + def test_invoice_grader_allows_divmod_and_detects_rounding_errors(): case = next(case for case in CASES if case.name == "invoice_total") diff --git a/backend/tests/test_bench_deermem_eviction.py b/backend/tests/test_bench_deermem_eviction.py index 2e5fc281de..897474a0c5 100644 --- a/backend/tests/test_bench_deermem_eviction.py +++ b/backend/tests/test_bench_deermem_eviction.py @@ -28,6 +28,8 @@ from scripts.benchmark.deermem_eviction.results import summarize_policy_results, from scripts.benchmark.deermem_eviction.runner import ensure_run_config_identity, response_path, run_answer_calls, verify_run_identity from scripts.benchmark.deermem_eviction.stats import exact_mcnemar, paired_bootstrap_difference +pytestmark = pytest.mark.benchmark + BACKEND_ROOT = Path(__file__).parents[1] EVAL_ROOT = BACKEND_ROOT / "scripts" / "benchmark" / "deermem_eviction" diff --git a/backend/tests/test_bench_deermem_scope_isolation.py b/backend/tests/test_bench_deermem_scope_isolation.py index 8ece88663d..e320d88c68 100644 --- a/backend/tests/test_bench_deermem_scope_isolation.py +++ b/backend/tests/test_bench_deermem_scope_isolation.py @@ -14,6 +14,8 @@ from scripts.benchmark.deermem_scope_isolation.grading import grade_routing_row, from scripts.benchmark.deermem_scope_isolation.report import RowIntegrityError, build_report, collect_rows, write_report from scripts.benchmark.deermem_scope_isolation.runner import ROOT, ensure_run_identity, run +pytestmark = pytest.mark.benchmark + MANIFEST = ROOT / "manifest.json" diff --git a/backend/tests/test_bench_opensandbox.py b/backend/tests/test_bench_opensandbox.py index 94603d75d9..b7fdec20ce 100644 --- a/backend/tests/test_bench_opensandbox.py +++ b/backend/tests/test_bench_opensandbox.py @@ -16,6 +16,8 @@ from deerflow.config.sandbox_config import SandboxConfig from scripts.benchmark.sandbox import bench_provider as bench from scripts.benchmark.sandbox import summarize +pytestmark = pytest.mark.benchmark + class Remote: def __init__(self, number): diff --git a/backend/tests/test_bench_sandbox_prewarm.py b/backend/tests/test_bench_sandbox_prewarm.py index bb0565b510..719360a3a9 100644 --- a/backend/tests/test_bench_sandbox_prewarm.py +++ b/backend/tests/test_bench_sandbox_prewarm.py @@ -15,6 +15,8 @@ from deerflow.config.sandbox_config import SandboxConfig from deerflow.sandbox.sandbox_provider import SandboxProvider, reset_sandbox_provider, set_sandbox_provider from scripts.benchmark.sandbox import bench_prewarm as bench +pytestmark = pytest.mark.benchmark + class EventProvider(SandboxProvider): def __init__(self): diff --git a/backend/tests/test_bench_sandbox_provider.py b/backend/tests/test_bench_sandbox_provider.py index 61984ee7f9..b89804442e 100644 --- a/backend/tests/test_bench_sandbox_provider.py +++ b/backend/tests/test_bench_sandbox_provider.py @@ -9,6 +9,8 @@ from typing import Any import pytest +pytestmark = pytest.mark.benchmark + def _load_module(name: str, relative: str): path = Path(__file__).resolve().parents[1] / relative diff --git a/backend/tests/test_bench_sandbox_resources.py b/backend/tests/test_bench_sandbox_resources.py index 4b48cb9750..86c681afb7 100644 --- a/backend/tests/test_bench_sandbox_resources.py +++ b/backend/tests/test_bench_sandbox_resources.py @@ -10,6 +10,8 @@ from types import SimpleNamespace import pytest +pytestmark = pytest.mark.benchmark + def _load_module(): path = Path(__file__).resolve().parents[1] / "scripts/benchmark/sandbox/resources.py" diff --git a/backend/tests/test_bench_scheduled_budget_evidence.py b/backend/tests/test_bench_scheduled_budget_evidence.py index da9761070f..aef14a3084 100644 --- a/backend/tests/test_bench_scheduled_budget_evidence.py +++ b/backend/tests/test_bench_scheduled_budget_evidence.py @@ -13,6 +13,8 @@ from deerflow.runtime.checkpoint_state import CheckpointStateAccessor, build_sta from deerflow.runtime.goal import build_goal_state, write_thread_goal from scripts.benchmark.scheduled_tasks.protocol import goal_history_evidence +pytestmark = pytest.mark.benchmark + @pytest.mark.asyncio @pytest.mark.parametrize("mode", ["full", "delta"]) diff --git a/backend/tests/test_bench_scheduled_tasks.py b/backend/tests/test_bench_scheduled_tasks.py index b35280a3c2..300c03fd84 100644 --- a/backend/tests/test_bench_scheduled_tasks.py +++ b/backend/tests/test_bench_scheduled_tasks.py @@ -7,6 +7,8 @@ import pytest from scripts.benchmark.scheduled_tasks.protocol import assert_arm_installed, fixture, goal_history_evidence, grade_artifact, require_loopback, require_spend_reserve, run_cost, task_prompt +pytestmark = pytest.mark.benchmark + def test_fixture_reader_cannot_open_arbitrary_paths_or_urls(): assert fixture("inventory")["source"]["document"].startswith("Synthetic") diff --git a/backend/tests/test_bench_tool_result_probe_cleanup.py b/backend/tests/test_bench_tool_result_probe_cleanup.py index 806236ebe7..abe388c047 100644 --- a/backend/tests/test_bench_tool_result_probe_cleanup.py +++ b/backend/tests/test_bench_tool_result_probe_cleanup.py @@ -14,6 +14,8 @@ from pathlib import Path import pytest +pytestmark = pytest.mark.benchmark + def _load_probe_module() -> object: path = Path(__file__).resolve().parents[1] / "scripts" / "benchmark" / "checkpoint" / "bench_tool_result_probe.py" diff --git a/backend/tests/test_bench_worker.py b/backend/tests/test_bench_worker.py index 480bcddd0b..22f8695484 100644 --- a/backend/tests/test_bench_worker.py +++ b/backend/tests/test_bench_worker.py @@ -9,6 +9,10 @@ import importlib.util import sys from pathlib import Path +import pytest + +pytestmark = pytest.mark.benchmark + def _load_module(): path = Path(__file__).resolve().parents[1] / "scripts/benchmark/concurrency/worker.py" diff --git a/backend/tests/test_benchmark_ci.py b/backend/tests/test_benchmark_ci.py new file mode 100644 index 0000000000..82bb072a2f --- /dev/null +++ b/backend/tests/test_benchmark_ci.py @@ -0,0 +1,99 @@ +"""Keep the benchmark script CI wired to the marker and Makefile targets.""" + +from __future__ import annotations + +import ast +import tomllib +from pathlib import Path + +import pytest +import yaml + +REPO_ROOT = Path(__file__).resolve().parents[2] +TESTS_DIR = REPO_ROOT / "backend/tests" +WORKFLOW = REPO_ROOT / ".github/workflows/backend-benchmark-tests.yml" +MAKEFILE = REPO_ROOT / "backend/Makefile" +MARKER = "benchmark" + +REQUIRED_PATHS = [ + "backend/scripts/benchmark/**", + "backend/tests/conftest.py", + "backend/tests/support/**", + "backend/tests/test_bench_*.py", + "backend/tests/test_benchmark_ci.py", + "backend/pyproject.toml", + "backend/uv.lock", + "backend/Makefile", + ".github/workflows/backend-benchmark-tests.yml", +] + + +def _workflow() -> dict: + # BaseLoader preserves GitHub Actions' `on` key rather than YAML 1.1 bool True. + return yaml.load(WORKFLOW.read_text(encoding="utf-8"), Loader=yaml.BaseLoader) + + +def _marked_modules() -> set[str]: + marked = set() + for path in TESTS_DIR.rglob("test_*.py"): + tree = ast.parse(path.read_text(encoding="utf-8")) + for node in tree.body: + if isinstance(node, ast.Assign) and any(isinstance(target, ast.Name) and target.id == "pytestmark" for target in node.targets): + if MARKER in ast.dump(node.value): + marked.add(path.relative_to(TESTS_DIR).as_posix()) + return marked + + +def test_every_bench_test_module_carries_the_benchmark_marker() -> None: + bench_modules = {path.relative_to(TESTS_DIR).as_posix() for path in TESTS_DIR.glob("test_bench_*.py")} + marked = _marked_modules() + + assert bench_modules, "no test_bench_*.py modules found" + assert marked == bench_modules + + +@pytest.mark.parametrize("event", ["push", "pull_request"]) +def test_each_event_triggers_on_benchmark_scripts_and_tests(event: str) -> None: + paths = _workflow()["on"][event]["paths"] + + for path in REQUIRED_PATHS: + assert path in paths, f"{path} is missing from the {event} paths filter" + + +@pytest.mark.parametrize("event", ["push", "pull_request"]) +def test_the_filter_does_not_cover_all_of_the_backend(event: str) -> None: + paths = _workflow()["on"][event]["paths"] + + assert "backend/tests/**" not in paths + assert "backend/app/**" not in paths + assert "backend/packages/**" not in paths + + +def test_the_workflow_supersedes_in_flight_runs() -> None: + concurrency = _workflow()["concurrency"] + + assert concurrency["group"].startswith("backend-benchmark-tests-") + assert "${{ github.event.pull_request.number || github.ref }}" in concurrency["group"] + assert concurrency["cancel-in-progress"] == "true" + + +def test_the_job_runs_the_benchmark_target_in_the_backend() -> None: + steps = _workflow()["jobs"]["backend-benchmark-tests"]["steps"] + step = next((item for item in steps if item.get("run") == "make test-benchmark"), None) + + assert step is not None, "the workflow must run make test-benchmark" + assert step["working-directory"] == "backend" + + +def test_core_and_benchmark_selections_stay_complementary() -> None: + makefile = MAKEFILE.read_text(encoding="utf-8") + + assert makefile.count('-m "not live and not bundled_extension and not benchmark"') == 2 + assert makefile.count('-m "benchmark and not live"') == 1 + + +def test_marker_is_registered() -> None: + project = tomllib.loads((REPO_ROOT / "backend/pyproject.toml").read_text(encoding="utf-8")) + markers = project["tool"]["pytest"]["ini_options"]["markers"] + + assert any(marker.startswith(f"{MARKER}:") for marker in markers), f"{MARKER} must be a registered pytest marker" diff --git a/backend/tests/test_bundled_extension_ci.py b/backend/tests/test_bundled_extension_ci.py index e2db291066..0e2a1e8738 100644 --- a/backend/tests/test_bundled_extension_ci.py +++ b/backend/tests/test_bundled_extension_ci.py @@ -103,7 +103,7 @@ def test_core_and_bundled_selections_stay_complementary() -> None: # Core shards and their duration baseline exclude the marker; the bundled # target selects exactly it. Renaming either side must fail here. - assert makefile.count('-m "not live and not bundled_extension"') == 2 + assert makefile.count('-m "not live and not bundled_extension and not benchmark"') == 2 assert makefile.count('-m "bundled_extension and not live"') == 1 diff --git a/backend/tests/test_client_live_policy.py b/backend/tests/test_client_live_policy.py index 8176de38e0..a0b26020fa 100644 --- a/backend/tests/test_client_live_policy.py +++ b/backend/tests/test_client_live_policy.py @@ -206,7 +206,7 @@ def test_make_targets_keep_default_tests_offline_and_support_live_opt_in() -> No default_command = _dry_run_make_target("test") live_command = _dry_run_make_target("test-live") - assert 'pytest -m "not live and not bundled_extension"' in default_command + assert 'pytest -m "not live and not bundled_extension and not benchmark"' in default_command assert "--ignore=tests/blocking_io" in default_command assert "tests/" in default_command assert LIVE_OPT_IN not in default_command @@ -258,7 +258,7 @@ def test_ci_unit_test_workflow_runs_duration_aware_shards() -> None: assert "--splits 6" in command assert "--group 6" in command - assert 'pytest -m "not live and not bundled_extension"' in command + assert 'pytest -m "not live and not bundled_extension and not benchmark"' in command assert "--ignore=tests/blocking_io" in command assert "--splitting-algorithm least_duration" in command assert "--durations-path=.test_durations" in command @@ -269,7 +269,7 @@ def test_ci_unit_test_workflow_runs_duration_aware_shards() -> None: # The full-suite entry point stays offline-only. full_command = _dry_run_make_target("test") - assert 'pytest -m "not live and not bundled_extension"' in full_command + assert 'pytest -m "not live and not bundled_extension and not benchmark"' in full_command assert "--ignore=tests/blocking_io" in full_command assert LIVE_OPT_IN not in full_command diff --git a/backend/tests/test_make_test_parallel.py b/backend/tests/test_make_test_parallel.py index b165a5357d..c0b20e839e 100644 --- a/backend/tests/test_make_test_parallel.py +++ b/backend/tests/test_make_test_parallel.py @@ -80,7 +80,7 @@ def test_make_test_runs_all_six_shards_and_reports_any_failure(test_project: Pat for group in range(1, 7): args = json.loads((test_project / f"{group}.started").read_text(encoding="utf-8")) assert args[:3] == ["run", "pytest", "-m"] - assert args[args.index("-m") + 1] == "not live and not bundled_extension" + assert args[args.index("-m") + 1] == "not live and not bundled_extension and not benchmark" assert "--ignore=tests/blocking_io" in args assert args[args.index("--splits") + 1] == "6" assert args[args.index("--group") + 1] == str(group)