Enforce bounded operation guardrails
Assistant: codex Assistant-Model: gpt-5.6-sol Assistant-Session: 01a028de-e2c8-7732-8521-46a7fc5db82f
This commit is contained in:
parent
c384f60530
commit
26934e25b9
51 changed files with 1843 additions and 472 deletions
|
|
@ -43,7 +43,7 @@ async def test_evaluate_instructions_returns_task_specs_with_audit(monkeypatch)
|
|||
"model": "test-model",
|
||||
"prompt": "Open tasks: {context.summary.open_tasks}",
|
||||
"output_schema": "",
|
||||
"review_required": False,
|
||||
"review_advisory": False,
|
||||
}
|
||||
],
|
||||
"event": {},
|
||||
|
|
@ -58,7 +58,9 @@ async def test_evaluate_instructions_returns_task_specs_with_audit(monkeypatch)
|
|||
assert spec["source_id"] == "daily-triage"
|
||||
assert spec["model"] == "test-model"
|
||||
assert spec["output_validated"] is True
|
||||
assert spec["review_required"] is False
|
||||
assert spec["review_advisory"] is False
|
||||
assert spec["review_gate_applied"] is False
|
||||
assert "review_required" not in spec
|
||||
assert spec["prompt_hash"] is not None
|
||||
assert len(spec["prompt_hash"]) == 64
|
||||
assert result["reports"] == []
|
||||
|
|
@ -90,7 +92,7 @@ async def test_evaluate_instructions_returns_report_payload(monkeypatch) -> None
|
|||
"model": "test-model",
|
||||
"prompt": "Run report.",
|
||||
"output_schema": "activity-core://schemas/daily-triage-report.json",
|
||||
"review_required": False,
|
||||
"review_advisory": False,
|
||||
}
|
||||
],
|
||||
"event": {},
|
||||
|
|
@ -145,7 +147,7 @@ async def test_evaluate_instructions_returns_invalid_report_for_report_sinks(
|
|||
"model": "test-model",
|
||||
"prompt": "Run report.",
|
||||
"output_schema": "schemas/daily-triage-report.json",
|
||||
"review_required": False,
|
||||
"review_advisory": False,
|
||||
"report_sinks": [{"type": "working-memory", "path": "/tmp"}],
|
||||
}
|
||||
],
|
||||
|
|
@ -157,10 +159,13 @@ async def test_evaluate_instructions_returns_invalid_report_for_report_sinks(
|
|||
assert len(result["reports"]) == 1
|
||||
report = result["reports"][0]
|
||||
assert report["output_validated"] is False
|
||||
assert report["review_required"] is True
|
||||
assert report["review_advisory"] is True
|
||||
assert report["review_gate_applied"] is False
|
||||
assert report["validation_error"] == "$.recommendations[0]: missing required property 'wsjf'"
|
||||
assert report["report"]["status"] == "validation_failed"
|
||||
assert report["report"]["partial_summary"] == "Partial triage."
|
||||
assert "partial_summary" not in report["report"]
|
||||
assert "partial_report" not in report["report"]
|
||||
assert "Partial triage." not in str(report)
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
|
|
@ -210,7 +215,7 @@ async def test_evaluate_instructions_forwards_llm_connect_depth_config(monkeypat
|
|||
"model_params": {"reasoning_effort": "medium"},
|
||||
"prompt": "Run report.",
|
||||
"output_schema": "schemas/daily-triage-report.json",
|
||||
"review_required": False,
|
||||
"review_advisory": False,
|
||||
}
|
||||
],
|
||||
"event": {},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue