opencode-azure-devops-pr-review 0.4.6 β 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 +161 -0
- package/README.md +514 -217
- package/package.json +2 -2
- package/src/attribution.mjs +165 -97
- package/src/comment-work.mjs +10 -5
- package/src/comments.mjs +124 -39
- package/src/config.mjs +159 -72
- package/src/host.mjs +1 -1
- package/src/output.mjs +89 -320
- package/src/prompts/comment-plan.md +5 -5
- package/src/prompts/comment-policy.md +4 -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 +137 -85
- 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,17 +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
|
-
|
|
16
|
-
|
|
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)).
|
|
17
25
|
|
|
18
26
|
AZPR is an independent community project. It is not built by or affiliated with
|
|
19
27
|
the OpenCode team.
|
|
@@ -50,7 +58,7 @@ is an actual capture excerpt with identifying UI removed and its text unchanged.
|
|
|
50
58
|
|
|
51
59
|
[](docs/DEMO.md#the-terminal-panel)
|
|
52
60
|
|
|
53
|
-
*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.
|
|
54
62
|
Waiting time is shortened, so the length is not the review duration.
|
|
55
63
|
[Recording details and other walkthroughs](docs/DEMO.md), among them
|
|
56
64
|
[adjusting findings before publishing](docs/DEMO.md#adjust-findings-before-publishing).*
|
|
@@ -62,7 +70,7 @@ Waiting time is shortened, so the length is not the review duration.
|
|
|
62
70
|
[company networks](docs/ENTERPRISE.md#company-networks) first):
|
|
63
71
|
|
|
64
72
|
```sh
|
|
65
|
-
opencode plugin add opencode-azure-devops-pr-review@0.
|
|
73
|
+
opencode plugin add opencode-azure-devops-pr-review@0.5.0
|
|
66
74
|
```
|
|
67
75
|
|
|
68
76
|
2. In OpenCode's terminal UI, type `/pr-setup`. Dialogs ask for your Azure
|
|
@@ -81,15 +89,16 @@ Waiting time is shortened, so the length is not the review duration.
|
|
|
81
89
|
```
|
|
82
90
|
|
|
83
91
|
Replace the sample URL with your PR. Wait for `/pr-check` to report `READY`
|
|
84
|
-
before starting the review; it uses no model. The review runs
|
|
85
|
-
|
|
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
|
|
86
96
|
comment on, a **comment preview** follows in a separate, cancellable run and
|
|
87
97
|
shows the comments as they would be posted. **Nothing is posted by these
|
|
88
98
|
commands** unless you set `afterReview` to `publish`. Previewing comments also
|
|
89
99
|
uses a model; add `--no-comment` after the URL for a review without a preview.
|
|
90
|
-
For a lighter first pass, use `/pr-quick <PR URL
|
|
91
|
-
|
|
92
|
-
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.
|
|
93
102
|
|
|
94
103
|
In OpenCode's terminal UI a [panel](#terminal-panel) opens beside the
|
|
95
104
|
conversation: it shows the report and the preview rendered, and at its foot
|
|
@@ -107,12 +116,12 @@ you can leave findings out or change their severity, using the finding IDs the
|
|
|
107
116
|
preview and the report show:
|
|
108
117
|
|
|
109
118
|
```text
|
|
110
|
-
/pr-comment --exclude F-1,
|
|
111
|
-
/pr-comment --severity F-3=low,
|
|
112
|
-
/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
|
|
113
122
|
```
|
|
114
123
|
|
|
115
|
-
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
|
|
116
125
|
appears as low in the summary, with no inline comment. Adjusting runs comment
|
|
117
126
|
planning again with a model. Read the whole new preview, then publish from the
|
|
118
127
|
same conversation:
|
|
@@ -143,11 +152,17 @@ option replaces its earlier list.
|
|
|
143
152
|
- **Read beyond the diff.** Reviewers can follow definitions, callers and
|
|
144
153
|
tests at the selected PR commit, without a local checkout or an Azure Code
|
|
145
154
|
Search index.
|
|
146
|
-
- **
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
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`.
|
|
151
166
|
|
|
152
167
|
For company networks, configure a proxy and additional CA certificates for
|
|
153
168
|
AZPR's Azure requests; model-provider connections stay in OpenCode. Content
|
|
@@ -156,35 +171,146 @@ to your selected model providers, and review records are saved locally. See
|
|
|
156
171
|
[team setup and data handling](docs/ENTERPRISE.md) and
|
|
157
172
|
[content-search limits](docs/AZURE_DEVOPS.md#who-calls-what).
|
|
158
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
|
+
|
|
159
192
|
## Choose a review
|
|
160
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
|
+
|
|
161
198
|
| Command | Best starting point | What runs |
|
|
162
199
|
| --- | --- | --- |
|
|
163
|
-
| `/pr-
|
|
164
|
-
| `/pr-
|
|
165
|
-
| `/pr-
|
|
166
|
-
|
|
167
|
-
All three modes use the same Azure comment layout
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
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.
|
|
171
211
|
|
|
172
212
|
<details>
|
|
173
213
|
<summary>Sessions, model requests and cost</summary>
|
|
174
214
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
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.
|
|
183
241
|
|
|
184
242
|
</details>
|
|
185
243
|
|
|
186
244
|
## Benchmark results
|
|
187
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
|
+
|
|
188
314
|
On Martian's open [Code Review Bench](https://codereview.withmartian.com),
|
|
189
315
|
which evaluates AI code reviewers on 50 real-world pull requests from
|
|
190
316
|
**cal.com, Discourse, Grafana, Keycloak and Sentry**, **AZPR (`v0.3.5`,
|
|
@@ -196,8 +322,8 @@ tools on its public dashboard.**
|
|
|
196
322
|
- **Highest High and Critical recall, tied (74.2%):** level with
|
|
197
323
|
qodo-extended-v2 and augment on the most severe issues.
|
|
198
324
|
- **Built for interactive triage (F2 54.1, would rank 6th):** `/pr-deep`
|
|
199
|
-
|
|
200
|
-
choose which ones to publish.
|
|
325
|
+
reported every defect its verifier confirmed instead of holding findings
|
|
326
|
+
back, and you choose which ones to publish.
|
|
201
327
|
- **Findings that hold up when checked (95.6% judged valid):** this
|
|
202
328
|
benchmark's precision is the share of comments that are on its list of about
|
|
203
329
|
three issues per PR, so it counts an accurate comment outside that list as
|
|
@@ -233,8 +359,8 @@ The benchmark's precision also counts accurate comments it does not list:
|
|
|
233
359
|
|
|
234
360
|
1. **Unlisted issues count as false positives.** Code Review Bench lists about
|
|
235
361
|
three issues per PR and counts every comment that matches none of them as a
|
|
236
|
-
false positive. `/pr-deep`
|
|
237
|
-
(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).
|
|
238
364
|
2. **Most unmatched findings were accurate.** We checked a random sample of 40
|
|
239
365
|
AZPR findings that matched no expected issue against the source code:
|
|
240
366
|
**36 were accurate**, and **18 were genuine defects** introduced or exposed
|
|
@@ -248,12 +374,14 @@ The benchmark's precision also counts accurate comments it does not list:
|
|
|
248
374
|
|
|
249
375
|
### Model and effort recommendations
|
|
250
376
|
|
|
251
|
-
To find the best setup for `/pr-deep`, we compared **12 combinations of
|
|
252
|
-
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:
|
|
253
379
|
|
|
254
|
-
- **
|
|
255
|
-
|
|
256
|
-
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.
|
|
257
385
|
- **Why not higher or lower?** `high` scored about the same at a higher cost,
|
|
258
386
|
`xhigh` added more marginal findings, and `low` missed more issues, including
|
|
259
387
|
High-severity ones.
|
|
@@ -261,15 +389,18 @@ and reasoning effort** on the same 50 PRs:
|
|
|
261
389
|
`/pr-review` with GPT-6 Luna at its default effort posted 91 comments and
|
|
262
390
|
matched 27.8% of the expected issues; the recommended deep setup posted 323
|
|
263
391
|
and matched 65.2% (one run each, scored by our local judge). A smaller model
|
|
264
|
-
in `models.review` trades issues found for cost and time, so run
|
|
265
|
-
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.
|
|
266
397
|
|
|
267
398
|
The full method, the comparison of all 12 combinations and the limits are in
|
|
268
399
|
the [validation record](docs/VALIDATION.md#martian-code-review-bench-2026-11-05-and-06).
|
|
269
400
|
|
|
270
401
|
### Checked on a second benchmark
|
|
271
402
|
|
|
272
|
-
Two
|
|
403
|
+
Two releases of the earlier pipeline were checked on ReviewBench's test set, which was not used
|
|
273
404
|
to write their changes: recall stayed within the run-to-run variation, and
|
|
274
405
|
agreement with the judge on which findings deserve an inline comment rose from
|
|
275
406
|
70.0 (0.3.5) to 83.0 (0.3.7).
|
|
@@ -327,10 +458,16 @@ If you need an unattended review on every PR event, look for a webhook or CI
|
|
|
327
458
|
integration; AZPR runs when you invoke a command. If your work includes editing
|
|
328
459
|
code or running the project's tests, use a local checkout for that work.
|
|
329
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
|
+
|
|
330
465
|
The [validation record](docs/VALIDATION.md) includes real model/Azure runs, a
|
|
331
466
|
316-file test PR, isolated OpenCode host checks, and an offline test suite for
|
|
332
467
|
runtime and packaging behavior. It also records missed defects and untested
|
|
333
|
-
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
|
|
334
471
|
[benchmark results](#benchmark-results), and expect findings to vary between
|
|
335
472
|
models and runs.
|
|
336
473
|
|
|
@@ -338,17 +475,17 @@ models and runs.
|
|
|
338
475
|
|
|
339
476
|
| Component | Tested target |
|
|
340
477
|
| --- | --- |
|
|
341
|
-
| 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. |
|
|
342
479
|
| Operating system | **Ubuntu 22.04** (validation environment: WSL2). Other operating systems are not yet validated. |
|
|
343
480
|
| Azure | **Azure DevOps Services**, REST API **7.1**. Azure DevOps Server is not supported by the current URL handling. |
|
|
344
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. |
|
|
345
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. |
|
|
346
|
-
| 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)). |
|
|
347
484
|
|
|
348
485
|
The npm package, the Git package and the release source archive contain the
|
|
349
486
|
same runtime. A fresh installation exposes `/pr-setup` before
|
|
350
487
|
reviewing is enabled; the [quickstart](docs/QUICKSTART.md) configures one model
|
|
351
|
-
for
|
|
488
|
+
for `/pr-review` (two passes) and `/pr-quick` (one pass).
|
|
352
489
|
|
|
353
490
|
## Documentation
|
|
354
491
|
|
|
@@ -378,48 +515,66 @@ comments, and what is kept on your machine.
|
|
|
378
515
|
latest iteration's source commit and merge base, and the complete
|
|
379
516
|
changed-file list. Reviewers read the repository through AZPR's own
|
|
380
517
|
read-only tools at exact commits.
|
|
381
|
-
2.
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
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
|
|
400
551
|
the review STALE; a moved base is reported as a warning.
|
|
401
|
-
|
|
402
|
-
posts the saved text itself, skipping comments
|
|
403
|
-
reading every created comment back from Azure
|
|
404
|
-
is safe. A COMPLETE review is followed by a
|
|
405
|
-
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
|
|
406
557
|
([automatic comments](#automatic-comments)).
|
|
407
558
|
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
(
|
|
422
|
-
|
|
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.
|
|
423
578
|
|
|
424
579
|
Readiness checks, reviews, comment planning, adjustments and publication
|
|
425
580
|
acknowledge `STARTED` and continue in the current OpenCode process; short
|
|
@@ -448,14 +603,14 @@ Azure DevOps REST API with the runtime's built-in `fetch`.
|
|
|
448
603
|
Install the npm package with OpenCode's plugin manager:
|
|
449
604
|
|
|
450
605
|
```sh
|
|
451
|
-
opencode plugin add opencode-azure-devops-pr-review@0.
|
|
606
|
+
opencode plugin add opencode-azure-devops-pr-review@0.5.0
|
|
452
607
|
```
|
|
453
608
|
|
|
454
609
|
The same release is also a versioned Git package, which needs Git but not the
|
|
455
610
|
npm registry:
|
|
456
611
|
|
|
457
612
|
```sh
|
|
458
|
-
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'
|
|
459
614
|
```
|
|
460
615
|
|
|
461
616
|
Add only one of them. OpenCode 2.3.0 loads the plugin into a running OpenCode
|
|
@@ -470,7 +625,7 @@ To select another configuration file, use an absolute path in the host config:
|
|
|
470
625
|
```json
|
|
471
626
|
{
|
|
472
627
|
"plugins": [{
|
|
473
|
-
"package": "opencode-azure-devops-pr-review@0.
|
|
628
|
+
"package": "opencode-azure-devops-pr-review@0.5.0",
|
|
474
629
|
"options": { "settingsFile": "/absolute/path/to/azpr/settings.json" }
|
|
475
630
|
}]
|
|
476
631
|
}
|
|
@@ -495,7 +650,7 @@ For an entry that `opencode plugin add` created, add the new version and,
|
|
|
495
650
|
only when that succeeds, remove the previous one:
|
|
496
651
|
|
|
497
652
|
```sh
|
|
498
|
-
opencode plugin add opencode-azure-devops-pr-review@0.
|
|
653
|
+
opencode plugin add opencode-azure-devops-pr-review@0.5.0 &&
|
|
499
654
|
opencode plugin remove opencode-azure-devops-pr-review@PREVIOUS_VERSION
|
|
500
655
|
```
|
|
501
656
|
|
|
@@ -514,7 +669,9 @@ AZPR's commands disappear until the package is available and the service
|
|
|
514
669
|
restarts.
|
|
515
670
|
|
|
516
671
|
External settings, the PAT file and review records stay in place; a working
|
|
517
|
-
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
|
|
518
675
|
are written into your settings file, at their defaults, when OpenCode first
|
|
519
676
|
loads that version: AZPR behaves as it did, and each new setting is in the
|
|
520
677
|
file for you to change. `/pr-check` then lists what was added. Your values
|
|
@@ -527,7 +684,8 @@ the first one (`Unknown setting settings.terminalPanel`) instead of starting. `o
|
|
|
527
684
|
show a single `azpr` row with the new version (from 0.3.1, `/pr-check` names
|
|
528
685
|
it too); if it still shows the previous one, run `opencode service restart`.
|
|
529
686
|
Exact versions stay pinned, so `opencode plugin update` leaves them unchanged.
|
|
530
|
-
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
|
|
531
689
|
[0.4.5 release notes](docs/releases/v0.4.5.md) for stopping a run from the panel, the
|
|
532
690
|
[0.4.4 release notes](docs/releases/v0.4.4.md) for the steps at the panel's foot, the
|
|
533
691
|
[0.4.3 release notes](docs/releases/v0.4.3.md) for setup in the terminal UI, the
|
|
@@ -537,13 +695,75 @@ preview follows each COMPLETE review unless `afterReview` says otherwise;
|
|
|
537
695
|
automatic publication stays off unless you configure it or request it with a
|
|
538
696
|
review command flag.
|
|
539
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
|
+
|
|
540
760
|
### Source archive or checkout
|
|
541
761
|
|
|
542
762
|
<details>
|
|
543
763
|
<summary>Source installation and replacement</summary>
|
|
544
764
|
|
|
545
|
-
Download the [v0.
|
|
546
|
-
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
|
|
547
767
|
Python 3's standard library. From that source directory:
|
|
548
768
|
|
|
549
769
|
```sh
|
|
@@ -558,8 +778,9 @@ conflicting legacy files, reserved command names and unowned packages. Run
|
|
|
558
778
|
(with options: `/pr-setup ... --replace`), or edit them yourself and restart
|
|
559
779
|
OpenCode.
|
|
560
780
|
|
|
561
|
-
To replace an existing source installation (current settings are kept
|
|
562
|
-
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)):
|
|
563
784
|
|
|
564
785
|
```sh
|
|
565
786
|
sh install.sh --config-dir /absolute/path/to/v2-opencode-config --replace
|
|
@@ -570,7 +791,7 @@ sh install.sh --config-dir /absolute/path/to/v2-opencode-config --replace
|
|
|
570
791
|
### Manual copying without Git
|
|
571
792
|
|
|
572
793
|
Keep these relative paths under one source directory, then run its installer.
|
|
573
|
-
These **
|
|
794
|
+
These **33 files** include the runtime and its license:
|
|
574
795
|
|
|
575
796
|
<details>
|
|
576
797
|
<summary>Show the required files</summary>
|
|
@@ -604,12 +825,9 @@ src/tui-setup.mjs
|
|
|
604
825
|
src/tui-actions.mjs
|
|
605
826
|
src/tui.js
|
|
606
827
|
src/prompts/common.md
|
|
607
|
-
src/prompts/
|
|
608
|
-
src/prompts/risk.md
|
|
609
|
-
src/prompts/final.md
|
|
828
|
+
src/prompts/review.md
|
|
610
829
|
src/prompts/dedupe.md
|
|
611
830
|
src/prompts/rating.md
|
|
612
|
-
src/prompts/quick.md
|
|
613
831
|
src/prompts/comment-policy.md
|
|
614
832
|
src/prompts/comment-plan.md
|
|
615
833
|
```
|
|
@@ -640,16 +858,17 @@ command palette has them too ("AZPR: settings").
|
|
|
640
858
|
|
|
641
859
|
[](docs/QUICKSTART.md#3-set-azpr-up-opencodes-terminal-ui)
|
|
642
860
|
|
|
643
|
-
*AZPR's dialogs in OpenCode 2.3.0's terminal UI, recorded with a
|
|
644
|
-
organization and token and a stand-in for Azure DevOps; waiting time is
|
|
645
|
-
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`.*
|
|
646
865
|
|
|
647
866
|
- **First setup.** Your organization (its name, or the URL of a pull request);
|
|
648
867
|
a proxy, only if your network needs one (Enter skips it; after a proxy, the
|
|
649
868
|
CA certificate file of a company that inspects HTTPS, which Enter skips
|
|
650
|
-
too); your token; and a model from OpenCode's list, which
|
|
651
|
-
|
|
652
|
-
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.
|
|
653
872
|
- **The token** is typed or pasted into a field that shows only how many
|
|
654
873
|
characters it holds. AZPR asks Azure DevOps once whether the token works for
|
|
655
874
|
your organization, and says what was refused when it does not: the token,
|
|
@@ -670,18 +889,28 @@ shortened.*
|
|
|
670
889
|
saved for the organization it was checked for; the two are saved together,
|
|
671
890
|
the new token in a new file beside the first, and AZPR says where the
|
|
672
891
|
earlier token still is.
|
|
673
|
-
The list says what each model is for
|
|
674
|
-
one
|
|
675
|
-
|
|
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.
|
|
676
899
|
The other settings are in the settings file, which the list names together
|
|
677
900
|
with the section that describes them all:
|
|
678
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)).
|
|
679
906
|
|
|
680
907
|

|
|
681
908
|
|
|
682
909
|
*The list goes on below what is shown: the settings of reviews, of the terminal
|
|
683
910
|
UI and of diagnostics, and the settings file. Recorded like the picture above,
|
|
684
|
-
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.*
|
|
685
914
|
|
|
686
915
|
The dialogs only ask. The plugin's server part checks every answer, writes
|
|
687
916
|
the two files, and is the only part that contacts Azure DevOps. Other OpenCode
|
|
@@ -691,8 +920,8 @@ prints the instructions and takes options.
|
|
|
691
920
|
### Setup with options
|
|
692
921
|
|
|
693
922
|
Without the terminal UI, or from a script, one command sets the organization,
|
|
694
|
-
an existing PAT file and
|
|
695
|
-
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:
|
|
696
925
|
|
|
697
926
|
```text
|
|
698
927
|
/pr-setup --organization YOUR_ORG --model YOUR_PROVIDER/YOUR_MODEL --pat-file "/absolute/path/to/pat"
|
|
@@ -714,9 +943,9 @@ Each of these options changes one setting of existing settings, without
|
|
|
714
943
|
| --- | --- |
|
|
715
944
|
| `--proxy URL` (or `none`) | `azure.proxy` |
|
|
716
945
|
| `--ca-file PATH` (or `none`) | `azure.caFile` |
|
|
717
|
-
| `--review-model
|
|
718
|
-
| `--quick-model
|
|
719
|
-
| `--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` |
|
|
720
949
|
| `--language TAG` | `outputLanguage` |
|
|
721
950
|
| `--after-review preview`, `none` or `publish` | `afterReview` of every mode |
|
|
722
951
|
| `--report receipt` or `full` | `returnReport` |
|
|
@@ -724,24 +953,52 @@ Each of these options changes one setting of existing settings, without
|
|
|
724
953
|
| `--panel auto` or `manual` | `terminalPanel` |
|
|
725
954
|
| `--debug on` or `off` | `debug.enabled` |
|
|
726
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
|
+
|
|
727
972
|
```text
|
|
728
973
|
/pr-setup --language zh-TW --deep-model YOUR_PROVIDER/YOUR_STRONGER_MODEL
|
|
729
974
|
```
|
|
730
975
|
|
|
731
976
|
They also go with the options of a first setup, for example `--proxy` behind
|
|
732
977
|
a company proxy. After a change to settings that are in use, restart the
|
|
733
|
-
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:
|
|
734
980
|
|
|
735
981
|
```json
|
|
736
982
|
{
|
|
983
|
+
"version": 3,
|
|
737
984
|
"models": {
|
|
738
985
|
"review": {
|
|
739
|
-
"
|
|
740
|
-
|
|
741
|
-
|
|
986
|
+
"reviewers": [
|
|
987
|
+
"YOUR_PROVIDER/YOUR_MODEL",
|
|
988
|
+
"YOUR_PROVIDER/YOUR_MODEL"
|
|
989
|
+
],
|
|
990
|
+
"rater": ""
|
|
742
991
|
},
|
|
743
|
-
"deep": {
|
|
744
|
-
|
|
992
|
+
"deep": {
|
|
993
|
+
"reviewers": [],
|
|
994
|
+
"rater": ""
|
|
995
|
+
},
|
|
996
|
+
"quick": {
|
|
997
|
+
"reviewers": [
|
|
998
|
+
"YOUR_PROVIDER/YOUR_MODEL"
|
|
999
|
+
],
|
|
1000
|
+
"rater": ""
|
|
1001
|
+
}
|
|
745
1002
|
},
|
|
746
1003
|
"azure": {
|
|
747
1004
|
"organization": "YOUR_ORGANIZATION",
|
|
@@ -753,19 +1010,23 @@ OpenCode service. For separate models per role, edit the settings file:
|
|
|
753
1010
|
Model IDs use `provider/model` form and must exist in OpenCode. To choose a
|
|
754
1011
|
model variant such as a reasoning effort, use OpenCode's `provider/model#variant`
|
|
755
1012
|
form (for example `provider/model#high`); `/pr-check` reports a variant the
|
|
756
|
-
model does not offer. Without a variant the model's default is used.
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
`
|
|
767
|
-
|
|
768
|
-
|
|
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. |
|
|
769
1030
|
|
|
770
1031
|
Name the model that should do the work. AZPR binds every private session to
|
|
771
1032
|
the exact model in its settings and refuses a request that OpenCode sends on
|
|
@@ -774,16 +1035,36 @@ session, such as GitHub Copilot's **Auto** (OpenCode 2.2.7 and later), cannot
|
|
|
774
1035
|
be an AZPR model: its sessions fail with `Model mismatch`. `/pr-check` finds
|
|
775
1036
|
such an entry in the model catalog and does not detect this.
|
|
776
1037
|
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
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
|
|
787
1068
|
says how much it matters to fix it before the change merges, judged from the
|
|
788
1069
|
harm the evidence shows and how often realistic use reaches it, not from the
|
|
789
1070
|
reviewer's confidence, the size of the fix or the kind of issue:
|
|
@@ -811,19 +1092,19 @@ suggestion asks them to confirm or document the intent. Before asking, a
|
|
|
811
1092
|
reviewer looks for a statement of that intent in the tests, the comments and
|
|
812
1093
|
documents beside the code, the PR description and the commit messages.
|
|
813
1094
|
An easy fix and an effect the reviewer could not confirm are not reasons for a
|
|
814
|
-
lower level. The
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
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
|
|
818
1099
|
by their effect: a changed behavior no test would catch where the project
|
|
819
1100
|
already tests comparable code, a test that cannot fail, a comment or document
|
|
820
1101
|
that now contradicts the code, and duplicated or dead code the change adds. A
|
|
821
1102
|
missing test is low unless the test is what the change delivers, and a
|
|
822
1103
|
document is rated by what following it does; documented steps that worked
|
|
823
1104
|
before the change and fail after it are a regression (medium) even though the
|
|
824
|
-
failure shows at once. A
|
|
825
|
-
|
|
826
|
-
|
|
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
|
|
827
1108
|
second one noticed on the way is filed on its own. A mistake repeated in places
|
|
828
1109
|
that each need their own fix is one finding per place. Identical copies of one file
|
|
829
1110
|
count as one place when one reviewer has them; in a large PR split into shards,
|
|
@@ -839,6 +1120,11 @@ restart the OpenCode service.
|
|
|
839
1120
|
|
|
840
1121
|
| Setting | Default and meaning |
|
|
841
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. |
|
|
842
1128
|
| `enabled` | `true`; `false` registers nothing. |
|
|
843
1129
|
| `returnReport` | `receipt`; `full` also encloses the rendered report in the receipt. |
|
|
844
1130
|
| `outputLanguage` | `en`; used by reviews, the report and comments. `zh-TW` for Traditional Chinese. |
|
|
@@ -857,18 +1143,22 @@ restart the OpenCode service.
|
|
|
857
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). |
|
|
858
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. |
|
|
859
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. |
|
|
860
|
-
| `workflow.shardFiles` | `25` changed files per
|
|
861
|
-
| `workflow.
|
|
862
|
-
| `workflow.
|
|
863
|
-
| `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. |
|
|
864
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. |
|
|
865
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. |
|
|
866
1151
|
| `debug.enabled` / `debug.directory` / `debug.keepRuns` | `false` / `""` / `20` run directories kept (`0` keeps all); see [debugging](docs/DEBUGGING.md). |
|
|
867
1152
|
|
|
868
1153
|
`steps`, `maxStageCharacters`, `structuredOutput`, `comments`,
|
|
869
1154
|
`auxiliaryModels`, `outputRetries`, `verification` and `shellToolPermission`
|
|
870
|
-
are unsupported and rejected
|
|
871
|
-
|
|
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
|
|
872
1162
|
[roadmap](docs/ROADMAP.md#deferred) for why. The inactivity watchdog
|
|
873
1163
|
(`workflow.stageIdleSeconds`) is not one: it stops only a stage that stopped
|
|
874
1164
|
working.
|
|
@@ -915,16 +1205,16 @@ troubleshooting.
|
|
|
915
1205
|
|
|
916
1206
|
| Command | Behavior |
|
|
917
1207
|
| --- | --- |
|
|
918
|
-
| `/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. |
|
|
919
|
-
| `/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. |
|
|
920
|
-
| `/pr-review <PR URL> [flag] [context]` |
|
|
921
|
-
| `/pr-deep <PR URL> [flag] [context]` | The same review with the
|
|
922
|
-
| `/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. |
|
|
923
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β¦**). |
|
|
924
1214
|
| `/pr-comment [review-id]` | Preview comments for this conversation's current review. |
|
|
925
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. |
|
|
926
1216
|
| `/pr-comment [review-id] --show` | Show the saved preview again; no model or Azure DevOps request. |
|
|
927
|
-
| `/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)). |
|
|
928
1218
|
| `/pr-comment --list` | The reviews saved for this conversation, with their IDs, PRs and state; no model or Azure DevOps request. |
|
|
929
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. |
|
|
930
1220
|
| `/<command> --help` | The command's usage and examples; no model or Azure DevOps request. |
|
|
@@ -946,32 +1236,39 @@ Text after the URL (and the flag) is supplementary context for that command
|
|
|
946
1236
|
only. PR content, comments and tool responses are untrusted data.
|
|
947
1237
|
|
|
948
1238
|
<details>
|
|
949
|
-
<summary>Status meanings: COMPLETE, STALE, PARTIAL, and what a
|
|
1239
|
+
<summary>Status meanings: COMPLETE, STALE, PARTIAL, and what a receipt states</summary>
|
|
950
1240
|
|
|
951
|
-
- **COMPLETE**:
|
|
952
|
-
|
|
953
|
-
|
|
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.
|
|
954
1244
|
- **STALE**: the PR source commit changed during the review; run a new one.
|
|
955
|
-
- **PARTIAL**:
|
|
956
|
-
|
|
957
|
-
- **INCOMPLETE / CANCELLED / TIMED_OUT**: the command did not finish
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
`
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
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>`).
|
|
975
1272
|
|
|
976
1273
|
A failed final version recheck adds a warning; it does not by itself prevent
|
|
977
1274
|
COMPLETE in any review mode. Read the receipt warnings. Publication separately
|
|
@@ -1078,7 +1375,7 @@ notices as before. The same terminal part brings the
|
|
|
1078
1375
|
|
|
1079
1376
|
## Comments
|
|
1080
1377
|
|
|
1081
|
-
`/pr-comment` plans one general summary plus inline comments for
|
|
1378
|
+
`/pr-comment` plans one general summary plus inline comments for high
|
|
1082
1379
|
and medium findings (low findings stay in the summary index). Planning runs in
|
|
1083
1380
|
pages of at most four findings (more only where one defect at several places
|
|
1084
1381
|
keeps its findings together), two pages at a time, and the pages are joined
|
|
@@ -1087,12 +1384,12 @@ page may get a correction turn, and an item that still cannot be posted
|
|
|
1087
1384
|
faithfully is skipped with a reason instead of failing the command. Inline
|
|
1088
1385
|
titles start with `π΄ high:` or `π‘ medium:` followed
|
|
1089
1386
|
by **π Summary**, **π Evidence** and **π‘ Suggested fix**; the summary starts
|
|
1090
|
-
with a π€ AI/model disclosure and may carry improvement suggestions.
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
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)).
|
|
1096
1393
|
|
|
1097
1394
|
One mistake is often made at several places of a pull request: the same wrong
|
|
1098
1395
|
call in each handler, the same stale text in each copy. Each place is a
|
|
@@ -1123,9 +1420,9 @@ findingsβ¦** at the foot of the panel does this from a list of the findings.
|
|
|
1123
1420
|
With commands, several IDs go in one list, separated by commas:
|
|
1124
1421
|
|
|
1125
1422
|
```text
|
|
1126
|
-
/pr-comment --exclude F-1,
|
|
1127
|
-
/pr-comment --severity F-3=low,
|
|
1128
|
-
/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
|
|
1129
1426
|
/pr-comment --exclude none put every finding back
|
|
1130
1427
|
/pr-comment --reset undo every adjustment
|
|
1131
1428
|
```
|
|
@@ -1171,8 +1468,7 @@ review, and a flag right after the PR URL sets it for one run:
|
|
|
1171
1468
|
|
|
1172
1469
|
Set a mode to `none` when you mostly read the report and comment rarely, for
|
|
1173
1470
|
example for `/pr-deep` with a costly model: the preview is planned by that
|
|
1174
|
-
mode's
|
|
1175
|
-
about four findings. A settings file
|
|
1471
|
+
mode's first reviewer model, one request for about four findings. A settings file
|
|
1176
1472
|
that names `afterReview` keeps its values on an upgrade; one that does not,
|
|
1177
1473
|
such as the file `/pr-setup` writes, follows this default.
|
|
1178
1474
|
|
|
@@ -1213,11 +1509,10 @@ loads content nor runs a script (such as `<input name="id">` or
|
|
|
1213
1509
|
since Azure DevOps may resolve them anywhere. Where a renderer could read the
|
|
1214
1510
|
code differently, for example a fence inside a list, code next to an HTML
|
|
1215
1511
|
line, or a backtick that a link or tag could take, the text is checked as
|
|
1216
|
-
written.
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
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.
|
|
1221
1516
|
When every finding is already discussed on the PR, typically by AZPR's own
|
|
1222
1517
|
comment from an earlier run, there is nothing new to post: the receipt says
|
|
1223
1518
|
`NOTHING_TO_POST` and the plan is saved (the summary's marker follows the
|
|
@@ -1248,11 +1543,13 @@ kept under `${XDG_STATE_HOME:-~/.local/state}/opencode/azpr-v2/` with owner-only
|
|
|
1248
1543
|
permissions. The newest 20 reviews are kept; older ones and stale scratch data
|
|
1249
1544
|
are removed automatically. A receipt that cannot reach the conversation is saved
|
|
1250
1545
|
under `receipts/` there. `/pr-comment` only accepts reviews started in the same
|
|
1251
|
-
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.
|
|
1252
1549
|
|
|
1253
1550
|
AZPR's private reviewer sessions are sessions of their own, not children of
|
|
1254
|
-
your conversation: OpenCode 2.3.0
|
|
1255
|
-
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
|
|
1256
1553
|
next to your conversations, titled `[AZPR <id>] β¦`, and does not delete
|
|
1257
1554
|
sessions by itself, so AZPR removes them (`deletePrivateSessions`, on by
|
|
1258
1555
|
default). When a review ends, only the session that holds its report or draft
|
|
@@ -1317,8 +1614,8 @@ dependency and is not built on your machine.
|
|
|
1317
1614
|
Uninstall without `--apply` previews; `--apply` archives only this package under
|
|
1318
1615
|
`azpr-v2-backups` and leaves the private state directory for you to delete.
|
|
1319
1616
|
For a native installation, remove the entry you added, for example
|
|
1320
|
-
`opencode plugin remove opencode-azure-devops-pr-review@0.
|
|
1321
|
-
`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'`;
|
|
1322
1619
|
the external settings, PAT file and private review state remain available.
|
|
1323
1620
|
|
|
1324
1621
|
[Architecture](docs/ARCHITECTURE.md), [commenting](docs/COMMENTING.md),
|
|
@@ -1331,7 +1628,7 @@ or personal model selections.
|
|
|
1331
1628
|
## License and releases
|
|
1332
1629
|
|
|
1333
1630
|
[MIT](LICENSE), copyright 2026 WTLAIB. See the [changelog](CHANGELOG.md) for the
|
|
1334
|
-
release scope, [v0.
|
|
1631
|
+
release scope, [v0.5.0](https://github.com/WTLAIB/opencode-azure-devops-pr-review-v2/releases/tag/v0.5.0)
|
|
1335
1632
|
for downloads, the [npm package](https://www.npmjs.com/package/opencode-azure-devops-pr-review),
|
|
1336
1633
|
[v0.2.0](https://github.com/WTLAIB/opencode-azure-devops-pr-review-v2/releases/tag/v0.2.0)
|
|
1337
1634
|
for the recorded demonstration, and [releasing](docs/RELEASING.md) for the
|