← Về thư mục
tests/test_compaction_failure_breaker.py
- _trigger_tokens · function · L18-L19 — def _trigger_tokens() -> int
- _cfg · function · L22-L27 — def _cfg() -> SimpleNamespace
- _policy · function · L30-L35 — def _policy(**kwargs) -> CompactionPolicy
- _messages_with_total_at_least · function · L38-L43 — def _messages_with_total_at_least(min_tokens: int) -> list[dict]
- _messages_near_tokens · function · L46-L56 — def _messages_near_tokens(target: int) -> list[dict]
- _grow_to_total · function · L59-L61 — def _grow_to_total(messages: list[dict], min_tokens: int) -> None
- _raise_compact · function · L64-L65 — def _raise_compact(_args, *_kwargs)
- test_consecutive_compaction_failures_open_the_circuit · function · L68-L88 — def test_consecutive_compaction_failures_open_the_circuit(monkeypatch)
- boom · function · L71-L74 — def boom(messages, cfg, **kwargs)
- test_failure_circuit_reopens_after_context_growth · function · L91-L117 — def test_failure_circuit_reopens_after_context_growth(monkeypatch)
- boom · function · L94-L97 — def boom(messages, cfg, **kwargs)
- test_successful_compact_clears_failure_streak · function · L120-L144 — def test_successful_compact_clears_failure_streak(monkeypatch)
- flaky · function · L123-L128 — def flaky(messages, cfg, **kwargs)
- test_usage_calibration_can_trigger_compaction · function · L147-L178 — def test_usage_calibration_can_trigger_compaction(monkeypatch)
- shrink · function · L150-L153 — def shrink(messages, cfg, **kwargs)
- test_calibration_ratio_is_clamped · function · L181-L202 — def test_calibration_ratio_is_clamped(monkeypatch)
- _complete_handoff · function · L212-L213 — def _complete_handoff() -> str
- _rounds · function · L216-L223 — def _rounds(count: int, fill: str) -> list[dict]
- test_a_torn_archive_blob_does_not_trip_the_breaker · function · L226-L270 — def test_a_torn_archive_blob_does_not_trip_the_breaker(monkeypatch, tmp_path)
- test_an_anthropic_cached_prompt_still_calibrates · function · L273-L307 — def test_an_anthropic_cached_prompt_still_calibrates(monkeypatch)
- shrink · function · L281-L284 — def shrink(messages, cfg, **kwargs)
- test_the_skip_log_names_the_breaker_that_tripped · function · L310-L335 — def test_the_skip_log_names_the_breaker_that_tripped(monkeypatch)
- scripted · function · L316-L320 — def scripted(messages, cfg, **kwargs)
- test_a_failing_archive_sink_trips_the_breaker · function · L338-L362 — def test_a_failing_archive_sink_trips_the_breaker(monkeypatch)
- compact_with_record · function · L344-L348 — def compact_with_record(messages, cfg, **kwargs)
- sink · function · L350-L351 — def sink(_payload)
- test_a_cancelled_compaction_is_not_a_failure · function · L365-L383 — def test_a_cancelled_compaction_is_not_a_failure(monkeypatch)
- cancelled · function · L369-L372 — def cancelled(messages, cfg, **kwargs)