nisse-review: later reviews, replies, rounds, stop and review (M7.5)
Back on a PR it reviewed: a new head gets a later review of the commits since (each one's diff, through the API) and of its earlier points; what was said since gets replies, answered where it was said or skipped with a reason. It signs off once and stays quiet while still happy. Past tuning.review.max_rounds it sums up for the operator and goes quiet, until a push or someone other than the PR's author joins in. An operator's `stop` quiets it; `review` asks for a fresh review. Reviews carry numbered markers and replies their point's key, so recovery posts nothing twice. 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:
1 parent
7e73b8fb37
commit
37bbac7e72
14 files changed
+1268
-157
No files matched your search
+11
-4
@@ -902,7 +902,11 @@ else) towards better changes.
|
||||
what changed, judged by reading them; and the CI result as Gitea reports it.
|
||||
- **It discusses on the PR,** in inline threads and top-level comments, and
|
||||
answers replies to its points: it concedes a good argument and holds a point it
|
||||
still believes, with reasons.
|
||||
still believes, with reasons. Each thing said to it since its last look is
|
||||
answered where it was said, or skipped with a reason (a bot's notice, say):
|
||||
the model decides, as `nisse-dev` does (D5).
|
||||
- **Nothing to raise** is said once, as a short sign-off review. While it stays
|
||||
happy, a later look that finds nothing new posts nothing.
|
||||
|
||||
### R2. Rounds
|
||||
|
||||
@@ -910,7 +914,8 @@ Two agents can argue forever, so a PR's exchanges are capped.
|
||||
|
||||
- **A round** is one review or set of replies the reviewer posts. After a capped
|
||||
number of rounds (a tuning value) it posts a summary of what is still open, for
|
||||
the operator, and stops answering on that PR.
|
||||
the operator, and stops answering on that PR. Pushes have no cap of their own:
|
||||
each brings new code (operator).
|
||||
- **The count resets** when someone other than the reviewer and the PR's agent
|
||||
author comments (in practice, the operator has joined the discussion), and when
|
||||
the PR gets a new push: new code is worth a fresh look.
|
||||
@@ -955,8 +960,10 @@ Two agents can argue forever, so a PR's exchanges are capped.
|
||||
`ask_expert` for a frontier model's view (L9).
|
||||
- **No Matrix room** for now: the PR is its conversation. If every agent gets a
|
||||
room, it gets one too. Until then the operator stops it on a PR by commenting
|
||||
`stop` there (a review is asked for again with `review`), and stops it entirely
|
||||
by stopping its container.
|
||||
`stop` there (a review is asked for again with `review`: a fresh one of the
|
||||
whole PR, with the round count reset), and stops it entirely by stopping its
|
||||
container. A command is an operator's whole top-level comment, acknowledged
|
||||
with a reaction rather than a comment the PR's author would have to answer.
|
||||
- **Its own identity** (L12): a Gitea account (`nisse-review`) with read access to
|
||||
the repositories it reviews, its own token and LiteLLM key, and its own
|
||||
container on the agent host (X1), reaching only Gitea and LiteLLM.
|
||||
|
||||
@@ -660,9 +660,40 @@ a bot's comment needs a reply.
|
||||
inline too.
|
||||
- **Tests:** `test_loop_peers.py` over the fake Gitea.
|
||||
|
||||
**M7.5 Discussion and rounds.** *Pre-approved.* Later reviews of what changed and
|
||||
**M7.5 Discussion and rounds.** *Done.* Later reviews of what changed and
|
||||
of earlier points, replies on threads, the round cap and its reset, `stop` and
|
||||
`review` on a PR (R1, R2, R5).
|
||||
`review` on a PR (R1, R2, R5):
|
||||
|
||||
- **What wakes it:** each round, intake reads what was said on every open PR
|
||||
(top-level comments, review bodies, line comments) and keeps the keys it has
|
||||
taken in; anything new but its own is a point to answer. A run is due for a
|
||||
PR never reviewed (or `review`ed), a new head (a **later review**, after its
|
||||
CI as before), or new points at the same head (**replies**, no CI wait).
|
||||
- **A later review** is given the commits since its last review with each
|
||||
one's diff (Gitea's compare lists them; the per-commit diff comes through the
|
||||
API, since the web's compare diff takes no token), or the whole diff if they
|
||||
can't be listed, and its earlier points with what was said on their lines.
|
||||
- **Replies:** `reply` answers a point where it was made (inline on its line,
|
||||
else quoting it), `skip` leaves it with a reason, `done` ends; every point is
|
||||
answered or skipped before a run may end. Each reply carries its point's key,
|
||||
so a run re-done after a crash answers nothing twice.
|
||||
- **Sign-off:** `sign_off` posts a short review when there is nothing to raise;
|
||||
while it stays happy, a later review offers `still_happy`, which posts nothing
|
||||
(operator: no repeated LGTMs).
|
||||
- **Rounds:** each review, and each run that replied, is a round. Past
|
||||
`tuning.review.max_rounds`, the next run sums up what is still open for the
|
||||
operator (`post_summary`, as a review) and the item goes quiet (`capped`). A
|
||||
push, or a comment from anyone but the reviewer and the PR's author (bots
|
||||
included: the operator wants to see how the model handles them), resets it.
|
||||
- **`stop` and `review`:** an operator's whole comment; acknowledged with a 👍
|
||||
reaction. `stop` quiets the item through pushes and comments; `review` asks
|
||||
for a fresh review of the whole PR, and retries a failed item.
|
||||
- **Durability:** reviews carry a numbered marker (`<!-- nisse-review: {head}
|
||||
#{n} -->`, the first in M7.3's form), so recovery asks Gitea about the right
|
||||
one; items from before M7.5 take what was already said as heard.
|
||||
- **Tests:** `test_review_rounds.py`, including a no-dead-end walk over every
|
||||
position; the live smoke test adds a push and a question, and checks the
|
||||
later review at the new head.
|
||||
|
||||
**M7.6 Deployment.** *Waits for the agent host (Phase 6).* Its image, container,
|
||||
Gitea account and secrets (R5).
|
||||
|
||||
+16
-1
@@ -637,7 +637,8 @@ reads file by file.
|
||||
### `tuning.review.attempts` — default 2
|
||||
|
||||
Failed review runs on one PR, at one head, before the reviewer says on the PR
|
||||
that it couldn't review it, and stops trying until the next push.
|
||||
that it couldn't review it, and stops trying until the next push or an
|
||||
operator's `review` comment.
|
||||
|
||||
### `tuning.review.ci_wait_s` — default 3600
|
||||
|
||||
@@ -661,3 +662,17 @@ review test, whose fresh repository has no CI).
|
||||
|
||||
- **Too low:** a review starts before CI has reported, and runs beside it.
|
||||
- **Too high:** repositories without CI wait that long for every review.
|
||||
|
||||
### `tuning.review.max_rounds` — default 4
|
||||
|
||||
Rounds of discussion on one PR before the reviewer stops answering (R2): a
|
||||
round is a review it posts, or a run in which it replied. Past the cap, it
|
||||
posts one summary of what is still open, for the operator, and goes quiet
|
||||
on that PR. A new push, or a comment from anyone but the reviewer and the
|
||||
PR's author, starts the count again.
|
||||
|
||||
- **Too low:** a disagreement worth one more exchange goes to the operator.
|
||||
- **Too high:** two agents argue at length (and GPU time) before anyone looks.
|
||||
- **Deciding:** a review, the author's answers, its replies, and one more
|
||||
exchange is four; raise it if summaries arrive while the two are still
|
||||
converging.
|
||||
Reference in new issue
Block a user