Integration points 1-6: one refusal at a time, routing decision in the meter, ledger kinds, retry-of on retry_choice, router lines at difficulty 1 and 2, rule statements name their code. done: points 1-6 / next: fixes A-D, tests

This commit is contained in:
swaits committed 2026-11-23 15:20:53 -07:00
1 parent c5df3068ce
commit cda6133853
4 files changed
+58 -42

No files matched your search

+4 -4
View File
@@ -10,7 +10,7 @@ The abuse cases are written from the side of an agent that wants to skip."""
import contextlib, io, json, os, subprocess, sys, time, unittest
from unittest import mock
from support import *
from sisi import assure, contract as C, gate, gitutil, store, unit as U, unitguard as G, watch
from sisi import assure, contract as C, gate, gitutil, orchestration, store, unit as U, unitguard as G, watch
SRC = "src/app.py"
@@ -477,9 +477,9 @@ class DelegationTests(GuardCase):
return self.before(tool, {"description": "worker", "prompt": prompt, "subagent_type": "general-purpose"}, **kw)
def route(self, kind):
s = store.load_session(self.sid)
s["route"] = {"kind": kind}
store.save_session(self.sid, s)
"""A routing decision as `sisi route` records it: in the orchestration meter, the one place it lives."""
with orchestration.Meter(self.sid) as m:
m["route"] = {"kind": kind, "difficulty": 2, "worker": "w", "ts": time.time()}
def test_delegating_a_build_with_no_unit_is_refused_and_says_where_the_acceptance_comes_from(self):
for tool in ("Agent", "Task"):