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:
dongarandClaude Opus 5.5 committed 2026-10-17 07:06:06 +00:00
1 parent 7e73b8fb37
commit 37bbac7e72
14 files changed
+1268 -157

No files matched your search

+27
View File
@@ -418,3 +418,30 @@ def test_a_pull_request_carries_what_a_review_needs() -> None:
True,
)
assert gitea.pull_request_diff("o/r", 7) == "diff --git a/x b/x\n"
def test_commits_between_are_oldest_first_and_diffs_come_through_the_api() -> None:
# Gitea lists the newest first; its web compare diff takes no token.
seen: list[tuple[str, str, bytes]] = []
def handler(request: httpx.Request) -> httpx.Response:
seen.append((request.method, request.url.path, request.content))
if "/compare/" in request.url.path:
commits = [
{"sha": "c2", "commit": {"message": "Second\n\nbody"}},
{"sha": "c1", "commit": {"message": "First"}},
]
return httpx.Response(200, json={"total_commits": 2, "commits": commits})
if request.url.path.endswith(".diff"):
return httpx.Response(200, text="diff --git a/x b/x\n")
return httpx.Response(201, json={"content": "+1"})
gitea = client(handler)
assert gitea.commits_between("o/r", "a1", "c2") == ["c1 First", "c2 Second"]
assert gitea.commit_diff("o/r", "c1").startswith("diff --git")
gitea.react("o/r", 42, "+1")
assert seen[0][1] == "/api/v1/repos/o/r/compare/a1...c2"
assert seen[1][1] == "/api/v1/repos/o/r/git/commits/c1.diff"
method, path, body = seen[2]
assert (method, path) == ("POST", "/api/v1/repos/o/r/issues/comments/42/reactions")
assert json.loads(body) == {"content": "+1"}