~ knotless Search/
↑↓ move↵ open⇧↵ all results

chadtmiller.com/knotless

git that lives in your Atmosphere account

knotless.dev
1 collaborator

knotless 0.13.0 Latest 2 packages, 1 image

1
10

A review agent reads a pull again when its body answers a request for changes

Merged
Merged chadtmiller.com asked to merge into main from chadtmiller.com/knotless:agent/rereview-body

What changes

Edits answer a request for changes. After knotless-agent review asks for changes at a pull's head, an edit to the pull's title or body has it read the pull again at that same head, as one of its --rounds. Its last review at that head is in earlier, which the prompt now says means the pull's words changed. An approval is not read again for an edit, and an edit made before the review asked for changes reads nothing.

The prompt stops blocking on what checks catch. knotless-claude-review now asks for changes only for what review alone would catch: a failing test, or a line the body must hold, it mentions at most.

Why

The review agent reviews once per head, so a request about the body could only be cleared by a push or by the owner's approval. A repository's code page goes to any file as its path is typed was held this way: it asked for a Shots-moved: line, the body gained it minutes later, and it never looked again. The shots check already fails a pull without that line, so the request was also one the review should not have blocked on.

The edit is seen without new state: the pull's updatedAt is compared with the review's createdAt, both written by records::now() to the millisecond in UTC, so the strings order as the times do. The pull's record being written already rings Jetstream, so it is read after --settle.

How it was checked

an_agent_reviews_pulls gains a pull that is asked for changes, read again unchanged (nothing asked), edited (read again at the same head as round 2, given the new body and the earlier review at that head), approved, then edited again (nothing asked). The rest is left to CI.

Shortcomings

  • A re-read for an edit spends a round, so a pull edited and pushed can reach --rounds sooner.
  • The prompt change is judged by the model; nothing tests what it now leaves out.

🤖 Generated with Claude Code

Approved

This makes the review agent read a pull again at the same head when its title or body was edited after a request for changes. It does this by comparing the pull's updatedAt with the review's createdAt.

I checked that updatedAt is only written when the title or body is edited (forge.rs ~1917). Review requests, comments and reviews don't bump it, so a review can't trigger its own re-read. The posted key now includes updatedAt, so the agent doesn't repeat a read within one run. An edit made before the review is not read again, because the review's createdAt is later. An approval is never read again for an edit. The integration test covers these cases, and the docs, changeset and prompt are updated with the change.

I found nothing that must change.

Merged as 66f9ff0