nisse-review: a stop ends a review in progress; quieter repo failures #159

Merged
dev-agent merged 1 commits from review-stop into main 2026-10-17 22:12:32 +00:00
Collaborator

Follow-up to M7.5 (the small PR of the two agreed; the clone reader comes next).

Clean stop

  • Scheduler.stop() also sets the driver's cancel flag: a review run ends at its next turn.
  • nisse_core.models.Interruptible wraps the model client (the reviewer's and ask_expert's). Built.stop(), called from the SIGTERM handler, breaks off a model call in flight by raising Stopped (a BaseException) inside it. Outside a call it does nothing, so a post or a write is never interrupted.
  • A stopped run: the item goes back to READY, no attempt counted, nothing drafted posted, review.interrupted logged. Replies already posted carry their markers, so the next run doesn't repeat them.

Quieter intake

  • intake.repo_failed is logged when a repository starts failing or the reason changes; intake.repo_ok once when it lists again.

Tests: nisse-review/tests/test_review_stop.py: stop at the next turn, a model call broken off, interrupt outside a call is a no-op, replies not repeated after a stop, build wiring, and the logging.

Docs: Architecture R5, Development Plan M7.5 follow-ups.

Not included: the same for nisse-dev's stop.

🤖 Generated with Claude Code

https://claude.ai/code/session_01J5Utyfzw7gF7UhjRDEtjTk

Follow-up to M7.5 (the small PR of the two agreed; the clone reader comes next). **Clean stop** - `Scheduler.stop()` also sets the driver's cancel flag: a review run ends at its next turn. - `nisse_core.models.Interruptible` wraps the model client (the reviewer's and `ask_expert`'s). `Built.stop()`, called from the SIGTERM handler, breaks off a model call in flight by raising `Stopped` (a `BaseException`) inside it. Outside a call it does nothing, so a post or a write is never interrupted. - A stopped run: the item goes back to READY, no attempt counted, nothing drafted posted, `review.interrupted` logged. Replies already posted carry their markers, so the next run doesn't repeat them. **Quieter intake** - `intake.repo_failed` is logged when a repository starts failing or the reason changes; `intake.repo_ok` once when it lists again. **Tests:** `nisse-review/tests/test_review_stop.py`: stop at the next turn, a model call broken off, `interrupt` outside a call is a no-op, replies not repeated after a stop, build wiring, and the logging. **Docs:** Architecture R5, Development Plan M7.5 follow-ups. Not included: the same for nisse-dev's stop. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01J5Utyfzw7gF7UhjRDEtjTk
Member

nisse-review couldn't review this at 080205db7e (2 tries; the last: the driver's call failed: LLM request failed: The read operation timed out). It tries again after the next push, or an operator's review.

nisse-review couldn't review this at 080205db7e67 (2 tries; the last: the driver's call failed: LLM request failed: The read operation timed out). It tries again after the next push, or an operator's `review`.
dev-agent added 1 commit 2026-10-17 20:37:13 +00:00
nisse-review: a stop ends a review in progress; quieter repo failures
CI / checks (push) Skipped
CI / checks (pull_request) Successful in 2m22s
CI / e2e (pull_request) Successful in 4m20s
a85e855fc2
SIGTERM used to stop only new rounds: a review in progress ran on until
systemd killed it 90s later. Now the scheduler's stop sets the driver's
cancel flag, so the run ends at its next turn, and a model call in flight
is broken off (Interruptible, raising Stopped from the signal handler, only
ever inside a model call). The item goes back to ready, with nothing
drafted posted and no failure counted; replies already posted carry their
markers and are not repeated.

intake.repo_failed is logged when a repository starts failing or the reason
changes, and intake.repo_ok when it lists again, not every round.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J5Utyfzw7gF7UhjRDEtjTk
dev-agent force-pushed review-stop from 080205db7e to a85e855fc2 2026-10-17 20:37:13 +00:00 Compare
dongar approved these changes 2026-10-17 22:11:52 +00:00
dev-agent merged commit 3c046f93a6 into main 2026-10-17 22:12:32 +00:00
dev-agent deleted branch review-stop 2026-10-17 22:12:32 +00:00
Sign in to join this conversation.
No Reviewers
3 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dev/nisse#159