generated from coulomb/repo-seed
Add schedule smoke test routine
This commit is contained in:
@@ -338,6 +338,27 @@ def test_execute_instruction_with_audit_accepts_report_payload():
|
||||
assert result.output_validated is True
|
||||
|
||||
|
||||
def test_execute_instruction_with_audit_accepts_fenced_report_payload():
|
||||
report_data = {
|
||||
"summary": "State Hub has loose ends.",
|
||||
"recommendations": [{"action": "revisit", "candidate": "CUST-WP-0045"}],
|
||||
}
|
||||
llm = _CountingLLM([f"```json\n{json.dumps(report_data)}\n```"])
|
||||
instr = _instr(
|
||||
id="daily-triage-report",
|
||||
prompt="Report.",
|
||||
trusted_fields=[],
|
||||
output_schema="schemas/daily-triage-report.json",
|
||||
)
|
||||
|
||||
result = execute_instruction_with_audit(instr, _Event(), {}, llm)
|
||||
|
||||
assert result.tasks == []
|
||||
assert result.report == report_data
|
||||
assert result.output_validated is True
|
||||
assert llm.call_count == 1
|
||||
|
||||
|
||||
def test_execute_instruction_with_audit_rejects_invalid_report_schema():
|
||||
report_data = {"summary": "Missing recommendations."}
|
||||
llm = _CountingLLM([json.dumps(report_data), json.dumps(report_data)])
|
||||
|
||||
Reference in New Issue
Block a user