Work that took under retro_minutes (5) from sisi done, passed every check and delegated nothing closes without a retro
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
6a5ed356a2
commit
927eb1bb0b
5 files changed
+35
-6
No files matched your search
+3
-2
@@ -204,9 +204,10 @@ def gate(p, for_subagent=False):
|
||||
unsaid = ["%d. %s" % (i, c["text"]) for i, c in enumerate(checks, 1) if not c["verdict"]]
|
||||
failed = [str(i) for i, c in enumerate(checks, 1) if c["verdict"] == "fail"]
|
||||
worked = s.get("changed") or store.snapshot(cwd) != s.get("snapshot")
|
||||
if checks and not unsaid and not failed and not worked:
|
||||
quick = time.time() - (s.get("done") or {}).get("at", 0) < 60 * store.config()["retro_minutes"] and not s.get("delegations_since")
|
||||
if checks and not unsaid and not failed and (not worked or quick):
|
||||
from . import retro
|
||||
retro.record(s, cwd, {}) # every check passed and nothing changed: the work closes itself
|
||||
retro.record(s, cwd, {}) # every check passed and nothing changed, or it was quick and alone: the work closes itself
|
||||
return 0
|
||||
reason = "" if unsaid and models.waiting(s) else OPEN % "; ".join(unsaid) if unsaid else GATE if worked else FAILED % ", ".join(failed) if failed else ""
|
||||
if not reason or s.get("blocks", 0) >= 2:
|
||||
|
||||
+1
-1
@@ -130,7 +130,7 @@ def done(args, cwd=None):
|
||||
return 1
|
||||
with store.session(sid) as s:
|
||||
if new:
|
||||
s["done"] = {"goal": opt["goal"][0], "next": opt["next"][0],
|
||||
s["done"] = {"goal": opt["goal"][0], "next": opt["next"][0], "at": time.time(),
|
||||
"checks": [{"text": c, "verdict": None, "evidence": ""} for c in opt["check"]]}
|
||||
elif verdict:
|
||||
kind, n, why = verdict
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@ LIB = os.environ.get("SISI_LIB") or os.path.join(HOME, ".local", "lib", "sisi")
|
||||
# Every setting there is. The person overrides one under "core" in config.json in their store.
|
||||
DEFAULTS = {"gate": True, "meter": True, "direct_calls": 8, "direct_extension": 8,
|
||||
"rules_lines": 30, "rules_chars": 4000, "organize_after": 8, "research_days": 7, "shell_workers": False,
|
||||
"worker_minutes": 15}
|
||||
"worker_minutes": 15, "retro_minutes": 5}
|
||||
|
||||
|
||||
def config():
|
||||
|
||||
Reference in new issue
Block a user