refactor(harness): route workflow persistence through repositories
This commit is contained in:
@@ -16,8 +16,13 @@ def _make_session(tmp_path, current_phase_num: int) -> str:
|
||||
approving phases 1..N-1 puts the session at phase N."""
|
||||
import json
|
||||
|
||||
s = tmp_path / "sess"
|
||||
session_id = "2026-07-16-120000"
|
||||
s = tmp_path / session_id
|
||||
s.mkdir()
|
||||
(s / "session_manifest.yaml").write_text(
|
||||
f"id: {session_id}\nquestion: q\ndatabase: d\nschema: s\n"
|
||||
"created_at: 2026-01-01T00:00:00+00:00\nstatus: open\n"
|
||||
)
|
||||
decisions = [
|
||||
{"seq": n, "type": "phase_approved", "subject": f"phase:{n}", "ts": "2025-01-01T00:00:00"}
|
||||
for n in range(1, current_phase_num)
|
||||
@@ -25,7 +30,7 @@ def _make_session(tmp_path, current_phase_num: int) -> str:
|
||||
(s / "review_decisions.jsonl").write_text(
|
||||
"\n".join(json.dumps(d) for d in decisions) + ("\n" if decisions else "")
|
||||
)
|
||||
return "sess"
|
||||
return session_id
|
||||
|
||||
|
||||
class _StubConfig:
|
||||
|
||||
Reference in New Issue
Block a user