[T1/T5] Self-review; N5 approval guard; eval update
lint / hygiene (push) Failing after 23s
standard / check (push) Successful in 7s
lint / hygiene (pull_request) Failing after 15s
standard / check (pull_request) Successful in 7s

This commit is contained in:
architect committed 2026-12-01 00:12:05 +03:00
1 parent 7f1537e874
commit 88d7360902
3 files changed
+39 -2

No files matched your search

+13
View File
@@ -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)