[T1/T5] Self-review; N5 approval guard; eval update
This commit is contained in:
1 parent
7f1537e874
commit
88d7360902
3 files changed
+39
-2
No files matched your search
@@ -56,10 +56,23 @@ def negatives():
|
||||
out["N1"] = budget.Budget(0).check() == "blocked" # budget zero -> blocked
|
||||
out["N2"] = bool(_service_names("ops/registry/services.yaml") ^ _service_names("ops/update-manager/services.yaml"))
|
||||
out["N4"] = _raises(PermissionError, budget.assert_read_safe, "/root/.deepseek-key")
|
||||
out["N5"] = _no_write_without_approval()
|
||||
out["N6"] = budget.Budget(100, 101).check() == "failed" # over budget -> failed
|
||||
return out
|
||||
|
||||
|
||||
def _no_write_without_approval():
|
||||
try:
|
||||
import importlib.util
|
||||
p = ROOT / "ops/agents/approvals.py"
|
||||
spec = importlib.util.spec_from_file_location("buryans_approvals", p)
|
||||
mod = importlib.util.module_from_spec(spec)
|
||||
spec.loader.exec_module(mod)
|
||||
return "write" not in mod.ALLOWED
|
||||
except Exception:
|
||||
return False
|
||||
|
||||
|
||||
def _raises(exc, fn, *a):
|
||||
try:
|
||||
fn(*a)
|
||||
|
||||
Reference in new issue
Block a user