nisse-review: a review refused for an open point posts once the point is answered
CI / checks (push) Skipped
CI / checks (pull_request) Successful in 1m54s
CI / e2e (pull_request) Successful in 5m10s

On #166 the reviewer called post_review with two points unanswered, was
refused, answered them, then only skipped already-answered points until the
40-turn cap: the review went out as partial, its summary lost. A refused
ending call is now held, and the driver ends the run with it as soon as the
last point is settled (a new due hook in nisse-core's driver; nisse-dev
doesn't use it). A held call that is wrong for another reason by then
(sign_off over drafted comments) is left to the model. With nothing open,
reply and skip say which tool ends the run.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J5Utyfzw7gF7UhjRDEtjTk
This commit is contained in:
dongarandClaude Opus 5.5 committed 2026-10-19 20:11:40 +00:00
1 parent be81adc185
commit 26ef125d1e
5 files changed
+221 -22

No files matched your search

+22 -1
View File
@@ -108,6 +108,7 @@ class Driver:
on_turn: Callable[[str], None] | None = None,
screen: Callable[[ToolCall], Screening] | None = None,
max_turns: int | None = None,
due: Callable[[], tuple[str, dict[str, Any], str] | None] | None = None,
) -> RunOutcome:
"""``waiting``: the control tools that end the run, for the
scheduler to act on. ``handlers`` answer those that don't (e.g.
@@ -115,7 +116,10 @@ class Driver:
``checks`` vet a waiting tool's arguments: a problem is the call's
failed result and the run goes on, so the model puts it right.
``screen`` judges each execution call before it reaches the tool VM
(P4)."""
(P4). ``due``, asked after each handled call, names a waiting call
the harness held back that may now go ahead (tool, arguments, what
to tell the model): the run ends with it, as if the model had made
it again."""
handlers = handlers or {}
checks = checks or {}
model = model or self._model # the work item's pinned driver (L9)
@@ -193,6 +197,23 @@ class Driver:
result, ok = handlers[call.tool](dict(call.arguments))
except VMUnreachable as exc:
return self._unreachable(transcript, calls, index, str(exc))
held = due() if ok and due is not None else None
if held is not None:
tool, arguments, said = held
transcript.append(
ToolResult(
call_id=call.call_id,
result=f"{result}\n\n[harness] {said}; your turn "
"has ended",
success=True,
)
)
skip_calls(
transcript,
calls[index + 1 :],
"not run: the turn had ended",
)
return RunOutcome("wait", tool, arguments)
elif call.tool not in offered or workspace is None:
result, ok = (
f"no such tool: {call.tool}; the tools are "