plan --case: explicit reference-case render; WP-0005-T04 done; factor-issuer described
--allow-unimplemented (acknowledged type only, plan marked reference_case) lets the accepted Forgejo case render; reviewed now requires a live survey. WP-0005 lane applied and custody moved by the founder. keycape-factor-issuer filled from net-kingdom, rotation gap attributed to railiance-platform. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Assistant: claude-code Assistant-Model: opus Assistant-Process: 327203@bnt-lap001 Assistant-Session: 55028ae3-4914-4bd1-8f5c-815f3527aef0
This commit is contained in:
parent
c6eb701c3d
commit
a3e97c8bd4
6 changed files with 71 additions and 20 deletions
|
|
@ -53,9 +53,11 @@ def test_renders_reference_case_as_derived_plan(tmp_path, types_root):
|
|||
|
||||
def test_acceptance_replaces_executive_summary(tmp_path, types_root):
|
||||
acc = {"at": "2026-10-08", "record": "informed-decision:forgejo-oidc", "by": [{"role": "owner"}, {"role": "founder"}]}
|
||||
doc, _, _ = cp.plan_from_case(_case(tmp_path, acceptance=acc), types_root=types_root, structure=cp.Structure())
|
||||
doc, _, _ = cp.plan_from_case(_case(tmp_path, acceptance=acc), types_root=types_root, structure=cp.Structure(source="live"))
|
||||
front = yaml.safe_load(doc.split("---")[1])
|
||||
assert front["status"] == "reviewed"
|
||||
offline, _, _ = cp.plan_from_case(_case(tmp_path, acceptance=acc), types_root=types_root, structure=cp.Structure())
|
||||
assert yaml.safe_load(offline.split("---")[1])["status"] == "draft"
|
||||
assert front["case_acceptance"]["record"] == "informed-decision:forgejo-oidc"
|
||||
|
||||
|
||||
|
|
@ -107,3 +109,18 @@ def test_cli_plan_refuses_unimplemented_type_with_exit_2(tmp_path, capsys):
|
|||
from ops_mason.cli import main
|
||||
assert main(["plan", "--case", str(_case(tmp_path)), "--no-live"]) == 2
|
||||
assert "only implemented types" in capsys.readouterr().err
|
||||
|
||||
|
||||
def test_reference_case_renders_against_acknowledged_type_only_when_asked(tmp_path):
|
||||
doc, _, _ = cp.plan_from_case(_case(tmp_path), structure=cp.Structure(), allow_unimplemented=True)
|
||||
front = yaml.safe_load(doc.split("---")[1])
|
||||
assert front["reference_case"] is True and "**Reference case:**" in doc
|
||||
|
||||
|
||||
def test_allow_unimplemented_refused_for_non_acknowledged_type(tmp_path, types_root):
|
||||
f = types_root / TYPE.name / "type.yaml"
|
||||
data = yaml.safe_load(f.read_text())
|
||||
data["spec"]["status"] = "proposed"
|
||||
f.write_text(yaml.safe_dump(data, sort_keys=False))
|
||||
with pytest.raises(cp.CasePlanError):
|
||||
cp.plan_from_case(_case(tmp_path), types_root=types_root, structure=cp.Structure(), allow_unimplemented=True)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue