CUST-WP-0055 T06: workplan-first curate decision scope
Dual-write workplan_id and legacy workstream_id on State Hub decisions; add --workplan-id CLI flag. Archive grandfather notes (T07).
This commit is contained in:
parent
a338d8debe
commit
a08d988157
3 changed files with 32 additions and 13 deletions
|
|
@ -16,9 +16,10 @@ def _candidate(key="success:clean_pass:outcome"):
|
|||
|
||||
|
||||
def test_build_decision_payload_shape():
|
||||
d = build_decision(_candidate(), "approve", "looks solid", workstream_id="ws-1")
|
||||
d = build_decision(_candidate(), "approve", "looks solid", workplan_id="wp-1")
|
||||
assert d["decision_type"] == "made"
|
||||
assert d["workstream_id"] == "ws-1"
|
||||
assert d["workplan_id"] == "wp-1"
|
||||
assert d["workstream_id"] == "wp-1"
|
||||
assert "Promote" in d["title"]
|
||||
assert d["rationale"] == "looks solid"
|
||||
assert "success:clean_pass:outcome" in d["description"]
|
||||
|
|
@ -61,7 +62,7 @@ def test_review_records_each_final_decision(tmp_path):
|
|||
cat = Catalog(str(tmp_path / "catalog"))
|
||||
log = ReviewLog(str(tmp_path / "reviews.jsonl"))
|
||||
captured = []
|
||||
rec = DecisionRecorder(str(tmp_path / "q.jsonl"), sink=captured.append, workstream_id="ws")
|
||||
rec = DecisionRecorder(str(tmp_path / "q.jsonl"), sink=captured.append, workplan_id="wp")
|
||||
cands = [_candidate("success:clean_pass:outcome"), _candidate("problem:abandoned:outcome")]
|
||||
review(cands, lambda c: (APPROVE if "success" in c["key"] else REJECT, "r"), cat, log,
|
||||
recorder=rec)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue