← Về thư mục
tests/test_auto_budget.py
- _store · function · L44-L45 — def _store(tmp_path, name: str = "openai4s.db") -> Store
- _budgets · function · L48-L49 — def _budgets(**overrides) -> dict
- _start · function · L52-L81 — def _start(store: Store, **overrides)
- _reserve · function · L84-L93 — def _reserve(store: Store, **overrides)
- _llm · function · L96-L103 — def _llm(model="reviewer-model")
- _pass_chat · function · L106-L111 — def _pass_chat(messages, cfg, **kwargs)
- _snapshot · function · L114-L148 — def _snapshot()
- test_v29_budget_schema_is_additive_and_repeatable · function · L151-L163 — def test_v29_budget_schema_is_additive_and_repeatable(tmp_path)
- test_new_run_creates_budget_state_and_legacy_run_is_readonly · function · L166-L181 — def test_new_run_creates_budget_state_and_legacy_run_is_readonly(tmp_path)
- test_review_limit_two_blocks_third_inference · function · L184-L214 — def test_review_limit_two_blocks_third_inference(tmp_path)
- chat · function · L189-L191 — def chat(messages, cfg, **kwargs)
- test_review_retry_has_unique_admission_and_marks_started_token_unknown · function · L217-L257 — def test_review_retry_has_unique_admission_and_marks_started_token_unknown(tmp_path)
- flaky_chat · function · L222-L226 — def flaky_chat(messages, cfg, **kwargs)
- test_same_action_fourth_call_is_refused_before_invoke · function · L260-L282 — def test_same_action_fourth_call_is_refused_before_invoke(tmp_path)
- test_five_no_delta_turns_refuse_the_sixth · function · L285-L304 — def test_five_no_delta_turns_refuse_the_sixth(tmp_path)
- test_concurrent_last_slot_has_one_winner · function · L307-L350 — def test_concurrent_last_slot_has_one_winner(tmp_path)
- attempt · function · L319-L331 — def attempt(store: Store, admission_id: str) -> None
- test_ten_identical_admission_ids_create_one_reservation · function · L353-L364 — def test_ten_identical_admission_ids_create_one_reservation(tmp_path)
- test_restart_does_not_increase_remaining · function · L367-L384 — def test_restart_does_not_increase_remaining(tmp_path)
- test_started_without_receipt_refunds_zero · function · L387-L402 — def test_started_without_receipt_refunds_zero(tmp_path)
- test_trip_stops_further_provider_tool_and_cell_sinks · function · L405-L429 — def test_trip_stops_further_provider_tool_and_cell_sinks(tmp_path)
- test_each_public_field_has_one_authority_and_zero_sink_bypasses · function · L432-L449 — def test_each_public_field_has_one_authority_and_zero_sink_bypasses()
- test_guardian_meters_are_projected_from_authority_not_copied · function · L452-L464 — def test_guardian_meters_are_projected_from_authority_not_copied(tmp_path)
- test_get_auto_mode_projects_budget_usage_and_circuit · function · L467-L488 — def test_get_auto_mode_projects_budget_usage_and_circuit(tmp_path)
- test_unverified_tokens_fail_closed_and_are_not_completion · function · L491-L510 — def test_unverified_tokens_fail_closed_and_are_not_completion(tmp_path)
- test_pre_provider_token_bound_covers_prompt_and_completion · function · L513-L528 — def test_pre_provider_token_bound_covers_prompt_and_completion()
- test_token_settlement_cannot_exceed_reserved_or_frozen_hard_limit · function · L531-L560 — def test_token_settlement_cannot_exceed_reserved_or_frozen_hard_limit(tmp_path)
- test_execution_admission_is_single_use_and_replay_identity_is_exact · function · L563-L590 — def test_execution_admission_is_single_use_and_replay_identity_is_exact(tmp_path)
- test_replay_cannot_bypass_an_open_circuit · function · L593-L609 — def test_replay_cannot_bypass_an_open_circuit(tmp_path)
- test_gateway_token_denial_precedes_provider_invocation · function · L612-L648 — def test_gateway_token_denial_precedes_provider_invocation(tmp_path)
- provider · function · L630-L632 — def provider(_args, *_kwargs)
- test_a_cancelled_calls_late_denial_cannot_trip_the_next_turn · function · L651-L686 — def test_a_cancelled_calls_late_denial_cannot_trip_the_next_turn(tmp_path)
- test_a_live_denial_still_cancels_its_own_turn · function · L689-L710 — def test_a_live_denial_still_cancels_its_own_turn(tmp_path)
- test_parent_and_child_share_root_run_id · function · L713-L731 — def test_parent_and_child_share_root_run_id(tmp_path)
- test_repair_budget_exhaustion_is_not_a_pass · function · L734-L821 — def test_repair_budget_exhaustion_is_not_a_pass(tmp_path)
- noop_repair · function · L791-L799 — def noop_repair(snapshot, findings)
- test_repeated_finding_reservations_are_settled_not_left_reserved · function · L824-L879 — def test_repeated_finding_reservations_are_settled_not_left_reserved(tmp_path)
- test_every_declared_consumer_has_a_sink_or_is_named_unwired · function · L882-L902 — def test_every_declared_consumer_has_a_sink_or_is_named_unwired()
- test_missing_token_ceiling_pauses_only_once_ceilings_bind · function · L905-L953 — def test_missing_token_ceiling_pauses_only_once_ceilings_bind(tmp_path, monkeypatch)
- _stage5_cfg · function · L956-L964 — def _stage5_cfg(**budget_overrides) -> Config
- _issues_initial · function · L967-L974 — def _issues_initial() -> dict
- test_named_unwired_consumer_is_a_missing_sink_and_refuses_ga · function · L977-L996 — def test_named_unwired_consumer_is_a_missing_sink_and_refuses_ga(monkeypatch)
- test_thirteenth_repair_turn_does_not_invoke_the_provider · function · L999-L1057 — def test_thirteenth_repair_turn_does_not_invoke_the_provider(tmp_path)
- provider · function · L1010-L1012 — def provider()
- metered_repair · function · L1014-L1023 — def metered_repair(snapshot, findings, admission=None)
- test_deterministic_repair_does_not_consume_repair_turns · function · L1060-L1110 — def test_deterministic_repair_does_not_consume_repair_turns(tmp_path)
- test_legacy_repair_fn_is_refused_as_metered · function · L1113-L1153 — def test_legacy_repair_fn_is_refused_as_metered(tmp_path)
- legacy · function · L1118-L1121 — def legacy(snapshot, findings)
- test_repair_turn_exception_marks_unknown_not_released · function · L1156-L1197 — def test_repair_turn_exception_marks_unknown_not_released(tmp_path)
- boom · function · L1160-L1163 — def boom(snapshot, findings, admission=None)
- test_repair_turn_restart_does_not_increase_remaining · function · L1200-L1241 — def test_repair_turn_restart_does_not_increase_remaining(tmp_path)
- three_turns · function · L1205-L1214 — def three_turns(snapshot, findings, admission=None)
- test_parent_and_child_share_repair_turn_root · function · L1244-L1277 — def test_parent_and_child_share_repair_turn_root(tmp_path)
- test_concurrent_last_repair_turn_has_one_winner · function · L1280-L1323 — def test_concurrent_last_repair_turn_has_one_winner(tmp_path)
- attempt · function · L1298-L1310 — def attempt(store: Store, admission_id: str) -> None
- test_pinned_identity_outranks_the_live_run_on_the_provider_thread · function · L1326-L1370 — def test_pinned_identity_outranks_the_live_run_on_the_provider_thread(tmp_path)