Repository navigation
Beyond line comments: helping maintainers decide what to merge #2007
lizhengfeng101
announced in
Announcements
Replies: 3 comments 2 replies
|
@lizhengfeng101 Great! Will it also work with delegated mode? |
1 reply
Is this one of the reasons why #1006 was rejected? |
1 reply
|
和我之前做的那个插件很像 |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
After a month of internal testing, we’re sharing a preview of
ocr review --analysis. It adds a read-only behavior and impact analysis alongside the usual line-level review. The two answer different questions: “What looks wrong on this line?” and “If we merge this change, what will happen to the people who use it?”AI changed what it takes to write code: someone can produce a working change without understanding every line that went into it. We think review is reaching a similar moment. A maintainer may not need to reconstruct every implementation detail, but they still own the decision to merge. Even an accurate list of findings can leave them without enough information to make that call.
Consider a change to retry handling. A line comment might correctly flag that an item is marked complete too early. What matters to the maintainer is the consequence: if the first delivery fails, the item may never be retried. That also gives the maintainer a concrete acceptance check: fail the first delivery, retry the same item, and verify that it is delivered exactly once. Reading a test that describes this case is not the same as seeing it pass. The report makes that distinction.
On the feature branch, run
ocr review --from main --to HEAD --analysis. A separate analysis agent compares the old and new behavior, traces affected workflows, and identifies fixes, checks, or tradeoffs when the evidence supports them. Its report is advisory: it does not approve the PR or change the CI exit status. Leave off--analysisand the usual review incurs no additional model calls.Why put skills first? We expect people to compose skills to get work done without having to know which CLI runs underneath. The specialized analysis agent is an implementation detail of the review skill. Users choose which capabilities to combine; our job in the CLI core is to make the analysis cost less and give maintainers better answers to the questions that matter before a merge.
We chose a specialized agent because its behavior is easier to control and its results are easier to verify. We started by asking general-purpose agents such as Codex and Claude Code to investigate many changes, then used their investigation traces to distill a specialized agent. That gives us a concrete basis for comparison on the same tasks: Did it explain the behavior change? Did it mistake an inference for evidence? What did it cost to reach its conclusion? In our early experiments, the specialized agent reached comparable analysis quality at lower cost on the tasks we tested.
Leaving Bash out of the analysis agent is one deliberate tradeoff. The agent can read a test, but it cannot run it, so it must not turn “there is a test for this” into “the test passed.” When a merge decision depends on an execution result, the host agent can compose the review skill with a test-running skill and run the check with the appropriate permissions. The maintainer gets the evidence they need and can tell what came from reading the code and what came from running it.
Feature PR #1937
If you try it, we’d especially like to hear about a PR where the line comments were correct but you still couldn’t decide whether to merge. What did you need to know that the review didn’t tell you?
All reactions