opencode-azure-devops-pr-review 0.4.5 β 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +231 -0
- package/README.md +552 -219
- package/package.json +2 -2
- package/src/attribution.mjs +252 -93
- package/src/azure.mjs +12 -0
- package/src/comment-work.mjs +199 -18
- package/src/comments.mjs +484 -55
- package/src/config.mjs +163 -75
- package/src/host.mjs +1 -1
- package/src/output.mjs +89 -320
- package/src/prompts/comment-plan.md +51 -8
- package/src/prompts/comment-policy.md +6 -4
- package/src/prompts/common.md +2 -13
- package/src/prompts/dedupe.md +19 -11
- package/src/prompts/rating.md +4 -4
- package/src/prompts/{quick.md β review.md} +19 -6
- package/src/review-work.mjs +434 -426
- package/src/runtime.mjs +154 -90
- package/src/session.mjs +3 -2
- package/src/setup.mjs +253 -54
- package/src/tui-setup.mjs +87 -12
- package/src/prompts/final.md +0 -64
- package/src/prompts/functional.md +0 -34
- package/src/prompts/risk.md +0 -36
package/README.md
CHANGED
|
@@ -3,16 +3,25 @@
|
|
|
3
3
|
[](https://github.com/WTLAIB/opencode-azure-devops-pr-review-v2/actions/workflows/ci.yml?query=branch%3Amain)
|
|
4
4
|
[](https://www.npmjs.com/package/opencode-azure-devops-pr-review)
|
|
5
5
|
[](LICENSE)
|
|
6
|
-
[](docs/VALIDATION.md)
|
|
7
7
|
|
|
8
8
|
**Review Azure DevOps pull requests from a URL. No checkout required.**
|
|
9
9
|
|
|
10
10
|
Use your own OpenCode models to review code, inspect the proposed comments,
|
|
11
11
|
and choose what gets published. No MCP server or CI pipeline setup is required.
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
the
|
|
13
|
+
Earlier releases were measured on two public benchmarks: on Martian's open
|
|
14
|
+
[Code Review Bench](#benchmark-results), 0.3.5's `/pr-deep` found more of the
|
|
15
|
+
listed issues in 50 real pull requests than any of the 21 tools on the
|
|
16
|
+
benchmark's dashboard, and on ReviewBench's test set, which scores each finding
|
|
17
|
+
on its own merits, 97.4% of 0.3.7's findings were judged valid. 0.5.0 makes a
|
|
18
|
+
review differently, with independent passes in place of two reviewers and a
|
|
19
|
+
verifier ([what changed](#what-changed-in-050)). Scored by ReviewBench's own
|
|
20
|
+
judge against 0.4.6 with the same model, its default two passes found about
|
|
21
|
+
as many of the listed issues at 58% of the cost, with somewhat fewer findings
|
|
22
|
+
judged valid; three passes matched 0.4.6 at about three quarters of its cost,
|
|
23
|
+
and four found more at about the same cost
|
|
24
|
+
([the measurement](#what-was-measured-for-050)).
|
|
16
25
|
|
|
17
26
|
AZPR is an independent community project. It is not built by or affiliated with
|
|
18
27
|
the OpenCode team.
|
|
@@ -49,7 +58,7 @@ is an actual capture excerpt with identifying UI removed and its text unchanged.
|
|
|
49
58
|
|
|
50
59
|
[](docs/DEMO.md#the-terminal-panel)
|
|
51
60
|
|
|
52
|
-
*A 15-second edit of a real OpenCode 2.3.0 session on a dedicated test PR.
|
|
61
|
+
*A 15-second edit of a real OpenCode 2.3.0 session with AZPR 0.4.x on a dedicated test PR.
|
|
53
62
|
Waiting time is shortened, so the length is not the review duration.
|
|
54
63
|
[Recording details and other walkthroughs](docs/DEMO.md), among them
|
|
55
64
|
[adjusting findings before publishing](docs/DEMO.md#adjust-findings-before-publishing).*
|
|
@@ -61,7 +70,7 @@ Waiting time is shortened, so the length is not the review duration.
|
|
|
61
70
|
[company networks](docs/ENTERPRISE.md#company-networks) first):
|
|
62
71
|
|
|
63
72
|
```sh
|
|
64
|
-
opencode plugin add opencode-azure-devops-pr-review@0.
|
|
73
|
+
opencode plugin add opencode-azure-devops-pr-review@0.5.0
|
|
65
74
|
```
|
|
66
75
|
|
|
67
76
|
2. In OpenCode's terminal UI, type `/pr-setup`. Dialogs ask for your Azure
|
|
@@ -80,15 +89,16 @@ Waiting time is shortened, so the length is not the review duration.
|
|
|
80
89
|
```
|
|
81
90
|
|
|
82
91
|
Replace the sample URL with your PR. Wait for `/pr-check` to report `READY`
|
|
83
|
-
before starting the review; it uses no model. The review runs
|
|
84
|
-
|
|
92
|
+
before starting the review; it uses no model. The review runs two independent
|
|
93
|
+
passes of the model you chose, each checking its own findings against the
|
|
94
|
+
source, then merges what both reported and rates the severities; nothing
|
|
95
|
+
verifies a finding after its reviewer. If the completed review has findings to
|
|
85
96
|
comment on, a **comment preview** follows in a separate, cancellable run and
|
|
86
97
|
shows the comments as they would be posted. **Nothing is posted by these
|
|
87
98
|
commands** unless you set `afterReview` to `publish`. Previewing comments also
|
|
88
99
|
uses a model; add `--no-comment` after the URL for a review without a preview.
|
|
89
|
-
For a lighter first pass, use `/pr-quick <PR URL
|
|
90
|
-
|
|
91
|
-
without a model.
|
|
100
|
+
For a lighter first pass, use `/pr-quick <PR URL>`: the same review with one
|
|
101
|
+
pass. Every command answers `--help` with its options, without a model.
|
|
92
102
|
|
|
93
103
|
In OpenCode's terminal UI a [panel](#terminal-panel) opens beside the
|
|
94
104
|
conversation: it shows the report and the preview rendered, and at its foot
|
|
@@ -106,12 +116,12 @@ you can leave findings out or change their severity, using the finding IDs the
|
|
|
106
116
|
preview and the report show:
|
|
107
117
|
|
|
108
118
|
```text
|
|
109
|
-
/pr-comment --exclude F-1,
|
|
110
|
-
/pr-comment --severity F-3=low,
|
|
111
|
-
/pr-comment --exclude F-1,
|
|
119
|
+
/pr-comment --exclude F-1,F-2 leave two findings out
|
|
120
|
+
/pr-comment --severity F-3=low,F-4=medium change two severities
|
|
121
|
+
/pr-comment --exclude F-1,F-2 --severity F-3=low both in one command
|
|
112
122
|
```
|
|
113
123
|
|
|
114
|
-
With the last line, F-1 and
|
|
124
|
+
With the last line, F-1 and F-2 are excluded from the new preview and F-3
|
|
115
125
|
appears as low in the summary, with no inline comment. Adjusting runs comment
|
|
116
126
|
planning again with a model. Read the whole new preview, then publish from the
|
|
117
127
|
same conversation:
|
|
@@ -142,11 +152,17 @@ option replaces its earlier list.
|
|
|
142
152
|
- **Read beyond the diff.** Reviewers can follow definitions, callers and
|
|
143
153
|
tests at the selected PR commit, without a local checkout or an Azure Code
|
|
144
154
|
Search index.
|
|
145
|
-
- **
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
155
|
+
- **Review more than once.** Each model you list for a mode is one pass: an
|
|
156
|
+
independent session that reviews every changed file and checks each of its
|
|
157
|
+
findings against the source it read. Passes do not see each other's work. A
|
|
158
|
+
duplicate check merges what they report twice, and a rating puts the
|
|
159
|
+
findings on one severity scale.
|
|
160
|
+
- **Know what was checked.** No stage verifies a finding after its reviewer,
|
|
161
|
+
and the report, the receipt and every posted comment say so. More passes
|
|
162
|
+
find more; they do not make a finding more certain.
|
|
163
|
+
- **Use the models you already have.** One model is enough to start. List it
|
|
164
|
+
twice for two passes, give a second vendor's model a pass of its own, or
|
|
165
|
+
keep stronger models for selected PRs with `/pr-deep`.
|
|
150
166
|
|
|
151
167
|
For company networks, configure a proxy and additional CA certificates for
|
|
152
168
|
AZPR's Azure requests; model-provider connections stay in OpenCode. Content
|
|
@@ -155,35 +171,146 @@ to your selected model providers, and review records are saved locally. See
|
|
|
155
171
|
[team setup and data handling](docs/ENTERPRISE.md) and
|
|
156
172
|
[content-search limits](docs/AZURE_DEVOPS.md#who-calls-what).
|
|
157
173
|
|
|
174
|
+
## What changed in 0.5.0
|
|
175
|
+
|
|
176
|
+
0.5.0 changes how a review is made, not only its options. If you used 0.4.x:
|
|
177
|
+
|
|
178
|
+
| | 0.4.x | 0.5.0 |
|
|
179
|
+
| :--- | :--- | :--- |
|
|
180
|
+
| Who reviews | `/pr-review` and `/pr-deep`: a functional and a risk reviewer, each with a prompt of its own. `/pr-quick`: one reviewer. | Every mode: one reviewer prompt that covers both, run once per model you list (one to four passes). Each pass reviews every changed file on its own. |
|
|
181
|
+
| Checking findings | A verifier checked every finding with tools and could reject, merge, rewrite or add findings. | Each reviewer checks its own findings against the source before it answers. No stage checks them afterwards, and the report, the receipt and every comment say so. |
|
|
182
|
+
| Repeated findings | Merged by the verifier, with a short duplicate check after it. | Merged by a duplicate check where different passes reported the same defect. |
|
|
183
|
+
| Severity | Set by the verifier; a separate rating ran only with a named `rater`. | Set by a rating that sees only each finding's text, on by default; `"rater": false` keeps the reviewers' levels. |
|
|
184
|
+
| Modes | Different stages per mode. | The same stages in every mode; the modes differ only in their models. |
|
|
185
|
+
| Settings | A `functional`, a `risk` and a `verifier` model per mode; one reviewer model for `/pr-quick`. | `models.<mode>.reviewers`, a list, and `rater`. `/pr-setup` shows the update of a 0.4.x file and writes it only when you confirm ([upgrading](#upgrading-from-04x)). |
|
|
186
|
+
| Finding IDs | `F-`, `R-` and `V-` by role. | `F-1 β¦ F-n` for the whole review. |
|
|
187
|
+
|
|
188
|
+
Reviews that 0.4.x saved can still be shown, previewed and published. What
|
|
189
|
+
the change does to findings, cost and time is measured
|
|
190
|
+
[below](#what-was-measured-for-050), with ReviewBench's own judge.
|
|
191
|
+
|
|
158
192
|
## Choose a review
|
|
159
193
|
|
|
194
|
+
Every mode runs the same review: reviewer passes, a duplicate check, a
|
|
195
|
+
severity rating, then comment planning. The modes differ only in the models
|
|
196
|
+
you list for them.
|
|
197
|
+
|
|
160
198
|
| Command | Best starting point | What runs |
|
|
161
199
|
| --- | --- | --- |
|
|
162
|
-
| `/pr-
|
|
163
|
-
| `/pr-
|
|
164
|
-
| `/pr-
|
|
165
|
-
|
|
166
|
-
All three modes use the same Azure comment layout
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
200
|
+
| `/pr-review` | The everyday review | One pass per model of `models.review.reviewers`. A first setup lists your model twice: two passes. |
|
|
201
|
+
| `/pr-deep` | Important or risky changes | The same review with the models of `models.deep.reviewers`: stronger models, a higher variant or more passes. Off until you list models there. |
|
|
202
|
+
| `/pr-quick` | Small or routine changes, or a first look | The same review with the models of `models.quick.reviewers`, usually one pass of a fast model. A first setup lists your model once; an empty list leaves it off. |
|
|
203
|
+
|
|
204
|
+
All three modes use the same Azure comment layout and the same disclosure
|
|
205
|
+
line. Each reviewer checks its own findings against the source, and the
|
|
206
|
+
runtime checks only their form and source. No stage verifies a finding
|
|
207
|
+
afterwards, so a finding can be wrong and a defect can be missed. A finding
|
|
208
|
+
that two passes reported is one finding after the duplicate check; it is not
|
|
209
|
+
confirmed by that. See [model configuration](#configuration) for how to choose
|
|
210
|
+
the lists.
|
|
170
211
|
|
|
171
212
|
<details>
|
|
172
213
|
<summary>Sessions, model requests and cost</summary>
|
|
173
214
|
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
215
|
+
A review starts these private sessions:
|
|
216
|
+
|
|
217
|
+
- **Review:** one session per pass and shard. A shard holds up to
|
|
218
|
+
`workflow.shardFiles` changed files (25), so a small PR is one shard:
|
|
219
|
+
`/pr-review` with two passes starts two reviewer sessions, `/pr-quick` with
|
|
220
|
+
one pass starts one.
|
|
221
|
+
- **Duplicate check:** one session for each file (and side, HEAD or BASE) in
|
|
222
|
+
which different reviewer sessions reported findings. None when no file has
|
|
223
|
+
findings of more than one session, as with one pass over one shard.
|
|
224
|
+
- **Severity rating:** one session without tools per 25 reported findings.
|
|
225
|
+
None when nothing was reported or `rater` is `false`.
|
|
226
|
+
- **Comment planning** (the preview): one session per page of about four
|
|
227
|
+
findings, and one grouping session before the pages when the findings need
|
|
228
|
+
more than one page and some could be one defect at several places. A
|
|
229
|
+
review without findings to comment on gets no automatic preview.
|
|
230
|
+
|
|
231
|
+
So a small PR with a few findings needs two reviewer sessions, a duplicate
|
|
232
|
+
check for each file in which both passes reported, one rating session and
|
|
233
|
+
one planning session with `/pr-review`; and one reviewer session, one rating
|
|
234
|
+
session and one planning session with `/pr-quick`.
|
|
235
|
+
**Sessions are not API requests:** each can make multiple requests, and
|
|
236
|
+
repairs, retries, larger PRs and extra planning pages add work. More passes
|
|
237
|
+
run side by side, within `workflow.parallelSessions`, so they mainly add
|
|
238
|
+
cost. See the [validation record](docs/VALIDATION.md) for measured runs and
|
|
239
|
+
the version each was made with, rather than treating a session count as a
|
|
240
|
+
price guarantee.
|
|
182
241
|
|
|
183
242
|
</details>
|
|
184
243
|
|
|
185
244
|
## Benchmark results
|
|
186
245
|
|
|
246
|
+
**0.5.0 was scored on ReviewBench with the benchmark's own judge**, against
|
|
247
|
+
0.4.6 with the same model (below). The other scores in this section were
|
|
248
|
+
measured with releases 0.3.5 to 0.4.6, which reviewed with two reviewers and a
|
|
249
|
+
verifier; 0.5.0 has not been run on Martian's Code Review Bench.
|
|
250
|
+
|
|
251
|
+
### What was measured for 0.5.0
|
|
252
|
+
|
|
253
|
+
0.4.6 and 0.5.0 reviewed the same 24 pull requests of
|
|
254
|
+
[ReviewBench](https://github.com/review-bench/ReviewBench)'s test set with the
|
|
255
|
+
same model, GPT-6.2 Sol at its default reasoning effort. ReviewBench's own
|
|
256
|
+
judging pipeline scored every run with Claude Sonnet 5, the model that judges
|
|
257
|
+
its leaderboard. We ran the pipeline ourselves, once per row, so these are not
|
|
258
|
+
leaderboard results.
|
|
259
|
+
|
|
260
|
+
| Per pull request | Findings | Judged valid | Reference issues found | High and medium found | Cost | Time |
|
|
261
|
+
| :--- | ---: | ---: | ---: | ---: | ---: | ---: |
|
|
262
|
+
| 0.4.6: two reviewers and a verifier, all GPT-6.2 Sol | 34.1 | 93.2% | 51.5% | 60.6% | US$1.30 | 367 s |
|
|
263
|
+
| **0.5.0: two passes of GPT-6.2 Sol (the default)** | **27.8** | **89.7%** | **49.1%** | **61.9%** | **US$0.76** | **293 s** |
|
|
264
|
+
| 0.5.0: three passes | 31.1 | 93.2% | 51.2% | 63.7% | US$1.01 | 290 s |
|
|
265
|
+
| 0.5.0: four passes | 33.7 | 91.0% | 54.8% | 65.6% | US$1.36 | 338 s |
|
|
266
|
+
|
|
267
|
+
- **Two passes, the default, found about as much as 0.4.6 at 58% of its
|
|
268
|
+
cost**: 49.1% of the reference issues against 51.5%, and as many of the high
|
|
269
|
+
and medium ones. Fewer of their findings were judged valid, 89.7% against
|
|
270
|
+
93.2%. Every run reported the same defect in the same 12 files of one pull
|
|
271
|
+
request, and the judge accepted those 12 findings in every run but this one:
|
|
272
|
+
that alone is 1.8 of the 3.5 points.
|
|
273
|
+
- **Three passes matched 0.4.6** at 78% of its cost and in less time: the same
|
|
274
|
+
share of reference issues found and of findings judged valid, and slightly
|
|
275
|
+
more of the high and medium issues. To review with three passes, write the
|
|
276
|
+
model as `MODEL*3` ([setup with options](#setup-with-options)).
|
|
277
|
+
- **Four passes found more at about the same cost**: 54.8% of the reference
|
|
278
|
+
issues and 65.6% of the high and medium ones, with 91.0% of their findings
|
|
279
|
+
judged valid.
|
|
280
|
+
- **The rating marks more findings high** than 0.4.6's verifier did: about
|
|
281
|
+
20% against 9%, and the judge rated 27% to 33% of those high, against 47%.
|
|
282
|
+
Its choice of which findings deserve an inline comment (medium or high)
|
|
283
|
+
agreed with the judge's as well as before.
|
|
284
|
+
|
|
285
|
+
*Findings judged valid* is the share the judge found correct (ReviewBench's
|
|
286
|
+
augmented precision); *reference issues found* is the share of the
|
|
287
|
+
benchmark's listed issues that a finding covered (its grounded recall); cost
|
|
288
|
+
is the model's list price for each run's tokens; time is the median per
|
|
289
|
+
review, with four reviews running at a time. The 25th pull request of the
|
|
290
|
+
test set, simnaut/emdash#2, was left out of every row: its head merges about
|
|
291
|
+
100 upstream commits, and 0.4.6 filed 449 findings there, more than the judge
|
|
292
|
+
can score at a reasonable cost. One run per row: differences of about 3
|
|
293
|
+
points of recall are within what two runs of one setup differed by before.
|
|
294
|
+
The method, the noise, F1 and F2 and the limits are in the
|
|
295
|
+
[validation record](docs/VALIDATION.md#050-against-046-on-reviewbench-with-its-own-judge-2026-11-24).
|
|
296
|
+
|
|
297
|
+
Before that, while the pipeline was rebuilt, our own judge (Claude Opus 5.5
|
|
298
|
+
applying ReviewBench's rubric) compared the two pipelines with other models.
|
|
299
|
+
With GPT-6.1 Terra, two passes matched 0.4.6 (29.8% and 29.5% of the
|
|
300
|
+
reference issues, 93.0% and 90.2% judged valid) at 80% of its cost. One pass
|
|
301
|
+
each of Terra and Claude Sonnet 5.5 found 35.0% of the reference issues, more
|
|
302
|
+
than two or four passes of Terra (29.2% and 30.6%), with 93.7% judged valid.
|
|
303
|
+
A verifier of the reviewers' own strength rejected 0 of 280 candidate findings
|
|
304
|
+
with Terra and 3 of 1,185 with Sol, for 30% and 54% of a review's cost. What
|
|
305
|
+
the verifier added is gone with it: findings of its own, a filter for
|
|
306
|
+
reviewers whose own findings often do not hold, and a rewrite that read
|
|
307
|
+
better in about one finding in eight for the stronger model. These runs are
|
|
308
|
+
in the
|
|
309
|
+
[validation record](docs/VALIDATION.md#one-pipeline-passes-instead-of-roles-2026-11-22-and-23)
|
|
310
|
+
too.
|
|
311
|
+
|
|
312
|
+
### Releases 0.3.5 to 0.4.6 on Martian's Code Review Bench
|
|
313
|
+
|
|
187
314
|
On Martian's open [Code Review Bench](https://codereview.withmartian.com),
|
|
188
315
|
which evaluates AI code reviewers on 50 real-world pull requests from
|
|
189
316
|
**cal.com, Discourse, Grafana, Keycloak and Sentry**, **AZPR (`v0.3.5`,
|
|
@@ -195,10 +322,16 @@ tools on its public dashboard.**
|
|
|
195
322
|
- **Highest High and Critical recall, tied (74.2%):** level with
|
|
196
323
|
qodo-extended-v2 and augment on the most severe issues.
|
|
197
324
|
- **Built for interactive triage (F2 54.1, would rank 6th):** `/pr-deep`
|
|
198
|
-
|
|
199
|
-
choose which ones to publish.
|
|
200
|
-
|
|
201
|
-
|
|
325
|
+
reported every defect its verifier confirmed instead of holding findings
|
|
326
|
+
back, and you choose which ones to publish.
|
|
327
|
+
- **Findings that hold up when checked (95.6% judged valid):** this
|
|
328
|
+
benchmark's precision is the share of comments that are on its list of about
|
|
329
|
+
three issues per PR, so it counts an accurate comment outside that list as
|
|
330
|
+
wrong. [ReviewBench](#checked-on-a-second-benchmark) scores each finding on
|
|
331
|
+
its own merits instead: it judged 95.6% of this release's findings valid, and
|
|
332
|
+
97.4% of 0.3.7's.
|
|
333
|
+
|
|
334
|
+
| Tool | Issues found (recall) | High and Critical found | Comments on the benchmark's list (precision) | F2 |
|
|
202
335
|
| :--- | ---: | ---: | ---: | ---: |
|
|
203
336
|
| **AZPR 0.3.5 (`/pr-deep`, Claude Opus 5.5)** | **67.7%** π | **74.2%** π | **30.0%** | **54.1** |
|
|
204
337
|
| copilot-v2 | 66.5% | 71.2% | 38.5% | 58.0 |
|
|
@@ -226,21 +359,29 @@ The benchmark's precision also counts accurate comments it does not list:
|
|
|
226
359
|
|
|
227
360
|
1. **Unlisted issues count as false positives.** Code Review Bench lists about
|
|
228
361
|
three issues per PR and counts every comment that matches none of them as a
|
|
229
|
-
false positive. `/pr-deep`
|
|
230
|
-
(6.5 per PR in this run).
|
|
362
|
+
false positive. 0.3.5's `/pr-deep` commented on every defect its verifier
|
|
363
|
+
confirmed (6.5 per PR in this run).
|
|
231
364
|
2. **Most unmatched findings were accurate.** We checked a random sample of 40
|
|
232
365
|
AZPR findings that matched no expected issue against the source code:
|
|
233
366
|
**36 were accurate**, and **18 were genuine defects** introduced or exposed
|
|
234
367
|
by the PR that the benchmark's list does not include.
|
|
368
|
+
3. **A judge that checks each finding found them valid.** ReviewBench does not
|
|
369
|
+
compare findings with a list alone: its judge checks every finding that
|
|
370
|
+
matches no listed issue against the code. On its 25-PR test set it judged
|
|
371
|
+
**95.6%** of this release's findings valid, and **97.4%** of 0.3.7's
|
|
372
|
+
([the runs](#checked-on-a-second-benchmark)). We ran its scoring pipeline
|
|
373
|
+
ourselves, so this is not a leaderboard result.
|
|
235
374
|
|
|
236
375
|
### Model and effort recommendations
|
|
237
376
|
|
|
238
|
-
To find the best setup for `/pr-deep`, we compared **12 combinations of
|
|
239
|
-
and reasoning effort** on the same 50 PRs:
|
|
377
|
+
To find the best setup for 0.3.5's `/pr-deep`, we compared **12 combinations of
|
|
378
|
+
models and reasoning effort** on the same 50 PRs:
|
|
240
379
|
|
|
241
|
-
- **
|
|
242
|
-
|
|
243
|
-
minutes, four PRs at a time.
|
|
380
|
+
- **Best there: `claude-agent/opus#medium`.** Claude Opus 5.5 at medium effort
|
|
381
|
+
in all three review roles scored best. Its full 50-PR run took about 35
|
|
382
|
+
minutes, four PRs at a time. In 0.5.0 that model is a natural first entry of
|
|
383
|
+
`models.deep.reviewers`, but how it does in passes, without a verifier, was
|
|
384
|
+
not measured.
|
|
244
385
|
- **Why not higher or lower?** `high` scored about the same at a higher cost,
|
|
245
386
|
`xhigh` added more marginal findings, and `low` missed more issues, including
|
|
246
387
|
High-severity ones.
|
|
@@ -248,15 +389,18 @@ and reasoning effort** on the same 50 PRs:
|
|
|
248
389
|
`/pr-review` with GPT-6 Luna at its default effort posted 91 comments and
|
|
249
390
|
matched 27.8% of the expected issues; the recommended deep setup posted 323
|
|
250
391
|
and matched 65.2% (one run each, scored by our local judge). A smaller model
|
|
251
|
-
in `models.review` trades issues found for cost and time, so run
|
|
252
|
-
or set stronger review models, where a missed defect costs more.
|
|
392
|
+
in `models.review.reviewers` trades issues found for cost and time, so run
|
|
393
|
+
`/pr-deep`, or set stronger review models, where a missed defect costs more.
|
|
394
|
+
Our own judge's runs while 0.5.0 was designed show the same: a pass of
|
|
395
|
+
GPT-6 Luna at its default effort found less than half of what a pass of
|
|
396
|
+
GPT-6.1 Terra found.
|
|
253
397
|
|
|
254
398
|
The full method, the comparison of all 12 combinations and the limits are in
|
|
255
399
|
the [validation record](docs/VALIDATION.md#martian-code-review-bench-2026-11-05-and-06).
|
|
256
400
|
|
|
257
401
|
### Checked on a second benchmark
|
|
258
402
|
|
|
259
|
-
Two
|
|
403
|
+
Two releases of the earlier pipeline were checked on ReviewBench's test set, which was not used
|
|
260
404
|
to write their changes: recall stayed within the run-to-run variation, and
|
|
261
405
|
agreement with the judge on which findings deserve an inline comment rose from
|
|
262
406
|
70.0 (0.3.5) to 83.0 (0.3.7).
|
|
@@ -314,10 +458,16 @@ If you need an unattended review on every PR event, look for a webhook or CI
|
|
|
314
458
|
integration; AZPR runs when you invoke a command. If your work includes editing
|
|
315
459
|
code or running the project's tests, use a local checkout for that work.
|
|
316
460
|
|
|
461
|
+
If you need a second stage to re-check every finding before you see it, AZPR
|
|
462
|
+
has none since 0.5.0: each reviewer checks its own findings against the
|
|
463
|
+
source, and you read the preview before anything is posted.
|
|
464
|
+
|
|
317
465
|
The [validation record](docs/VALIDATION.md) includes real model/Azure runs, a
|
|
318
466
|
316-file test PR, isolated OpenCode host checks, and an offline test suite for
|
|
319
467
|
runtime and packaging behavior. It also records missed defects and untested
|
|
320
|
-
environments.
|
|
468
|
+
environments. Each of its sections names the version it was made with; runs
|
|
469
|
+
before 0.5.0 used the earlier pipeline, with two reviewers and a verifier. The
|
|
470
|
+
demo shows the workflow; for review quality, see the
|
|
321
471
|
[benchmark results](#benchmark-results), and expect findings to vary between
|
|
322
472
|
models and runs.
|
|
323
473
|
|
|
@@ -325,17 +475,17 @@ models and runs.
|
|
|
325
475
|
|
|
326
476
|
| Component | Tested target |
|
|
327
477
|
| --- | --- |
|
|
328
|
-
| OpenCode | **OpenCode CLI 2.3.
|
|
478
|
+
| OpenCode | **OpenCode CLI 2.3.2** (`@opencode/cli`; V2 plugin API). On another OpenCode 2.x, `/pr-check` shows an OpenCode WARNING row and reviews still run. OpenCode 1.x is not supported. |
|
|
329
479
|
| Operating system | **Ubuntu 22.04** (validation environment: WSL2). Other operating systems are not yet validated. |
|
|
330
480
|
| Azure | **Azure DevOps Services**, REST API **7.1**. Azure DevOps Server is not supported by the current URL handling. |
|
|
331
481
|
| Installation | OpenCode's plugin manager with the npm package or the versioned Git package, or the source installer with POSIX `sh` and Python 3; no plugin build step or npm dependencies. |
|
|
332
482
|
| Terminal UI | The [review panel](#terminal-panel) and the [setup dialogs](#setup-in-the-terminal-ui) need OpenCode's terminal UI. Other clients, such as the desktop app, show AZPR's notices as text and take `/pr-setup` with options. |
|
|
333
|
-
| Models | Your OpenCode provider/model IDs
|
|
483
|
+
| Models | Your OpenCode provider/model IDs. Reviewer models need tool support; a model named only as `rater` does not. Each mode checks the models it uses. Name a concrete model, not one that routes each session to another model (see [configuration](#configuration)). |
|
|
334
484
|
|
|
335
485
|
The npm package, the Git package and the release source archive contain the
|
|
336
486
|
same runtime. A fresh installation exposes `/pr-setup` before
|
|
337
487
|
reviewing is enabled; the [quickstart](docs/QUICKSTART.md) configures one model
|
|
338
|
-
for
|
|
488
|
+
for `/pr-review` (two passes) and `/pr-quick` (one pass).
|
|
339
489
|
|
|
340
490
|
## Documentation
|
|
341
491
|
|
|
@@ -365,48 +515,66 @@ comments, and what is kept on your machine.
|
|
|
365
515
|
latest iteration's source commit and merge base, and the complete
|
|
366
516
|
changed-file list. Reviewers read the repository through AZPR's own
|
|
367
517
|
read-only tools at exact commits.
|
|
368
|
-
2.
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
518
|
+
2. **Reviewer passes.** Each model in the mode's list
|
|
519
|
+
(`models.<mode>.reviewers`) is one pass: an independent session for every
|
|
520
|
+
**shard**, a bounded group of changed files. A reviewer covers function and
|
|
521
|
+
failure behaviour, reads beyond the diff where a change reaches, and
|
|
522
|
+
checks each of its findings against the source it read before it answers.
|
|
523
|
+
Passes do not see each other's work. A shard that fills its model context
|
|
524
|
+
is split in half and run again instead of failing. Reviewer sessions never
|
|
525
|
+
compact: AZPR also refuses OpenCode's background summary in them
|
|
526
|
+
(`compaction.background`, on by default in 2.3.2;
|
|
527
|
+
`experimental.background_compaction` in earlier releases) before anything
|
|
528
|
+
is sent, and that refusal ends nothing.
|
|
529
|
+
3. **The runtime's checks.** The runtime checks the form and the source of
|
|
530
|
+
every finding, never whether the defect is real: its fields are there, its
|
|
531
|
+
location exists at the reviewed commit, and the session that reports it
|
|
532
|
+
read that file. An answer that breaks the output contract gets a short
|
|
533
|
+
**correction turn** in the same session. A finding that still fails is
|
|
534
|
+
NEEDS_INFO and is never commented on; the rest of the review is kept.
|
|
535
|
+
Findings that pass are REPORTED. The runtime numbers the findings
|
|
536
|
+
`F-1 β¦ F-n` in a fixed order (by place, then by pass) and removes records
|
|
537
|
+
that are identical in every field.
|
|
538
|
+
4. **Duplicate check.** Where different reviewer sessions reported findings
|
|
539
|
+
on one side of one file, one session of the first reviewer model compares
|
|
540
|
+
them and merges repeated reports of one defect: the same root cause and
|
|
541
|
+
the same correction. It never merges two findings of one session, and a
|
|
542
|
+
check that fails keeps every finding.
|
|
543
|
+
5. **Severity rating.** Sessions without tools rate the reported findings
|
|
544
|
+
from their text alone, without the level their reviewer gave them, so that
|
|
545
|
+
the findings of different reviewers stand on one scale.
|
|
546
|
+
`models.<mode>.rater` says which model rates: the first reviewer model
|
|
547
|
+
(`""`, the default), a model you name, or none (`false`: the reviewers'
|
|
548
|
+
levels stay). A finding without a usable rating keeps its reviewer's
|
|
549
|
+
level.
|
|
550
|
+
6. The runtime rechecks the PR versions. Only a changed **source** commit makes
|
|
387
551
|
the review STALE; a moved base is reported as a warning.
|
|
388
|
-
|
|
389
|
-
posts the saved text itself, skipping comments
|
|
390
|
-
reading every created comment back from Azure
|
|
391
|
-
is safe. A COMPLETE review is followed by a
|
|
392
|
-
a flag after the PR URL says otherwise
|
|
552
|
+
7. `/pr-comment` plans a preview with the mode's first reviewer model. With
|
|
553
|
+
`--publish`, the runtime posts the saved text itself, skipping comments
|
|
554
|
+
that already exist and reading every created comment back from Azure
|
|
555
|
+
DevOps. Re-running a publish is safe. A COMPLETE review is followed by a
|
|
556
|
+
preview unless `afterReview` or a flag after the PR URL says otherwise
|
|
393
557
|
([automatic comments](#automatic-comments)).
|
|
394
558
|
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
(
|
|
409
|
-
|
|
559
|
+
**No stage verifies a finding.** Nothing re-checks a finding after its
|
|
560
|
+
reviewer. The report says so in its first lines, the receipt says
|
|
561
|
+
`verification none`, and the disclosure line of every posted comment reads
|
|
562
|
+
`Review method: findings checked by their reviewer against the source, no
|
|
563
|
+
separate verification`. More passes find more defects; a finding that two
|
|
564
|
+
passes reported is not confirmed by that.
|
|
565
|
+
|
|
566
|
+
With several passes, coverage has two numbers: the changed files reviewed in
|
|
567
|
+
at least one pass, and those reviewed in every pass. A pass that fails costs
|
|
568
|
+
depth, which the second number and a warning show; a file is unreviewed only
|
|
569
|
+
when no pass reviewed it.
|
|
570
|
+
|
|
571
|
+
`/pr-quick` and `/pr-deep` run this same review with the models listed for
|
|
572
|
+
them (`models.quick.reviewers`, `models.deep.reviewers`). An empty list leaves
|
|
573
|
+
the command off, and no mode falls back to another mode's models. `/pr-quick`
|
|
574
|
+
is meant for one pass of a fast model on small or routine PRs, `/pr-deep` for
|
|
575
|
+
stronger models, a higher variant or more passes on the PRs that need them.
|
|
576
|
+
`/pr-check` says when `/pr-deep` is off or its models repeat the review
|
|
577
|
+
models.
|
|
410
578
|
|
|
411
579
|
Readiness checks, reviews, comment planning, adjustments and publication
|
|
412
580
|
acknowledge `STARTED` and continue in the current OpenCode process; short
|
|
@@ -435,14 +603,14 @@ Azure DevOps REST API with the runtime's built-in `fetch`.
|
|
|
435
603
|
Install the npm package with OpenCode's plugin manager:
|
|
436
604
|
|
|
437
605
|
```sh
|
|
438
|
-
opencode plugin add opencode-azure-devops-pr-review@0.
|
|
606
|
+
opencode plugin add opencode-azure-devops-pr-review@0.5.0
|
|
439
607
|
```
|
|
440
608
|
|
|
441
609
|
The same release is also a versioned Git package, which needs Git but not the
|
|
442
610
|
npm registry:
|
|
443
611
|
|
|
444
612
|
```sh
|
|
445
|
-
opencode plugin add 'github:WTLAIB/opencode-azure-devops-pr-review-v2#v0.
|
|
613
|
+
opencode plugin add 'github:WTLAIB/opencode-azure-devops-pr-review-v2#v0.5.0'
|
|
446
614
|
```
|
|
447
615
|
|
|
448
616
|
Add only one of them. OpenCode 2.3.0 loads the plugin into a running OpenCode
|
|
@@ -457,7 +625,7 @@ To select another configuration file, use an absolute path in the host config:
|
|
|
457
625
|
```json
|
|
458
626
|
{
|
|
459
627
|
"plugins": [{
|
|
460
|
-
"package": "opencode-azure-devops-pr-review@0.
|
|
628
|
+
"package": "opencode-azure-devops-pr-review@0.5.0",
|
|
461
629
|
"options": { "settingsFile": "/absolute/path/to/azpr/settings.json" }
|
|
462
630
|
}]
|
|
463
631
|
}
|
|
@@ -482,7 +650,7 @@ For an entry that `opencode plugin add` created, add the new version and,
|
|
|
482
650
|
only when that succeeds, remove the previous one:
|
|
483
651
|
|
|
484
652
|
```sh
|
|
485
|
-
opencode plugin add opencode-azure-devops-pr-review@0.
|
|
653
|
+
opencode plugin add opencode-azure-devops-pr-review@0.5.0 &&
|
|
486
654
|
opencode plugin remove opencode-azure-devops-pr-review@PREVIOUS_VERSION
|
|
487
655
|
```
|
|
488
656
|
|
|
@@ -501,7 +669,9 @@ AZPR's commands disappear until the package is available and the service
|
|
|
501
669
|
restarts.
|
|
502
670
|
|
|
503
671
|
External settings, the PAT file and review records stay in place; a working
|
|
504
|
-
configuration needs no new `/pr-setup
|
|
672
|
+
configuration needs no new `/pr-setup`, with one exception: the settings of
|
|
673
|
+
0.4.x need an update that you confirm (see
|
|
674
|
+
[upgrading from 0.4.x](#upgrading-from-04x)). Settings that a new version brings
|
|
505
675
|
are written into your settings file, at their defaults, when OpenCode first
|
|
506
676
|
loads that version: AZPR behaves as it did, and each new setting is in the
|
|
507
677
|
file for you to change. `/pr-check` then lists what was added. Your values
|
|
@@ -514,7 +684,9 @@ the first one (`Unknown setting settings.terminalPanel`) instead of starting. `o
|
|
|
514
684
|
show a single `azpr` row with the new version (from 0.3.1, `/pr-check` names
|
|
515
685
|
it too); if it still shows the previous one, run `opencode service restart`.
|
|
516
686
|
Exact versions stay pinned, so `opencode plugin update` leaves them unchanged.
|
|
517
|
-
See the [0.
|
|
687
|
+
See the [0.5.0 release notes](docs/releases/v0.5.0.md) for what changed, the
|
|
688
|
+
[0.4.6 release notes](docs/releases/v0.4.6.md) for one comment for a defect at several places, the
|
|
689
|
+
[0.4.5 release notes](docs/releases/v0.4.5.md) for stopping a run from the panel, the
|
|
518
690
|
[0.4.4 release notes](docs/releases/v0.4.4.md) for the steps at the panel's foot, the
|
|
519
691
|
[0.4.3 release notes](docs/releases/v0.4.3.md) for setup in the terminal UI, the
|
|
520
692
|
[0.4.0 release notes](docs/releases/v0.4.0.md) for commands without review IDs and the
|
|
@@ -523,13 +695,75 @@ preview follows each COMPLETE review unless `afterReview` says otherwise;
|
|
|
523
695
|
automatic publication stays off unless you configure it or request it with a
|
|
524
696
|
review command flag.
|
|
525
697
|
|
|
698
|
+
#### Upgrading from 0.4.x
|
|
699
|
+
|
|
700
|
+
0.5.0 reviews with a list of reviewer models per mode and has no verifier, so
|
|
701
|
+
its settings file has another layout (`"version": 3`). A settings file of
|
|
702
|
+
0.4.x (`"version": 2`) is kept exactly as it is and is not used until you
|
|
703
|
+
have confirmed its update:
|
|
704
|
+
|
|
705
|
+
1. After the upgrade, AZPR's review commands only answer
|
|
706
|
+
`[AZPR] SETTINGS UPDATE REQUIRED`, and OpenCode's command list describes
|
|
707
|
+
them as `AZPR is not ready here; run /pr-setup to see what it needs`. No
|
|
708
|
+
review and no Azure request starts.
|
|
709
|
+
2. Run `/pr-setup`. It shows what the update changes before anything is
|
|
710
|
+
written:
|
|
711
|
+
- for `/pr-review` and for `/pr-deep`, the functional and the risk model
|
|
712
|
+
become the mode's two passes, in that order, and the verifier model is
|
|
713
|
+
dropped;
|
|
714
|
+
- the quick reviewer becomes a list of one;
|
|
715
|
+
- a named `rater` stays. A mode without one gets its findings rated by its
|
|
716
|
+
first reviewer model from now on; `"rater": false` in the settings file
|
|
717
|
+
turns that off;
|
|
718
|
+
- a mode that was off stays off, also `/pr-deep` with only some of its
|
|
719
|
+
three models set;
|
|
720
|
+
- `workflow.shardFindings` and `models._help` are dropped, and every other
|
|
721
|
+
setting keeps its value. The update repairs nothing: a value 0.4.x could
|
|
722
|
+
not use, or a setting this version does not know, stays as it is, and
|
|
723
|
+
`/pr-setup` names it afterwards;
|
|
724
|
+
- where `afterReview` is `publish`, the comments of new reviews are posted
|
|
725
|
+
automatically as before, although no verifier confirmed their findings.
|
|
726
|
+
Set that mode to `preview` to read the comments first.
|
|
727
|
+
3. Confirm. In OpenCode's terminal UI a list asks, and its first row, **Not
|
|
728
|
+
now**, keeps the file. In other clients `/pr-setup` prints the changes and
|
|
729
|
+
the command that confirms them:
|
|
730
|
+
|
|
731
|
+
```text
|
|
732
|
+
/pr-setup --migrate <word>
|
|
733
|
+
```
|
|
734
|
+
|
|
735
|
+
The word names the very change that was shown. When the settings file
|
|
736
|
+
changed since, or OpenCode was restarted, it fits no longer: run
|
|
737
|
+
`/pr-setup` again and use the word it shows. `--migrate` stands alone, and
|
|
738
|
+
every other option of `/pr-setup` is refused until the file is updated.
|
|
739
|
+
4. The updated file is loaded at once by the OpenCode process that updated
|
|
740
|
+
it; `/pr-check <PR URL>` then shows each mode's passes and which model
|
|
741
|
+
rates. Another OpenCode process, or another project directory of the same
|
|
742
|
+
one, reads it after `opencode service restart`.
|
|
743
|
+
|
|
744
|
+
Every settings file of 0.4.x takes this one way, also a file with a fault or
|
|
745
|
+
one that was never completed, such as starter settings with a placeholder for
|
|
746
|
+
a model. The update changes the layout and repairs nothing: the changes it
|
|
747
|
+
shows then end with `After the update the settings still cannot be used: β¦`,
|
|
748
|
+
and after the update `/pr-setup` sets what is missing.
|
|
749
|
+
|
|
750
|
+
Nothing is changed until you confirm. The update replaces the file and keeps
|
|
751
|
+
no copy, and 0.4.x refuses a version-3 file (`settings.version must be 2`),
|
|
752
|
+
so copy the file first if you may want to go back. Reviews that 0.4.x saved
|
|
753
|
+
stay: they can still be listed, shown, previewed and published, and their
|
|
754
|
+
comments keep the wording of the version that made them.
|
|
755
|
+
|
|
756
|
+
A source installation is replaced with `sh install.sh --replace` as before:
|
|
757
|
+
the installer carries a version-2 settings file over exactly as it is and
|
|
758
|
+
says so, and `/pr-setup` then updates it as above.
|
|
759
|
+
|
|
526
760
|
### Source archive or checkout
|
|
527
761
|
|
|
528
762
|
<details>
|
|
529
763
|
<summary>Source installation and replacement</summary>
|
|
530
764
|
|
|
531
|
-
Download the [v0.
|
|
532
|
-
and extract it, or check out tag `v0.
|
|
765
|
+
Download the [v0.5.0 source archive](https://github.com/WTLAIB/opencode-azure-devops-pr-review-v2/archive/refs/tags/v0.5.0.tar.gz)
|
|
766
|
+
and extract it, or check out tag `v0.5.0`. The installer needs POSIX `sh` and
|
|
533
767
|
Python 3's standard library. From that source directory:
|
|
534
768
|
|
|
535
769
|
```sh
|
|
@@ -544,8 +778,9 @@ conflicting legacy files, reserved command names and unowned packages. Run
|
|
|
544
778
|
(with options: `/pr-setup ... --replace`), or edit them yourself and restart
|
|
545
779
|
OpenCode.
|
|
546
780
|
|
|
547
|
-
To replace an existing source installation (current settings are kept
|
|
548
|
-
are added
|
|
781
|
+
To replace an existing source installation (current settings are kept and new
|
|
782
|
+
defaults are added; a settings file of 0.4.x is carried over exactly as it is,
|
|
783
|
+
see [upgrading from 0.4.x](#upgrading-from-04x)):
|
|
549
784
|
|
|
550
785
|
```sh
|
|
551
786
|
sh install.sh --config-dir /absolute/path/to/v2-opencode-config --replace
|
|
@@ -556,7 +791,7 @@ sh install.sh --config-dir /absolute/path/to/v2-opencode-config --replace
|
|
|
556
791
|
### Manual copying without Git
|
|
557
792
|
|
|
558
793
|
Keep these relative paths under one source directory, then run its installer.
|
|
559
|
-
These **
|
|
794
|
+
These **33 files** include the runtime and its license:
|
|
560
795
|
|
|
561
796
|
<details>
|
|
562
797
|
<summary>Show the required files</summary>
|
|
@@ -590,12 +825,9 @@ src/tui-setup.mjs
|
|
|
590
825
|
src/tui-actions.mjs
|
|
591
826
|
src/tui.js
|
|
592
827
|
src/prompts/common.md
|
|
593
|
-
src/prompts/
|
|
594
|
-
src/prompts/risk.md
|
|
595
|
-
src/prompts/final.md
|
|
828
|
+
src/prompts/review.md
|
|
596
829
|
src/prompts/dedupe.md
|
|
597
830
|
src/prompts/rating.md
|
|
598
|
-
src/prompts/quick.md
|
|
599
831
|
src/prompts/comment-policy.md
|
|
600
832
|
src/prompts/comment-plan.md
|
|
601
833
|
```
|
|
@@ -626,16 +858,17 @@ command palette has them too ("AZPR: settings").
|
|
|
626
858
|
|
|
627
859
|
[](docs/QUICKSTART.md#3-set-azpr-up-opencodes-terminal-ui)
|
|
628
860
|
|
|
629
|
-
*AZPR's dialogs in OpenCode 2.3.0's terminal UI, recorded with a
|
|
630
|
-
organization and token and a stand-in for Azure DevOps; waiting time is
|
|
631
|
-
shortened
|
|
861
|
+
*AZPR's dialogs in OpenCode 2.3.0's terminal UI, recorded with AZPR 0.4.4, a
|
|
862
|
+
test organization and token and a stand-in for Azure DevOps; waiting time is
|
|
863
|
+
shortened. A first setup asks the same questions in 0.5.0; its summary now
|
|
864
|
+
says that the model gets two passes of `/pr-review` and one of `/pr-quick`.*
|
|
632
865
|
|
|
633
866
|
- **First setup.** Your organization (its name, or the URL of a pull request);
|
|
634
867
|
a proxy, only if your network needs one (Enter skips it; after a proxy, the
|
|
635
868
|
CA certificate file of a company that inspects HTTPS, which Enter skips
|
|
636
|
-
too); your token; and a model from OpenCode's list, which
|
|
637
|
-
|
|
638
|
-
is checked over the network.
|
|
869
|
+
too); your token; and a model from OpenCode's list, which AZPR lists twice
|
|
870
|
+
for `/pr-review` (two passes) and once for `/pr-quick`. The proxy is asked
|
|
871
|
+
before the token because the token is checked over the network.
|
|
639
872
|
- **The token** is typed or pasted into a field that shows only how many
|
|
640
873
|
characters it holds. AZPR asks Azure DevOps once whether the token works for
|
|
641
874
|
your organization, and says what was refused when it does not: the token,
|
|
@@ -656,18 +889,28 @@ shortened.*
|
|
|
656
889
|
saved for the organization it was checked for; the two are saved together,
|
|
657
890
|
the new token in a new file beside the first, and AZPR says where the
|
|
658
891
|
earlier token still is.
|
|
659
|
-
The list says what each model is for
|
|
660
|
-
one
|
|
661
|
-
|
|
892
|
+
The list says what each model row is for and shows its passes: `MODEL Γ2`
|
|
893
|
+
for two passes of one model, `A + B` for one pass each of two. A model row
|
|
894
|
+
asks for one model and then for the passes: take what is shown (two passes
|
|
895
|
+
for `/pr-review` and `/pr-deep`, one for `/pr-quick`), add a pass of the
|
|
896
|
+
same or of another model, or take the last one away, up to four passes.
|
|
897
|
+
The dialog of the deep models says what makes them: a model stronger than
|
|
898
|
+
the review model, or the same model with a higher variant.
|
|
662
899
|
The other settings are in the settings file, which the list names together
|
|
663
900
|
with the section that describes them all:
|
|
664
901
|
[all settings and defaults](#all-settings-and-defaults).
|
|
902
|
+
- **Settings of 0.4.x.** When the settings file is from 0.4.x, `/pr-setup`
|
|
903
|
+
first shows what the update to this version changes, then asks in a list
|
|
904
|
+
whose first row, **Not now**, keeps the file (see
|
|
905
|
+
[upgrading from 0.4.x](#upgrading-from-04x)).
|
|
665
906
|
|
|
666
907
|

|
|
667
908
|
|
|
668
909
|
*The list goes on below what is shown: the settings of reviews, of the terminal
|
|
669
910
|
UI and of diagnostics, and the settings file. Recorded like the picture above,
|
|
670
|
-
with test values
|
|
911
|
+
with test values and AZPR 0.4.4, whose model rows read Review model, Quick
|
|
912
|
+
model and Deep model. Since 0.5.0 they read Review models, Quick models and
|
|
913
|
+
Deep models, and each shows its passes.*
|
|
671
914
|
|
|
672
915
|
The dialogs only ask. The plugin's server part checks every answer, writes
|
|
673
916
|
the two files, and is the only part that contacts Azure DevOps. Other OpenCode
|
|
@@ -677,8 +920,8 @@ prints the instructions and takes options.
|
|
|
677
920
|
### Setup with options
|
|
678
921
|
|
|
679
922
|
Without the terminal UI, or from a script, one command sets the organization,
|
|
680
|
-
an existing PAT file and
|
|
681
|
-
calling a model or Azure:
|
|
923
|
+
an existing PAT file and one model, listed twice for `/pr-review` (two passes)
|
|
924
|
+
and once for `/pr-quick`, without calling a model or Azure:
|
|
682
925
|
|
|
683
926
|
```text
|
|
684
927
|
/pr-setup --organization YOUR_ORG --model YOUR_PROVIDER/YOUR_MODEL --pat-file "/absolute/path/to/pat"
|
|
@@ -700,9 +943,9 @@ Each of these options changes one setting of existing settings, without
|
|
|
700
943
|
| --- | --- |
|
|
701
944
|
| `--proxy URL` (or `none`) | `azure.proxy` |
|
|
702
945
|
| `--ca-file PATH` (or `none`) | `azure.caFile` |
|
|
703
|
-
| `--review-model
|
|
704
|
-
| `--quick-model
|
|
705
|
-
| `--deep-model
|
|
946
|
+
| `--review-model MODELS` | `models.review.reviewers` |
|
|
947
|
+
| `--quick-model MODELS` (or `off`) | `models.quick.reviewers` |
|
|
948
|
+
| `--deep-model MODELS` (or `off`) | `models.deep.reviewers` |
|
|
706
949
|
| `--language TAG` | `outputLanguage` |
|
|
707
950
|
| `--after-review preview`, `none` or `publish` | `afterReview` of every mode |
|
|
708
951
|
| `--report receipt` or `full` | `returnReport` |
|
|
@@ -710,24 +953,52 @@ Each of these options changes one setting of existing settings, without
|
|
|
710
953
|
| `--panel auto` or `manual` | `terminalPanel` |
|
|
711
954
|
| `--debug on` or `off` | `debug.enabled` |
|
|
712
955
|
|
|
956
|
+
`MODELS` is a mode's review passes, in order:
|
|
957
|
+
|
|
958
|
+
```text
|
|
959
|
+
/pr-setup --review-model YOUR_PROVIDER/YOUR_MODEL two passes of one model
|
|
960
|
+
/pr-setup --review-model YOUR_PROVIDER/YOUR_MODEL*1 one pass
|
|
961
|
+
/pr-setup --review-model PROVIDER_A/MODEL_A,PROVIDER_B/MODEL_B one pass each of two models
|
|
962
|
+
/pr-setup --review-model PROVIDER_A/MODEL_A*2,PROVIDER_B/MODEL_B three passes
|
|
963
|
+
/pr-setup --deep-model YOUR_PROVIDER/YOUR_STRONGER_MODEL#high two passes of a stronger model for /pr-deep
|
|
964
|
+
/pr-setup --quick-model off /pr-quick off
|
|
965
|
+
```
|
|
966
|
+
|
|
967
|
+
A model named alone gets the mode's usual number of passes: two for
|
|
968
|
+
`/pr-review` and `/pr-deep`, one for `/pr-quick`. `MODEL*N` sets the number,
|
|
969
|
+
and entries separated by commas run different models, at most four passes in
|
|
970
|
+
all. With another option in the same command:
|
|
971
|
+
|
|
713
972
|
```text
|
|
714
973
|
/pr-setup --language zh-TW --deep-model YOUR_PROVIDER/YOUR_STRONGER_MODEL
|
|
715
974
|
```
|
|
716
975
|
|
|
717
976
|
They also go with the options of a first setup, for example `--proxy` behind
|
|
718
977
|
a company proxy. After a change to settings that are in use, restart the
|
|
719
|
-
OpenCode service.
|
|
978
|
+
OpenCode service. `rater` has no option: like every setting without one, it
|
|
979
|
+
is changed in the settings file, where the models look like this:
|
|
720
980
|
|
|
721
981
|
```json
|
|
722
982
|
{
|
|
983
|
+
"version": 3,
|
|
723
984
|
"models": {
|
|
724
985
|
"review": {
|
|
725
|
-
"
|
|
726
|
-
|
|
727
|
-
|
|
986
|
+
"reviewers": [
|
|
987
|
+
"YOUR_PROVIDER/YOUR_MODEL",
|
|
988
|
+
"YOUR_PROVIDER/YOUR_MODEL"
|
|
989
|
+
],
|
|
990
|
+
"rater": ""
|
|
728
991
|
},
|
|
729
|
-
"deep": {
|
|
730
|
-
|
|
992
|
+
"deep": {
|
|
993
|
+
"reviewers": [],
|
|
994
|
+
"rater": ""
|
|
995
|
+
},
|
|
996
|
+
"quick": {
|
|
997
|
+
"reviewers": [
|
|
998
|
+
"YOUR_PROVIDER/YOUR_MODEL"
|
|
999
|
+
],
|
|
1000
|
+
"rater": ""
|
|
1001
|
+
}
|
|
731
1002
|
},
|
|
732
1003
|
"azure": {
|
|
733
1004
|
"organization": "YOUR_ORGANIZATION",
|
|
@@ -739,19 +1010,23 @@ OpenCode service. For separate models per role, edit the settings file:
|
|
|
739
1010
|
Model IDs use `provider/model` form and must exist in OpenCode. To choose a
|
|
740
1011
|
model variant such as a reasoning effort, use OpenCode's `provider/model#variant`
|
|
741
1012
|
form (for example `provider/model#high`); `/pr-check` reports a variant the
|
|
742
|
-
model does not offer. Without a variant the model's default is used.
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
`
|
|
753
|
-
|
|
754
|
-
|
|
1013
|
+
model does not offer. Without a variant the model's default is used.
|
|
1014
|
+
|
|
1015
|
+
Each entry of `reviewers` is one review pass: an independent session per shard
|
|
1016
|
+
that reviews every changed file. A list holds one to four entries, and an
|
|
1017
|
+
entry may repeat. `/pr-review` needs at least one. An empty list leaves
|
|
1018
|
+
`/pr-deep` or `/pr-quick` off, and no mode falls back to another mode's
|
|
1019
|
+
models; a command checks only the models it uses, so an unavailable quick
|
|
1020
|
+
model never blocks `/pr-review`. The first entry also runs the duplicate
|
|
1021
|
+
check and plans the comments.
|
|
1022
|
+
|
|
1023
|
+
`rater` says which model rates the severities of a mode's findings:
|
|
1024
|
+
|
|
1025
|
+
| `rater` | Who rates |
|
|
1026
|
+
| --- | --- |
|
|
1027
|
+
| `""` (the default) | The mode's first reviewer model. |
|
|
1028
|
+
| `"provider/model"` | That model. It reads only the findings' text, so it needs no tool support. |
|
|
1029
|
+
| `false` | Nobody: the reviewers' own levels stay. |
|
|
755
1030
|
|
|
756
1031
|
Name the model that should do the work. AZPR binds every private session to
|
|
757
1032
|
the exact model in its settings and refuses a request that OpenCode sends on
|
|
@@ -760,16 +1035,36 @@ session, such as GitHub Copilot's **Auto** (OpenCode 2.2.7 and later), cannot
|
|
|
760
1035
|
be an AZPR model: its sessions fail with `Model mismatch`. `/pr-check` finds
|
|
761
1036
|
such an entry in the model catalog and does not detect this.
|
|
762
1037
|
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
1038
|
+
How to choose the lists:
|
|
1039
|
+
|
|
1040
|
+
- **Start with one model.** `/pr-setup` lists it twice for `/pr-review` and
|
|
1041
|
+
once for `/pr-quick`.
|
|
1042
|
+
- **Two passes for `/pr-review`.** Passes are independent, so a second pass
|
|
1043
|
+
finds defects the first one missed, also with the same model. More passes
|
|
1044
|
+
find more; they do not make a finding more certain.
|
|
1045
|
+
- **Two vendors, one pass each.** With models of two vendors, one pass each
|
|
1046
|
+
tends to find more than two passes of one model.
|
|
1047
|
+
- **A sound severity scale first.** The first entry also checks duplicates
|
|
1048
|
+
and, by default, rates every finding, those of the other models included.
|
|
1049
|
+
Put a model whose severity levels you trust first, or name a `rater`.
|
|
1050
|
+
- **`/pr-deep` is the same review** with stronger models, a higher variant
|
|
1051
|
+
(`provider/model#high`, which reasons longer) or more passes, for the PRs
|
|
1052
|
+
that need it.
|
|
1053
|
+
- **More passes mainly cost more.** They run side by side, within
|
|
1054
|
+
`workflow.parallelSessions`.
|
|
1055
|
+
- **`claude-agent` models need memory.** On OpenCode 2.3.2, each session of
|
|
1056
|
+
OpenCode's `claude-agent` provider keeps a local process until OpenCode
|
|
1057
|
+
exits (for the background service: until `opencode service restart`). A
|
|
1058
|
+
review starts one session per pass and shard, plus its duplicate checks,
|
|
1059
|
+
its rating and its comment planning, so many passes over many shards add
|
|
1060
|
+
up.
|
|
1061
|
+
|
|
1062
|
+
What was measured about these choices, with which models, judge and version,
|
|
1063
|
+
is in the [validation record](docs/VALIDATION.md).
|
|
1064
|
+
|
|
1065
|
+
A reviewer's two focuses, function and failure behaviour, order its attention
|
|
1066
|
+
and are not a filter: every reviewer files every concrete defect it finds, in
|
|
1067
|
+
any area, as a finding. A finding's severity
|
|
773
1068
|
says how much it matters to fix it before the change merges, judged from the
|
|
774
1069
|
harm the evidence shows and how often realistic use reaches it, not from the
|
|
775
1070
|
reviewer's confidence, the size of the fix or the kind of issue:
|
|
@@ -797,19 +1092,19 @@ suggestion asks them to confirm or document the intent. Before asking, a
|
|
|
797
1092
|
reviewer looks for a statement of that intent in the tests, the comments and
|
|
798
1093
|
documents beside the code, the PR description and the commit messages.
|
|
799
1094
|
An easy fix and an effect the reviewer could not confirm are not reasons for a
|
|
800
|
-
lower level. The
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
1095
|
+
lower level. The reviewer sets a first level; the severity rating then sets
|
|
1096
|
+
the final one from the finding's text, without seeing the reviewer's level,
|
|
1097
|
+
and the report shows both where they differ. With `rater: false` the
|
|
1098
|
+
reviewer's level stays. Concrete gaps the change leaves are findings too, rated
|
|
804
1099
|
by their effect: a changed behavior no test would catch where the project
|
|
805
1100
|
already tests comparable code, a test that cannot fail, a comment or document
|
|
806
1101
|
that now contradicts the code, and duplicated or dead code the change adds. A
|
|
807
1102
|
missing test is low unless the test is what the change delivers, and a
|
|
808
1103
|
document is rated by what following it does; documented steps that worked
|
|
809
1104
|
before the change and fail after it are a regression (medium) even though the
|
|
810
|
-
failure shows at once. A
|
|
811
|
-
|
|
812
|
-
|
|
1105
|
+
failure shows at once. A concern that a reviewer could not confirm from the
|
|
1106
|
+
source goes into its report as an open question, not into the findings. A
|
|
1107
|
+
finding states one defect: a
|
|
813
1108
|
second one noticed on the way is filed on its own. A mistake repeated in places
|
|
814
1109
|
that each need their own fix is one finding per place. Identical copies of one file
|
|
815
1110
|
count as one place when one reviewer has them; in a large PR split into shards,
|
|
@@ -825,6 +1120,11 @@ restart the OpenCode service.
|
|
|
825
1120
|
|
|
826
1121
|
| Setting | Default and meaning |
|
|
827
1122
|
| --- | --- |
|
|
1123
|
+
| `version` | `3`, the settings layout of 0.5.0 and later. A file with `2` (AZPR 0.4.x) is not used until `/pr-setup` has updated it; see [upgrading from 0.4.x](#upgrading-from-04x). |
|
|
1124
|
+
| `models.review.reviewers` | Required: the review passes of `/pr-review`, in order, as a list of 1 to 4 models (`provider/model` or `provider/model#variant`; an entry may repeat). Each needs tool support. The first entry also checks duplicates and plans the comments. See [setup with options](#setup-with-options). |
|
|
1125
|
+
| `models.deep.reviewers` | `[]`: `/pr-deep` is off. Otherwise its passes, as for `/pr-review`: stronger models, a higher variant or more passes. |
|
|
1126
|
+
| `models.quick.reviewers` | `[]`: `/pr-quick` is off. Otherwise its passes, usually one fast model. |
|
|
1127
|
+
| `models.review.rater` / `.deep.rater` / `.quick.rater` | Which model rates the severities of that mode's findings; `""` each.<br>`""`: the mode's first reviewer model.<br>`"provider/model"`: that model (it needs no tool support).<br>`false`: no rating; the reviewers' own levels stay. |
|
|
828
1128
|
| `enabled` | `true`; `false` registers nothing. |
|
|
829
1129
|
| `returnReport` | `receipt`; `full` also encloses the rendered report in the receipt. |
|
|
830
1130
|
| `outputLanguage` | `en`; used by reviews, the report and comments. `zh-TW` for Traditional Chinese. |
|
|
@@ -843,18 +1143,22 @@ restart the OpenCode service.
|
|
|
843
1143
|
| `azure.proxy` | `""`: no AZPR proxy (`HTTPS_PROXY` and `NO_PROXY` in OpenCode's environment still apply; a host in `NO_PROXY` bypasses a set proxy too). A forward proxy for AZPR's Azure DevOps calls only, such as `http://proxy.example.com:8080`; credentials go in the URL as `http://user:password@host:port` (percent-encoded) and are never shown. See [proxies](docs/AZURE_DEVOPS.md#proxies-and-tls-inspection). |
|
|
844
1144
|
| `azure.caFile` | `""`. The absolute path of a PEM file with CA certificates AZPR trusts in addition to the built-in roots, for a proxy that inspects HTTPS. |
|
|
845
1145
|
| `azure.verifyTls` | `true`. `false` skips certificate checks for AZPR's Azure DevOps calls (like `curl -k`), so anyone who can intercept the connection can read the PAT; prefer `azure.caFile`. `/pr-check` warns while it is off. |
|
|
846
|
-
| `workflow.shardFiles` | `25` changed files per
|
|
847
|
-
| `workflow.
|
|
848
|
-
| `workflow.
|
|
849
|
-
| `workflow.repairAttempts` | `2` correction turns when an answer breaks the output contract. A quick review's one follow-up turn for unfinished work uses the same budget. |
|
|
1146
|
+
| `workflow.shardFiles` | `25` (1β1000) changed files per reviewer session. A shard that fills its model context is split in half. |
|
|
1147
|
+
| `workflow.parallelSessions` | `8` (1β16) private sessions at once within a command. Every pass of every shard shares it, so two passes over one shard run side by side. Lower it, to `4` for example, when the provider limits your request rate. It limits how many sessions run at once, not how many a review starts: with OpenCode's `claude-agent` provider each session keeps a local process until OpenCode exits (observed on OpenCode 2.3.2; about 200 MB per process was measured on OpenCode 2.2.4), so a review with many passes and shards needs that memory whatever this setting is. Comment planning runs at most two pages at once (one when this is `1`). |
|
|
1148
|
+
| `workflow.repairAttempts` | `2` correction turns when an answer breaks the output contract. A reviewer's one follow-up turn for unfinished work uses the same budget. |
|
|
850
1149
|
| `workflow.stageRetries` | `1` new-session retry after a transient failure (provider 429/5xx, an interrupted stream that OpenCode did not recover by itself) or an inactivity stop. While the provider's host cannot be reached (no DNS answer, no route), OpenCode 2.3.0 retries the request by itself for up to an hour; AZPR allows that, so the review waits instead of failing, and `/pr-stop` ends it. A used-up usage or spend limit (provider quota, ChatGPT or OpenCode Go usage limit, OpenCode free-model or spend limit) is named and not retried, whatever its status, and AZPR refuses OpenCode's own retries of it. |
|
|
851
1150
|
| `workflow.stageIdleSeconds` | `600` (`0` turns it off, otherwise 60β7200): a reviewer stage that shows no activity this long while it waits on OpenCode (the model stream, a tool or the host stopped responding) is stopped with `failure=idle` and an error naming its last activity, then retried in a new session. Every model request, streamed chunk of output, tool start or end and announced host retry restarts the window, so a stage that keeps working, including a long answer that keeps streaming, is never cut. With shell allowed, an approval or a command that takes longer counts as inactivity. |
|
|
852
1151
|
| `debug.enabled` / `debug.directory` / `debug.keepRuns` | `false` / `""` / `20` run directories kept (`0` keeps all); see [debugging](docs/DEBUGGING.md). |
|
|
853
1152
|
|
|
854
1153
|
`steps`, `maxStageCharacters`, `structuredOutput`, `comments`,
|
|
855
1154
|
`auxiliaryModels`, `outputRetries`, `verification` and `shellToolPermission`
|
|
856
|
-
are unsupported and rejected
|
|
857
|
-
|
|
1155
|
+
are unsupported and rejected. `mcp` is retired: a file that still has it is
|
|
1156
|
+
refused, with what to move into `azure`. The model settings of 0.4.x
|
|
1157
|
+
(`models.<mode>.functional`, `risk` and `verifier`, `models.quick.reviewer`,
|
|
1158
|
+
`models._help`) and `workflow.shardFindings` are unknown settings in a
|
|
1159
|
+
version-3 file; `/pr-setup` updates a version-2 file that has them (see
|
|
1160
|
+
[upgrading from 0.4.x](#upgrading-from-04x)). There is deliberately no
|
|
1161
|
+
per-stage step cap; see the
|
|
858
1162
|
[roadmap](docs/ROADMAP.md#deferred) for why. The inactivity watchdog
|
|
859
1163
|
(`workflow.stageIdleSeconds`) is not one: it stops only a stage that stopped
|
|
860
1164
|
working.
|
|
@@ -901,16 +1205,16 @@ troubleshooting.
|
|
|
901
1205
|
|
|
902
1206
|
| Command | Behavior |
|
|
903
1207
|
| --- | --- |
|
|
904
|
-
| `/pr-setup [options]` | Set AZPR up, or change its settings. Without options, the terminal UI asks in dialogs and checks the token with Azure DevOps (other clients get the instructions). With options: an organization, one model and an existing PAT file, or one setting per option, without an Azure request. No model request either way. A first setup is loaded at once; a later change needs a restart of the OpenCode service. |
|
|
905
|
-
| `/pr-check <PR URL> [context]` | Deterministic readiness check: PR metadata, changed files, a HEAD and BASE file read, discussions and model availability (configured quick and deep models only as warnings, and whether `/pr-deep` is off or would repeat `/pr-review`), and `afterReview` (the configured modes and posting identity, shown as information); warns when OpenCode has no permission hook to keep native read tools inside the project. No model is used. |
|
|
906
|
-
| `/pr-review <PR URL> [flag] [context]` |
|
|
907
|
-
| `/pr-deep <PR URL> [flag] [context]` | The same review with the
|
|
908
|
-
| `/pr-quick <PR URL> [flag] [context]` |
|
|
1208
|
+
| `/pr-setup [options]` | Set AZPR up, or change its settings. Without options, the terminal UI asks in dialogs and checks the token with Azure DevOps (other clients get the instructions). With options: an organization, one model and an existing PAT file, or one setting per option, or `--migrate <word>` alone to confirm the [update of settings of 0.4.x](#upgrading-from-04x), without an Azure request. No model request either way. A first setup is loaded at once; a later change needs a restart of the OpenCode service. |
|
|
1209
|
+
| `/pr-check <PR URL> [context]` | Deterministic readiness check: PR metadata, changed files, a HEAD and BASE file read, discussions, each mode's passes and which model rates, and model availability (configured quick and deep models only as warnings, and whether `/pr-deep` is off or would repeat `/pr-review`), and `afterReview` (the configured modes and posting identity, shown as information); warns when OpenCode has no permission hook to keep native read tools inside the project. No model is used. |
|
|
1210
|
+
| `/pr-review <PR URL> [flag] [context]` | One review pass per model of `models.review.reviewers`, then the duplicate check and the severity rating. Findings are reported, not verified. |
|
|
1211
|
+
| `/pr-deep <PR URL> [flag] [context]` | The same review with the models of `models.deep.reviewers`: stronger models, a higher variant or more passes. Off while that list is empty. |
|
|
1212
|
+
| `/pr-quick <PR URL> [flag] [context]` | The same review with the models of `models.quick.reviewers`, usually one pass of a fast model. Off while that list is empty. |
|
|
909
1213
|
| `/pr-stop [run-id]` | Cancel this conversation's active command. The terminal panel offers the same while a run is under way (**Stop this runβ¦**). |
|
|
910
1214
|
| `/pr-comment [review-id]` | Preview comments for this conversation's current review. |
|
|
911
1215
|
| `/pr-comment [review-id] --publish` | Post the saved preview. A review that was never adjusted is planned first if needed; an adjusted one needs its new preview. Safe to repeat. |
|
|
912
1216
|
| `/pr-comment [review-id] --show` | Show the saved preview again; no model or Azure DevOps request. |
|
|
913
|
-
| `/pr-comment [review-id] --exclude <IDs>` / `--severity <ID=level,β¦>` / `--reset` | Leave findings out or change their severity after reading the preview, then preview again, for example `--exclude F-1,
|
|
1217
|
+
| `/pr-comment [review-id] --exclude <IDs>` / `--severity <ID=level,β¦>` / `--reset` | Leave findings out or change their severity after reading the preview, then preview again, for example `--exclude F-1,F-2` (see [adjusting findings](docs/COMMENTING.md#adjusting-findings-after-a-preview)). |
|
|
914
1218
|
| `/pr-comment --list` | The reviews saved for this conversation, with their IDs, PRs and state; no model or Azure DevOps request. |
|
|
915
1219
|
| `/pr-comment β¦ --seen <word>` | What the terminal panel adds to the commands it sends: the word names the preview and the adjustments its step was offered for, and the command is refused when they have changed since. A typed command needs none. |
|
|
916
1220
|
| `/<command> --help` | The command's usage and examples; no model or Azure DevOps request. |
|
|
@@ -932,32 +1236,39 @@ Text after the URL (and the flag) is supplementary context for that command
|
|
|
932
1236
|
only. PR content, comments and tool responses are untrusted data.
|
|
933
1237
|
|
|
934
1238
|
<details>
|
|
935
|
-
<summary>Status meanings: COMPLETE, STALE, PARTIAL, and what a
|
|
1239
|
+
<summary>Status meanings: COMPLETE, STALE, PARTIAL, and what a receipt states</summary>
|
|
936
1240
|
|
|
937
|
-
- **COMPLETE**:
|
|
938
|
-
|
|
939
|
-
|
|
1241
|
+
- **COMPLETE**: at least one review session produced a usable result (a
|
|
1242
|
+
parsed answer is not enough) and no source-commit change was detected.
|
|
1243
|
+
Only COMPLETE reviews can be commented on.
|
|
940
1244
|
- **STALE**: the PR source commit changed during the review; run a new one.
|
|
941
|
-
- **PARTIAL**:
|
|
942
|
-
|
|
943
|
-
- **INCOMPLETE / CANCELLED / TIMED_OUT**: the command did not finish
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
`
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
1245
|
+
- **PARTIAL**: review sessions answered, but none produced a usable result;
|
|
1246
|
+
what they wrote is shown for reference only.
|
|
1247
|
+
- **INCOMPLETE / CANCELLED / TIMED_OUT**: the command did not finish. A
|
|
1248
|
+
review ends INCOMPLETE when every review session failed; an INCOMPLETE
|
|
1249
|
+
review whose reviewers had answered keeps their observations as an
|
|
1250
|
+
unconfirmed draft.
|
|
1251
|
+
|
|
1252
|
+
A finding is **REPORTED** when it passed the runtime's checks (its fields, a
|
|
1253
|
+
location that exists at that commit, a file its session read), **NEEDS_INFO**
|
|
1254
|
+
when it did not, and **MERGED** when it repeats another finding, which it
|
|
1255
|
+
names. Only REPORTED findings can be commented on. None of these says that a
|
|
1256
|
+
finding was verified: each was checked by its reviewer against the source and
|
|
1257
|
+
by the runtime for form and source only.
|
|
1258
|
+
|
|
1259
|
+
A receipt states status, coverage and verification separately. It starts like
|
|
1260
|
+
`[AZPR 1a2b3c4d] COMPLETE; coverage complete; verification none`, and with
|
|
1261
|
+
several passes like `[AZPR 1a2b3c4d] COMPLETE; coverage complete, 12/12
|
|
1262
|
+
file(s) in every pass; verification none`. Coverage says whether every changed
|
|
1263
|
+
file was reviewed in at least one pass, so zero findings never hide unreviewed
|
|
1264
|
+
files; the second number says how many files every pass reviewed, which a
|
|
1265
|
+
failed pass lowers. A reviewer whose answer is PARTIAL and names unfinished
|
|
1266
|
+
work is asked once, in the same session, to continue (receipt
|
|
1267
|
+
`follow-up=completed`, `still-partial`, `unusable` or `failed`); a follow-up
|
|
1268
|
+
that fails or gives no usable answer keeps the answer it followed. In every
|
|
1269
|
+
stage, a correction turn that fails or gives no usable answer keeps the
|
|
1270
|
+
latest usable answer, with the items it would have repaired degraded
|
|
1271
|
+
(`repair=failed:<class>`).
|
|
961
1272
|
|
|
962
1273
|
A failed final version recheck adds a warning; it does not by itself prevent
|
|
963
1274
|
COMPLETE in any review mode. Read the receipt warnings. Publication separately
|
|
@@ -1064,20 +1375,42 @@ notices as before. The same terminal part brings the
|
|
|
1064
1375
|
|
|
1065
1376
|
## Comments
|
|
1066
1377
|
|
|
1067
|
-
`/pr-comment` plans one general summary plus inline comments for
|
|
1378
|
+
`/pr-comment` plans one general summary plus inline comments for high
|
|
1068
1379
|
and medium findings (low findings stay in the summary index). Planning runs in
|
|
1069
|
-
pages of at most four findings
|
|
1380
|
+
pages of at most four findings (more only where one defect at several places
|
|
1381
|
+
keeps its findings together), two pages at a time, and the pages are joined
|
|
1070
1382
|
in page order, so the result does not depend on which page finishes first; each
|
|
1071
1383
|
page may get a correction turn, and an item that still cannot be posted
|
|
1072
1384
|
faithfully is skipped with a reason instead of failing the command. Inline
|
|
1073
1385
|
titles start with `π΄ high:` or `π‘ medium:` followed
|
|
1074
1386
|
by **π Summary**, **π Evidence** and **π‘ Suggested fix**; the summary starts
|
|
1075
|
-
with a π€ AI/model disclosure and may carry improvement suggestions.
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1387
|
+
with a π€ AI/model disclosure and may carry improvement suggestions. The
|
|
1388
|
+
disclosure line of every comment says how the review was made: `Review method:
|
|
1389
|
+
findings checked by their reviewer against the source, no separate
|
|
1390
|
+
verification` (and, in the summary, incomplete coverage). An inline comment
|
|
1391
|
+
needs a location on a changed HEAD file. The comments of a review that 0.4.x
|
|
1392
|
+
saved keep the wording of that version (see [commenting](docs/COMMENTING.md)).
|
|
1393
|
+
|
|
1394
|
+
One mistake is often made at several places of a pull request: the same wrong
|
|
1395
|
+
call in each handler, the same stale text in each copy. Each place is a
|
|
1396
|
+
finding of its own, and the planner may give such findings one inline comment
|
|
1397
|
+
instead of a thread per place. The comment stands at the place that shows the
|
|
1398
|
+
mistake most clearly, and AZPR lists every other place under it:
|
|
1399
|
+
|
|
1400
|
+
```text
|
|
1401
|
+
**π Also at** (the same defect; fix these places with it):
|
|
1402
|
+
- `/src/orders/refund.ts:41-44` (F-3)
|
|
1403
|
+
- `/src/orders/cancel.ts:18` (F-5)
|
|
1404
|
+
```
|
|
1405
|
+
|
|
1406
|
+
The findings must have the same severity and need the same correction; places
|
|
1407
|
+
that need different corrections keep their own comments. Every place keeps
|
|
1408
|
+
its row in the summary index, and you can still exclude or regrade each one
|
|
1409
|
+
after a preview. A shared comment has a marker of its own, so it counts as
|
|
1410
|
+
already posted only when this very comment, with every place, is on the pull
|
|
1411
|
+
request; and a shared comment and a comment for one place are not planned
|
|
1412
|
+
onto the same quoted lines (see
|
|
1413
|
+
[one defect at several places](docs/COMMENTING.md#one-defect-at-several-places)).
|
|
1081
1414
|
|
|
1082
1415
|
### Adjusting findings after a preview
|
|
1083
1416
|
|
|
@@ -1087,9 +1420,9 @@ findingsβ¦** at the foot of the panel does this from a list of the findings.
|
|
|
1087
1420
|
With commands, several IDs go in one list, separated by commas:
|
|
1088
1421
|
|
|
1089
1422
|
```text
|
|
1090
|
-
/pr-comment --exclude F-1,
|
|
1091
|
-
/pr-comment --severity F-3=low,
|
|
1092
|
-
/pr-comment --exclude F-1,
|
|
1423
|
+
/pr-comment --exclude F-1,F-2 leave F-1 and F-2 out
|
|
1424
|
+
/pr-comment --severity F-3=low,F-4=medium publish F-3 as low and F-4 as medium
|
|
1425
|
+
/pr-comment --exclude F-1,F-2 --severity F-3=low both in one command
|
|
1093
1426
|
/pr-comment --exclude none put every finding back
|
|
1094
1427
|
/pr-comment --reset undo every adjustment
|
|
1095
1428
|
```
|
|
@@ -1135,8 +1468,7 @@ review, and a flag right after the PR URL sets it for one run:
|
|
|
1135
1468
|
|
|
1136
1469
|
Set a mode to `none` when you mostly read the report and comment rarely, for
|
|
1137
1470
|
example for `/pr-deep` with a costly model: the preview is planned by that
|
|
1138
|
-
mode's
|
|
1139
|
-
about four findings. A settings file
|
|
1471
|
+
mode's first reviewer model, one request for about four findings. A settings file
|
|
1140
1472
|
that names `afterReview` keeps its values on an upgrade; one that does not,
|
|
1141
1473
|
such as the file `/pr-setup` writes, follows this default.
|
|
1142
1474
|
|
|
@@ -1177,11 +1509,10 @@ loads content nor runs a script (such as `<input name="id">` or
|
|
|
1177
1509
|
since Azure DevOps may resolve them anywhere. Where a renderer could read the
|
|
1178
1510
|
code differently, for example a fence inside a list, code next to an HTML
|
|
1179
1511
|
line, or a backtick that a link or tag could take, the text is checked as
|
|
1180
|
-
written.
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
is advisory (leave `afterReview.quick` at `preview` to read the comments first).
|
|
1512
|
+
written.
|
|
1513
|
+
Every comment is posted with the disclosure that no separate verification
|
|
1514
|
+
ran, and the summary names incomplete coverage; leave `afterReview` at
|
|
1515
|
+
`preview` to read the comments first.
|
|
1185
1516
|
When every finding is already discussed on the PR, typically by AZPR's own
|
|
1186
1517
|
comment from an earlier run, there is nothing new to post: the receipt says
|
|
1187
1518
|
`NOTHING_TO_POST` and the plan is saved (the summary's marker follows the
|
|
@@ -1212,11 +1543,13 @@ kept under `${XDG_STATE_HOME:-~/.local/state}/opencode/azpr-v2/` with owner-only
|
|
|
1212
1543
|
permissions. The newest 20 reviews are kept; older ones and stale scratch data
|
|
1213
1544
|
are removed automatically. A receipt that cannot reach the conversation is saved
|
|
1214
1545
|
under `receipts/` there. `/pr-comment` only accepts reviews started in the same
|
|
1215
|
-
conversation (or from one of that review's sessions).
|
|
1546
|
+
conversation (or from one of that review's sessions). Reviews that 0.4.x
|
|
1547
|
+
saved stay usable: they can be listed, shown, previewed and published, with
|
|
1548
|
+
the comment wording of the version that made them.
|
|
1216
1549
|
|
|
1217
1550
|
AZPR's private reviewer sessions are sessions of their own, not children of
|
|
1218
|
-
your conversation: OpenCode 2.3.0
|
|
1219
|
-
parent and
|
|
1551
|
+
your conversation: OpenCode 2.3.0 and later hand every answer of a child
|
|
1552
|
+
session to its parent and let the parent's model respond to it. OpenCode therefore lists them
|
|
1220
1553
|
next to your conversations, titled `[AZPR <id>] β¦`, and does not delete
|
|
1221
1554
|
sessions by itself, so AZPR removes them (`deletePrivateSessions`, on by
|
|
1222
1555
|
default). When a review ends, only the session that holds its report or draft
|
|
@@ -1281,8 +1614,8 @@ dependency and is not built on your machine.
|
|
|
1281
1614
|
Uninstall without `--apply` previews; `--apply` archives only this package under
|
|
1282
1615
|
`azpr-v2-backups` and leaves the private state directory for you to delete.
|
|
1283
1616
|
For a native installation, remove the entry you added, for example
|
|
1284
|
-
`opencode plugin remove opencode-azure-devops-pr-review@0.
|
|
1285
|
-
`opencode plugin remove 'github:WTLAIB/opencode-azure-devops-pr-review-v2#v0.
|
|
1617
|
+
`opencode plugin remove opencode-azure-devops-pr-review@0.5.0` or
|
|
1618
|
+
`opencode plugin remove 'github:WTLAIB/opencode-azure-devops-pr-review-v2#v0.5.0'`;
|
|
1286
1619
|
the external settings, PAT file and private review state remain available.
|
|
1287
1620
|
|
|
1288
1621
|
[Architecture](docs/ARCHITECTURE.md), [commenting](docs/COMMENTING.md),
|
|
@@ -1295,7 +1628,7 @@ or personal model selections.
|
|
|
1295
1628
|
## License and releases
|
|
1296
1629
|
|
|
1297
1630
|
[MIT](LICENSE), copyright 2026 WTLAIB. See the [changelog](CHANGELOG.md) for the
|
|
1298
|
-
release scope, [v0.
|
|
1631
|
+
release scope, [v0.5.0](https://github.com/WTLAIB/opencode-azure-devops-pr-review-v2/releases/tag/v0.5.0)
|
|
1299
1632
|
for downloads, the [npm package](https://www.npmjs.com/package/opencode-azure-devops-pr-review),
|
|
1300
1633
|
[v0.2.0](https://github.com/WTLAIB/opencode-azure-devops-pr-review-v2/releases/tag/v0.2.0)
|
|
1301
1634
|
for the recorded demonstration, and [releasing](docs/RELEASING.md) for the
|