mirror of
https://github.com/razzant/ouroboros.git
synced 2026-10-03 04:07:04 +00:00
Preserve reviewer processing execution evidence
Co-authored-by: Claudexor <noreply@claudexor.dev>
This commit is contained in:
parent
b734cf8d88
commit
18ab69dd19
2 changed files with 18 additions and 0 deletions
|
|
@ -1125,6 +1125,8 @@ def record_reviewer_slot_executions(surface: str, actors: Any, slots_by_id: Dict
|
|||
# the model rule above forbids.
|
||||
"verdict_method": str(usage.get("verdict_method") or ""),
|
||||
}
|
||||
if isinstance(usage.get("processing"), dict):
|
||||
effective["processing"] = dict(usage["processing"])
|
||||
# D29 applied account/access, verbatim from the engine receipt; absent
|
||||
# keys mean the telemetry predates the receipt — shown as absence.
|
||||
if usage.get("applied_profile"):
|
||||
|
|
@ -1147,6 +1149,7 @@ def record_reviewer_slot_executions(surface: str, actors: Any, slots_by_id: Dict
|
|||
# Actor binding, when the row is a configured-subagent
|
||||
# reference ('' = direct row) — disclosure, never routing.
|
||||
"subagent_id": str(getattr(slot, "subagent_id", "") or ""),
|
||||
"processing_preference": str(getattr(slot, "processing_preference", "") or ""),
|
||||
},
|
||||
"effective": effective,
|
||||
"capability_delta": usage.get("capability_delta") or [],
|
||||
|
|
|
|||
|
|
@ -103,3 +103,18 @@ def test_reviewer_reference_cannot_save_a_second_processing_choice(preference):
|
|||
with roster_env_override(settings["OUROBOROS_SUBAGENTS"], environ=settings):
|
||||
with pytest.raises(ValueError, match="inherits Processing"):
|
||||
parse_reviewer_slots(panel({"subagent_id": "critic", "processing_preference": preference}))
|
||||
|
||||
def test_reviewer_last_execution_preserves_mixed_observation_and_never_echoes_request(tmp_path, monkeypatch):
|
||||
from types import SimpleNamespace
|
||||
from ouroboros import reviewer_slot_config as slots
|
||||
monkeypatch.setattr(slots, "_last_execution_path", lambda: tmp_path / "last.json")
|
||||
receipt = {"requested": "fast", "submitted": "fast", "submittedNative": "fast", "observed": "mixed", "observedNative": ["fast", "standard"], "reason": None, "source": "native_session"}
|
||||
row = SimpleNamespace(slot_id="one", model="m", processing_preference="fast", route=SimpleNamespace(value="agent_session"))
|
||||
actor = SimpleNamespace(slot_id="one", usage={"processing": receipt}, status="ok")
|
||||
slots.record_reviewer_slot_executions("review", [actor], {"one": row})
|
||||
assert slots.reviewer_slot_last_executions()["one"]["effective"]["processing"] == receipt
|
||||
actor.usage = {}
|
||||
slots.record_reviewer_slot_executions("review", [actor], {"one": row})
|
||||
current = slots.reviewer_slot_last_executions()["one"]
|
||||
assert current["requested"]["processing_preference"] == "fast"
|
||||
assert "processing" not in current["effective"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue