mirror of
https://github.com/razzant/ouroboros.git
synced 2026-10-03 04:07:04 +00:00
Review round 4: the owner's default start source adopts a paused consciousness campaign; host-service decision fakes take the source
- start_evolution_campaign adopts a paused consciousness campaign for the function's own default owner source as well as "owner_chat" (grok round 4). - The two host-service decision tests' fakes accept the additive `source` keyword the relay now passes and pin that it names the relaying skill. Co-authored-by: Ouroboros <311266734+ouroboros-agent@users.noreply.github.com>
This commit is contained in:
parent
4408d25b40
commit
1d837d2bd5
3 changed files with 10 additions and 4 deletions
|
|
@ -351,7 +351,7 @@ def start_evolution_campaign(objective: str = "", *, source: str = "owner", orig
|
|||
campaign["objective"] = objective
|
||||
if not str(campaign.get("source") or "").strip() and source:
|
||||
campaign["source"] = str(source)
|
||||
if (str(source or "") == "owner_chat" and campaign.get("status") == "paused"
|
||||
if (str(source or "") in ("owner", "owner_chat") and campaign.get("status") == "paused"
|
||||
and consciousness_origin_metadata(campaign)):
|
||||
# The owner's explicit start ADOPTS a paused consciousness campaign: its cycles are
|
||||
# the owner's work now, no longer bound by the consciousness allowance (BIBLE P0).
|
||||
|
|
|
|||
|
|
@ -202,9 +202,10 @@ def test_decision_route_relays_to_the_one_decision_ingress(tmp_path, monkeypatch
|
|||
|
||||
captured = {}
|
||||
|
||||
async def fake_answer(drive_root, body):
|
||||
async def fake_answer(drive_root, body, *, source="web"):
|
||||
captured["drive_root"] = drive_root
|
||||
captured["body"] = body
|
||||
captured["source"] = source # the relaying skill is the answer's transport, never "web"
|
||||
return 200, {"ok": True, "decision_id": body["decision_id"], "state": "answered", "answered_index": 1}
|
||||
|
||||
monkeypatch.setattr(td, "answer_decision", fake_answer)
|
||||
|
|
@ -214,7 +215,7 @@ def test_decision_route_relays_to_the_one_decision_ingress(tmp_path, monkeypatch
|
|||
|
||||
assert response.status_code == 200
|
||||
assert response.json() == {"ok": True, "decision_id": "quiz:task-1:q1", "state": "answered", "answered_index": 1}
|
||||
assert captured == {"drive_root": tmp_path, "body": body}
|
||||
assert captured == {"drive_root": tmp_path, "body": body, "source": "skill:telegram"}
|
||||
|
||||
|
||||
def test_decision_route_returns_the_ingress_refusals_verbatim(tmp_path):
|
||||
|
|
@ -233,7 +234,7 @@ def test_decision_route_returns_the_ingress_refusals_verbatim(tmp_path):
|
|||
def test_decision_route_is_rate_limited_per_skill(tmp_path, monkeypatch):
|
||||
import ouroboros.gateway.task_decision as td
|
||||
|
||||
async def fake_answer(drive_root, body):
|
||||
async def fake_answer(drive_root, body, *, source="web"):
|
||||
return 200, {"ok": True}
|
||||
|
||||
monkeypatch.setattr(td, "answer_decision", fake_answer)
|
||||
|
|
|
|||
|
|
@ -837,6 +837,11 @@ def test_the_owners_start_adopts_a_paused_consciousness_campaign(tmp_path):
|
|||
assert adopted["status"] == "active" and adopted["adopted_by_owner_at"]
|
||||
assert not any(key in adopted for key in origin)
|
||||
assert ca.consciousness_origin_metadata(adopted) == {}
|
||||
# The function's own default source is the owner too (grok round 4).
|
||||
campaign = evolution_lifecycle.start_evolution_campaign("Again", source="agent_tool", origin=origin)
|
||||
campaign["status"] = "paused"
|
||||
assert evolution_lifecycle._write_evolution_campaign(campaign) is True
|
||||
assert "initiator" not in evolution_lifecycle.start_evolution_campaign("")
|
||||
|
||||
|
||||
def test_owner_campaign_carries_no_origin(tmp_path):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue