From fffb97f5229fbfce685be57e396cd265b043ae8c Mon Sep 17 00:00:00 2001 From: Stephen Waits Date: Thu, 3 Dec 2026 13:21:39 -0700 Subject: [PATCH] Keep gate waiting check scoped to unsaid checks; align core tests for deep and verdicts Co-Authored-By: Gemini --- sisi/hooks.py | 2 +- tests/test_core.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/sisi/hooks.py b/sisi/hooks.py index c9cb804..cbed10a 100644 --- a/sisi/hooks.py +++ b/sisi/hooks.py @@ -289,7 +289,7 @@ def gate(p, for_subagent=False): if not retro.unfinished(s): retro.record(s, cwd, {}, sid) # every check passed and nothing changed, or it was quick and alone: the work closes itself else: - reason = "" if models.waiting(s) else OPEN % "; ".join(unsaid) if unsaid else GATE if worked else FAILED % ", ".join(failed) if failed else "" + reason = "" if unsaid and models.waiting(s) else OPEN % "; ".join(unsaid) if unsaid else GATE if worked else FAILED % ", ".join(failed) if failed else "" demand = bool(reason and not unsaid) reason = " ".join(x for x in (open_f, reason) if x) if reason and s.get("blocks", 0) < 2: diff --git a/tests/test_core.py b/tests/test_core.py index 6ebe058..33afcca 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -2906,7 +2906,7 @@ cli.main(["tick"]) answer = os.path.join(self.tmp, "table.md") self.write(answer, rec(HEADER + "| small | host subagent `small` | quick jobs | flat | fast | |\nFallback order: none.\n")) rc, out, _ = self.sisi("models", "research", "--record", answer) - self.assertEqual((rc, "routine, ordinary or hard" in out), (1, True)) + self.assertEqual((rc, "routine, ordinary, hard or deep" in out), (1, True)) self.table(HEADER + "| small | host subagent `small` | quick jobs | flat | fast | |\n") self.hook("tick") self.hook("prompt", prompt="go") @@ -3087,6 +3087,8 @@ cli.main(["tick"]) self.done() self.sisi("done", "--fail", "2", "the row was dropped", sid="s1") self.done() # done recorded again + self.sisi("done", "--pass", "1", "the counts match at 120 rows", sid="s1") + self.sisi("done", "--pass", "2", "the empty row is exported", sid="s1") self.assertEqual(self.sisi("retro", "--no-gap", "the person accepted it and the checks all passed", *NG, sid="s1")[0], 0) self.assertEqual(self.records()[-1]["unit"]["checks_fail"], 1) self.done()