Implemented invocation-level failure diagnostics
This commit is contained in:
@@ -414,6 +414,10 @@ def test_process_transcript_result_missing_api_key_writes_failed_report(tmp_path
|
||||
assert "AUDITA_LLM_API_KEY" in report["error"]
|
||||
assert "OPENROUTER_API_KEY" in report["error"]
|
||||
assert "OpenRouter endpoint" in report["error"]
|
||||
assert report["error_details"]["type"] == "AuditaLLMError"
|
||||
assert report["error_details"]["phase"] == "pipeline"
|
||||
assert report["error_details"]["error_log"] == str(run_dir / "error.log")
|
||||
assert (run_dir / "error.log").exists()
|
||||
|
||||
|
||||
def test_process_transcript_result_allows_missing_api_key_for_nondefault_proposal_endpoint(tmp_path):
|
||||
@@ -590,6 +594,9 @@ def test_process_transcript_result_preserves_partial_progress_when_later_module_
|
||||
assert report["skipped_corrections"] == []
|
||||
assert report["pipeline"][1] == "homophones"
|
||||
assert "Simulated homophones proposal failure." in report["error"]
|
||||
assert report["error_details"]["module_instance"] == "homophones"
|
||||
assert report["error_details"]["phase"] == "pipeline"
|
||||
assert (run_dir / "error.log").exists()
|
||||
|
||||
|
||||
def test_process_transcript_result_preserves_partial_skips_and_validator_diagnostics_on_failure(tmp_path):
|
||||
@@ -658,6 +665,9 @@ def test_process_transcript_result_preserves_partial_skips_and_validator_diagnos
|
||||
assert report["skipped_corrections"][0]["reason"] == "proposal confidence below threshold"
|
||||
assert report["skipped_corrections"][0]["source"] == "validator:proposal_confidence_guard"
|
||||
assert "unknown correction_index" in report["error"]
|
||||
assert report["error_details"]["module_instance"] == "glossary_1"
|
||||
assert report["error_details"]["phase"] == "pipeline"
|
||||
assert (run_dir / "error.log").exists()
|
||||
assert (validator_dir / "spoken_form_plausibility_review-prompt-0000.json").exists()
|
||||
assert (validator_dir / "spoken_form_plausibility_review-response-0000.json").exists()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user