fix(agent): persist automated incident outcome truth

This commit is contained in:
ogt
2026-07-11 15:01:31 +08:00
parent c910ee7ebe
commit c4a77a1e51
2 changed files with 25 additions and 0 deletions

View File

@@ -66,6 +66,15 @@ def test_incident_terminal_writer_normalizes_legacy_non_object_outcome() -> None
assert "'{automation_terminal}'" in source
def test_incident_terminal_persists_automated_outcome_truth() -> None:
source = inspect.getsource(service._record_incident_terminal_disposition)
assert "'proposal_executed'" in source
assert "'execution_success'" in source
assert 'outcome.get("proposal_executed") is True' in source
assert 'outcome.get("execution_success") is True' in source
@pytest.mark.asyncio
async def test_closure_refuses_to_resolve_when_any_receipt_is_missing(
monkeypatch: pytest.MonkeyPatch,