RPF-WP-0061-T04: request-decision opens the founder hub decision; CCR-2026-0051 decision e633607e
Some checks failed
CI Smoke / host-smoke (push) Waiting to run
CI Smoke / container-smoke (push) Waiting to run
CCR intake gate / gate (push) Has been cancelled

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Assistant: claude-code
Assistant-Model: opus
Assistant-Process: 306568@bnt-lap001
Assistant-Session: 8bdf8150-ea56-41e7-9132-13f04f6b0b91
This commit is contained in:
codex 2026-10-18 12:40:36 +02:00
parent 3d971178d8
commit 8545bf8e4c
4 changed files with 110 additions and 1 deletions

View file

@ -247,6 +247,32 @@ class CcrIntakeTests(unittest.TestCase):
errors = ccr_intake.branch_gate(main_root, Path(STANDARD).stem, cc)
self.assertTrue(any("already exists on main" in e for e in errors), errors)
def test_request_decision_records_id_after_platform_review(self) -> None:
ccr_intake.review_standard(self.path, cc)
with mock.patch.object(cc, "state_hub_post_json", return_value={"id": "dec-1", "status": "open"}) as post:
ccr_intake.request_decision(self.path, cc, "http://hub")
payload = post.call_args.args[2]
self.assertIn("APPROVE: CCR-2026-0051", payload["description"])
self.assertNotIn("status", payload)
state_hub = cc.load_yaml(self.path)["state_hub"]
self.assertEqual(state_hub["decision_id"], "dec-1")
self.assertEqual(cc.load_yaml(self.path)["status"], "proposed")
with self.assertRaises(SystemExit):
ccr_intake.request_decision(self.path, cc, "http://hub")
def test_request_decision_requires_platform_approval(self) -> None:
self.edit(lambda d: d["risk"].update(classification="high"))
ccr_intake.review_standard(self.path, cc)
with mock.patch.object(cc, "state_hub_post_json") as post, self.assertRaises(SystemExit):
ccr_intake.request_decision(self.path, cc, "http://hub")
post.assert_not_called()
def test_request_decision_refuses_pre_resolved_decision(self) -> None:
ccr_intake.review_standard(self.path, cc)
resolved = {"id": "dec-2", "status": "resolved"}
with mock.patch.object(cc, "state_hub_post_json", return_value=resolved), self.assertRaises(SystemExit):
ccr_intake.request_decision(self.path, cc, "http://hub")
if __name__ == "__main__":
unittest.main()