Harden WSJF triage report recovery
This commit is contained in:
parent
20d4f26166
commit
42e373aba1
10 changed files with 223 additions and 8 deletions
|
|
@ -32,6 +32,11 @@ def _payload(sinks: list[dict[str, Any]]) -> dict[str, Any]:
|
|||
"recommendations": [{"candidate": "CUST-WP-0045"}],
|
||||
},
|
||||
"sinks": sinks,
|
||||
"prompt_hash": "abc123",
|
||||
"model": "test-model",
|
||||
"output_validated": True,
|
||||
"review_required": False,
|
||||
"validation_error": None,
|
||||
}
|
||||
],
|
||||
}
|
||||
|
|
@ -54,6 +59,9 @@ def test_working_memory_sink_writes_idempotently(tmp_path) -> None:
|
|||
note = tmp_path / "daily-triage-2026-05-19-12345678.md"
|
||||
text = note.read_text(encoding="utf-8")
|
||||
assert "activity_core_run_id: 12345678-aaaa-bbbb-cccc-123456789abc" in text
|
||||
assert "output_validated: true" in text
|
||||
assert "review_required: false" in text
|
||||
assert "model: test-model" in text
|
||||
assert "State Hub has loose ends." in text
|
||||
|
||||
|
||||
|
|
@ -103,6 +111,8 @@ def test_state_hub_progress_sink_posts(monkeypatch) -> None:
|
|||
assert posts[0]["url"] == "http://state-hub.test/progress/"
|
||||
assert posts[0]["json"]["workstream_id"] == "workstream-1"
|
||||
assert posts[0]["json"]["detail"]["activity_core_run_id"] == payload_run_id()
|
||||
assert posts[0]["json"]["detail"]["output_validated"] is True
|
||||
assert posts[0]["json"]["detail"]["review_required"] is False
|
||||
|
||||
|
||||
def test_state_hub_progress_sink_is_idempotent(monkeypatch) -> None:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue