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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,236 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.5.0 — 2026-11-24
|
|
4
|
+
|
|
5
|
+
Every review now runs one pipeline: independent review passes, a duplicate
|
|
6
|
+
check and a severity rating, then comment planning as before. `/pr-review`,
|
|
7
|
+
`/pr-deep` and `/pr-quick` differ only in the models listed for them. The
|
|
8
|
+
verifier is gone, and so is the split into a functional and a risk reviewer.
|
|
9
|
+
This release changes how findings are produced, what reports and comments say
|
|
10
|
+
about them, and the layout of the settings file: the settings of 0.4.x are not
|
|
11
|
+
used until you confirm an update that `/pr-setup` shows first (see Upgrading).
|
|
12
|
+
|
|
13
|
+
Why: measured on ReviewBench's test set with two model strengths, a verifier
|
|
14
|
+
of the reviewers' own strength rejected 0 of 280 and 3 of 1,185 candidate
|
|
15
|
+
findings and added few of its own, for 30% and 54% of a review's cost; two
|
|
16
|
+
passes of one reviewer prompt found about as much as the functional and the
|
|
17
|
+
risk reviewer together. What is lost with the verifier is named there too:
|
|
18
|
+
its additions, and for the stronger model a rewrite that read better in about
|
|
19
|
+
one finding in eight. The runs, their judge (our own, not the benchmark's)
|
|
20
|
+
and their limits are in the [validation record](docs/VALIDATION.md).
|
|
21
|
+
|
|
22
|
+
Measured before the release with ReviewBench's own judge, against 0.4.6 with
|
|
23
|
+
GPT-6.2 Sol on 24 pull requests of its test set: two passes found about as
|
|
24
|
+
many reference issues (49.1% against 51.5%) at 58% of the cost, with 89.7% of
|
|
25
|
+
their findings judged valid against 93.2%; three passes matched 0.4.6 (51.2%,
|
|
26
|
+
93.2%) at 78% of the cost; four found more (54.8%, and 65.6% of the high and
|
|
27
|
+
medium ones against 60.6%) at about the same cost
|
|
28
|
+
([validation record](docs/VALIDATION.md#050-against-046-on-reviewbench-with-its-own-judge-2026-11-24)).
|
|
29
|
+
|
|
30
|
+
Reviews:
|
|
31
|
+
|
|
32
|
+
- **Passes instead of roles.** `models.<mode>.reviewers` lists one to four
|
|
33
|
+
models (`provider/model` or `provider/model#variant`); each entry is one
|
|
34
|
+
pass, and an entry may repeat. A pass is an independent reviewer session per
|
|
35
|
+
shard that covers function and failure behaviour, reads beyond the diff and
|
|
36
|
+
checks each of its findings against the source before it answers. Passes do
|
|
37
|
+
not see each other's work, and all sessions of a review share
|
|
38
|
+
`workflow.parallelSessions`.
|
|
39
|
+
- **No verifier.** Nothing checks a finding after its reviewer. The runtime
|
|
40
|
+
checks what it can check without judging: every field is there, the
|
|
41
|
+
location exists at the reviewed commit, and the session that reports a
|
|
42
|
+
finding read that file. Findings that pass are `REPORTED`; the others are
|
|
43
|
+
`NEEDS_INFO` and never commented on.
|
|
44
|
+
- **Finding IDs are `F-1`, `F-2`, … for the whole review**, numbered by place
|
|
45
|
+
(HEAD before BASE, then path and lines) and then by pass. The IDs no longer
|
|
46
|
+
say which reviewer found something, and they do not depend on which session
|
|
47
|
+
finished first. A reviewer numbers its findings in a range of its shard
|
|
48
|
+
(`F-1001`, …); where its text names one of its own findings, the text
|
|
49
|
+
names that finding's review ID afterwards, or the finding it was merged
|
|
50
|
+
into. Code in the text (a code span, a fenced block, an ID written between
|
|
51
|
+
quotes) stays as written.
|
|
52
|
+
- **A duplicate check across sessions.** Where different reviewer sessions
|
|
53
|
+
reported findings on one side of one file, a session of the first reviewer
|
|
54
|
+
model compares them and merges repeated reports of one defect (the same root
|
|
55
|
+
cause and the same correction). The same kind of mistake at several places
|
|
56
|
+
stays several findings; one comment may still cover them, as since 0.4.6.
|
|
57
|
+
The check never merges two findings of one session, also not through a
|
|
58
|
+
third finding: the runtime refuses such a merge. A check that fails keeps
|
|
59
|
+
every finding. The finding that stays records the reports it stands for.
|
|
60
|
+
- **A severity rating, on by default.** After the duplicate check, sessions
|
|
61
|
+
without tools rate the reported findings from their text alone, without the
|
|
62
|
+
level their reviewer gave them, so that the findings of different models
|
|
63
|
+
stand on one scale. `models.<mode>.rater` is `""` (the first reviewer model
|
|
64
|
+
rates), a model, or `false` (no rating; the reviewers' levels stay). The
|
|
65
|
+
report shows the reviewer's own level where the rating changed it. In 0.4.x
|
|
66
|
+
the rating ran only with a named rater.
|
|
67
|
+
- **`/pr-deep` and `/pr-quick` are the same review with other models.** An
|
|
68
|
+
empty list leaves the mode off, which is the default for both; no mode falls
|
|
69
|
+
back to another mode's models. Deep is for stronger models, a higher
|
|
70
|
+
variant or more passes; quick is usually one pass of a fast model.
|
|
71
|
+
- **Coverage is two numbers** when a mode has several passes: the changed
|
|
72
|
+
files reviewed in at least one pass, and those reviewed in every pass. A
|
|
73
|
+
pass that fails costs depth, which the second number and a warning show; a
|
|
74
|
+
file is unreviewed only when no pass reviewed it. A review is `COMPLETE`
|
|
75
|
+
when at least one session gave a usable answer, `PARTIAL` when answers came
|
|
76
|
+
but none was usable, and without a result when every session failed.
|
|
77
|
+
|
|
78
|
+
Reports, receipts and comments:
|
|
79
|
+
|
|
80
|
+
- A report states status, coverage and method separately, and says in its
|
|
81
|
+
first lines that findings were checked by their reviewer and that no
|
|
82
|
+
separate verification ran. A receipt's first line reads
|
|
83
|
+
`COMPLETE; coverage complete; verification none` (with several passes:
|
|
84
|
+
`coverage complete, 12/12 file(s) in every pass`; where not every changed
|
|
85
|
+
file was reviewed, also how many were: `coverage incomplete, 11/12 file(s)
|
|
86
|
+
reviewed, 10/12 in every pass`).
|
|
87
|
+
- Comments carry a new disclosure line: "Review method: findings checked by
|
|
88
|
+
their reviewer against the source, no separate verification", followed by
|
|
89
|
+
the models. Comments already on a pull request keep the line they were
|
|
90
|
+
posted with, and AZPR recognises all three wordings as its own.
|
|
91
|
+
- Reviews saved by 0.4.x can still be shown, previewed and published. A
|
|
92
|
+
review whose findings a verifier confirmed is planned with the wording of
|
|
93
|
+
0.4.6 and its comments keep the old line.
|
|
94
|
+
- Comment planning, previews, adjustments, automatic comments and publication
|
|
95
|
+
work as before, with the first reviewer model as the planner. A
|
|
96
|
+
`/pr-comment --publish` that only posts a saved preview needs no model and
|
|
97
|
+
does not read the model catalog.
|
|
98
|
+
- A correction turn that fails or gives no usable answer no longer costs a
|
|
99
|
+
usable one, in any stage: the latest usable answer stands (a follow-up's,
|
|
100
|
+
where it had one), and the items it would have repaired stay degraded. So
|
|
101
|
+
does a follow-up whose context overflows on a shard of one file. A
|
|
102
|
+
duplicate check that returns no list of merges counts as failed.
|
|
103
|
+
|
|
104
|
+
Settings (`version: 3`):
|
|
105
|
+
|
|
106
|
+
- New: `models.review.reviewers`, `models.deep.reviewers`,
|
|
107
|
+
`models.quick.reviewers` (lists), and `models.<mode>.rater` for all three
|
|
108
|
+
modes (`""`, a model, or `false`).
|
|
109
|
+
- Removed: `models.<mode>.functional`, `risk` and `verifier`,
|
|
110
|
+
`models.quick.reviewer`, the documentation-only `models._help`, and
|
|
111
|
+
`workflow.shardFindings`, which sized the verifier's batches.
|
|
112
|
+
- `/pr-check` shows each mode's passes and which model rates.
|
|
113
|
+
|
|
114
|
+
Upgrading from 0.4.x:
|
|
115
|
+
|
|
116
|
+
- The settings of 0.4.x (`version: 2`) are kept as they are and not used.
|
|
117
|
+
Until they are updated, AZPR's commands only say that the settings need an
|
|
118
|
+
update; no review and no Azure request starts.
|
|
119
|
+
- `/pr-setup` shows what the update changes before anything is written. In
|
|
120
|
+
OpenCode's terminal UI it asks, in a list whose first row keeps the file.
|
|
121
|
+
In other clients it prints the changes and the command that confirms them
|
|
122
|
+
(`/pr-setup --migrate <word>`); the word belongs to the file as it was
|
|
123
|
+
shown, so a file that changed meanwhile is shown again.
|
|
124
|
+
- The update turns the functional and the risk model of a mode into its two
|
|
125
|
+
passes, in that order, and drops the verifier model. A quick reviewer
|
|
126
|
+
becomes a list of one. A named rater stays. `/pr-deep` stays off when it
|
|
127
|
+
was off, also when only some of its three models were set. Every other
|
|
128
|
+
setting keeps its value. The update repairs nothing: a value 0.4.x could
|
|
129
|
+
not use stays where it goes now, and so does a setting this version does
|
|
130
|
+
not know, so that `/pr-setup` names it afterwards; a mode whose models
|
|
131
|
+
already name `reviewers`, which 0.4.x refused, is kept as it is, and where
|
|
132
|
+
it is written as this version writes a mode, the update shows the passes
|
|
133
|
+
it then runs. A first setup's update is loaded at once; settings that are
|
|
134
|
+
in use wait for a restart, as always.
|
|
135
|
+
- What changes without being asked for, and is named before you confirm: a
|
|
136
|
+
mode without a rater now gets its findings rated by its first reviewer
|
|
137
|
+
model (`"rater": false` turns that off), and with `afterReview` set to
|
|
138
|
+
`publish` the comments of the new reviews are posted automatically although
|
|
139
|
+
no verifier confirmed their findings.
|
|
140
|
+
- Source installations: `install.sh --replace` carries a version-2 settings
|
|
141
|
+
file over byte for byte and says so (also one whose version reads `2.0`,
|
|
142
|
+
as 0.4.x accepted); `/pr-setup` then updates it.
|
|
143
|
+
|
|
144
|
+
Setup:
|
|
145
|
+
|
|
146
|
+
- `--model M` on a first setup writes M twice for `/pr-review` and once for
|
|
147
|
+
`/pr-quick`. `--review-model`, `--quick-model` and `--deep-model` take one
|
|
148
|
+
model (the mode's usual passes: two, one and two), `M*N` for N passes, or
|
|
149
|
+
entries separated by commas for different models; `off` turns quick or deep
|
|
150
|
+
off.
|
|
151
|
+
- In the terminal UI a model row asks for one model and then for the passes:
|
|
152
|
+
take what is shown, add a pass of the same or another model, or take the
|
|
153
|
+
last one away. Picking the saved first model again starts from the saved
|
|
154
|
+
passes.
|
|
155
|
+
|
|
156
|
+
Compatibility:
|
|
157
|
+
|
|
158
|
+
- Tested with OpenCode 2.3.2 (was 2.3.0); `/pr-check` warns on other versions.
|
|
159
|
+
- The private agents are now `azpr-<mode>-reviewer`, `-reviewerb`,
|
|
160
|
+
`-reviewerc`, `-reviewerd`, `-dedupe`, `-rating`, `-comment-plan` and, for
|
|
161
|
+
review and deep, `-comment-plan-verified`. The names of the 0.4.x roles
|
|
162
|
+
stay reserved.
|
|
163
|
+
|
|
164
|
+
## 0.4.6 — 2026-11-21
|
|
165
|
+
|
|
166
|
+
One defect that a pull request makes at several places now gets one inline
|
|
167
|
+
comment that lists the other places, where each place had a thread of its own.
|
|
168
|
+
The reviewer and verifier instructions are those of 0.4.5, so a review finds
|
|
169
|
+
and verifies as before; the comment planner's instructions changed, and no
|
|
170
|
+
setting is new.
|
|
171
|
+
|
|
172
|
+
Comments:
|
|
173
|
+
|
|
174
|
+
- A mistake repeated in several places (the same wrong call in each handler,
|
|
175
|
+
the same stale text in each copy) is one finding per place, since each place
|
|
176
|
+
needs its own correction. Each of them used to get an inline thread with
|
|
177
|
+
much the same text: twelve moved files with one inherited defect were twelve
|
|
178
|
+
threads to read and resolve. The comment planner may now write one comment
|
|
179
|
+
for such findings, at the place that shows the mistake most clearly.
|
|
180
|
+
- AZPR lists every other place under that comment, in a section
|
|
181
|
+
`**📍 Also at** (the same defect; fix these places with it):` (in Chinese
|
|
182
|
+
`**📍 其他位置**`): one row per other finding with its file, its lines and
|
|
183
|
+
its ID. The rows are the findings' own locations, not text the planner
|
|
184
|
+
wrote, and the list is plain: nothing is collapsed or linked, so its own
|
|
185
|
+
markup holds nothing back in automatic publication (a file name is checked
|
|
186
|
+
like any other text of the comment).
|
|
187
|
+
- Findings share a comment only when they have the same severity (high or
|
|
188
|
+
medium), lie on different lines of files the pull request changes, and the
|
|
189
|
+
planner says they are the same mistake with the same correction. Places
|
|
190
|
+
that need different corrections keep their own comments, and when unsure
|
|
191
|
+
the planner keeps findings apart. The preview shows a shared comment with
|
|
192
|
+
all its findings and the planner's reason.
|
|
193
|
+
- A place is listed as its finding states it. The runtime therefore offers a
|
|
194
|
+
finding only when the file has those lines at the reviewed commit and its
|
|
195
|
+
name can stand in a list unchanged, and it accepts a shared comment only
|
|
196
|
+
when its anchor touches the lines of exactly one of its findings, which is
|
|
197
|
+
where the comment stands. A text that ends inside a code fence or a raw
|
|
198
|
+
HTML block, which would take the list in, is sent back for correction.
|
|
199
|
+
- The review is unchanged: it still has one finding per place. Each keeps
|
|
200
|
+
its row in the summary index, its ID, and can be left out or given another
|
|
201
|
+
severity after a preview.
|
|
202
|
+
- A shared comment has a marker of its own, made of its file, the lines it
|
|
203
|
+
quotes and the other places it lists. Publication skips it only when that
|
|
204
|
+
marker is on the pull request, so `ALREADY_PRESENT` means that this very
|
|
205
|
+
comment, with every place, is there. The markers of comments for one place
|
|
206
|
+
are unchanged, and so is publication.
|
|
207
|
+
- Which findings may be such repeats is settled before the planning pages are
|
|
208
|
+
made, and only when at least two of them have one severity and lie at
|
|
209
|
+
different places. When all findings fit one page (at most four, within a
|
|
210
|
+
page's text), that page is offered its findings of equal severity at
|
|
211
|
+
different places. Otherwise, where two of them fit one page together, a
|
|
212
|
+
grouping pass runs first: one more stage of the comment planner, usually
|
|
213
|
+
one request, whose input is the findings that could share a page with
|
|
214
|
+
another one of their severity, and which says which are one mistake at
|
|
215
|
+
several places. A group then shares a
|
|
216
|
+
page, which can hold more than four findings. A pass that fails costs only
|
|
217
|
+
the grouping (a progress notice says so, and the comments are planned one
|
|
218
|
+
per place), and a run that is stopped during it plans nothing more.
|
|
219
|
+
- Nothing posted is ever changed, and an item the PR already has is skipped
|
|
220
|
+
as always. When a pull request with a shared comment is planned again, the
|
|
221
|
+
planner is told which other places that thread says it covers, so they get
|
|
222
|
+
no thread of their own; the list is read back only where AZPR wrote it, in
|
|
223
|
+
the comment that opened the thread.
|
|
224
|
+
- A shared comment and a comment for one place are not put on the same
|
|
225
|
+
quoted lines (a thread per place from an earlier version, say): when
|
|
226
|
+
planning, the comment is sent back and the planner is asked for another
|
|
227
|
+
place or to skip the finding as discussed, and a comment that still stands
|
|
228
|
+
there is not planned, with the reason shown in the preview.
|
|
229
|
+
|
|
230
|
+
The README's benchmark section now says what each precision measures: the
|
|
231
|
+
share of comments on Martian's list of issues, next to the share of findings
|
|
232
|
+
that ReviewBench's judge rated valid.
|
|
233
|
+
|
|
3
234
|
## 0.4.5 — 2026-11-20
|
|
4
235
|
|
|
5
236
|
While a run is under way, the terminal panel offers to stop it. The reviewer,
|