opencode-azure-devops-pr-review 0.2.3 → 0.3.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/AGENTS.md +12 -0
- package/CHANGELOG.md +29 -0
- package/CODE_OF_CONDUCT.md +83 -0
- package/README.md +70 -28
- package/docs/ARCHITECTURE.md +26 -1
- package/docs/COMMENTING.md +79 -0
- package/docs/DEMO.md +45 -1
- package/docs/QUICKSTART.md +33 -7
- package/docs/ROADMAP.md +8 -0
- package/docs/VALIDATION.md +190 -37
- package/docs/VALIDATION_HISTORY.md +40 -0
- package/docs/assets/RECORDING.md +9 -2
- package/docs/assets/adjust-findings-teaser.gif +0 -0
- package/docs/assets/adjust-preview.png +0 -0
- package/docs/assets/adjust-publication.png +0 -0
- package/docs/assets/render-terminal-demo.py +1 -1
- package/docs/releases/v0.3.0.md +125 -0
- package/package.json +3 -2
- package/src/attribution.mjs +1 -1
- package/src/azure.mjs +15 -0
- package/src/comment-work.mjs +30 -9
- package/src/comments.mjs +184 -4
- package/src/output.mjs +71 -0
- package/src/runtime.mjs +101 -20
package/AGENTS.md
CHANGED
|
@@ -115,6 +115,18 @@ settings, backups and failure records. Never upload `.local/`.
|
|
|
115
115
|
behavior.
|
|
116
116
|
- Inline markers are stable (PR, path, normalized anchor, ordinal); do not put a
|
|
117
117
|
review ID or model wording into them.
|
|
118
|
+
- A person's adjustments (`/pr-comment <review-id> --exclude`, `--severity`,
|
|
119
|
+
`--reset`) change only the findings handed to comment planning, never the
|
|
120
|
+
review record or a prompt file; the planner input carries `adjustments` only
|
|
121
|
+
when some exist, so unadjusted reviews plan exactly as before. A review
|
|
122
|
+
adjusted once is posted only from a preview planned after its latest
|
|
123
|
+
adjustment (an adjustment drops the earlier preview in the same save) and is
|
|
124
|
+
neither adjusted nor planned again once its publication started. That save
|
|
125
|
+
and the new preview's save must succeed; never let a failed save report an
|
|
126
|
+
adjustment as applied. Text the runtime renders that names an excluded
|
|
127
|
+
finding holds publication. Items an earlier publication already put on the
|
|
128
|
+
PR are skipped as always; its receipt names those whose text differs, since
|
|
129
|
+
posted comments are never changed.
|
|
118
130
|
- Comment planning pages run side by side, so nothing a page sees or produces
|
|
119
131
|
may depend on which page finishes first: only the first page writes the
|
|
120
132
|
summary note, each page keeps its own continuation state and evidence, and
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,34 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.3.0 — 2026-10-26
|
|
4
|
+
|
|
5
|
+
- Choose what reaches the PR after reading a preview:
|
|
6
|
+
`/pr-comment <review-id> --exclude F-1,F-2` leaves findings out, and
|
|
7
|
+
`--severity F-3=low` changes their publication severity. Each option replaces
|
|
8
|
+
its own saved list (`none` clears it); `--reset` clears both. The model plans
|
|
9
|
+
a new preview without rerunning the review, and the original findings and
|
|
10
|
+
report stay unchanged. A severity change does not verify a finding again.
|
|
11
|
+
- `/pr-comment [review-id] --show` displays the saved preview without calling
|
|
12
|
+
a model or Azure DevOps. Excluding every finding plans and posts nothing.
|
|
13
|
+
- Adjustments and the invalidation of the earlier preview are saved together.
|
|
14
|
+
A failed save reports failure and changes nothing; a new preview whose save
|
|
15
|
+
fails is dropped. A review adjusted once, including one reset since, can be
|
|
16
|
+
published only from a saved preview planned after its latest adjustment.
|
|
17
|
+
Once publication starts, adjustments and re-planning are refused.
|
|
18
|
+
- The final preview is checked for excluded finding IDs, including summary
|
|
19
|
+
rows rendered from retained findings. An unresolved reference holds
|
|
20
|
+
publication. Existing PR comments are never edited; for an adjusted review,
|
|
21
|
+
the receipt names those whose text differs from the new preview, including
|
|
22
|
+
comments that appear only when AZPR reads the threads back.
|
|
23
|
+
- The README leads with control over published comments and a real OpenCode
|
|
24
|
+
2.1.4 recording of adjusting findings and publishing; the first-review
|
|
25
|
+
example and quickstart cover adjustments, the new preview and publication.
|
|
26
|
+
The npm package, Git installation and source archive advance to 0.3.0. The
|
|
27
|
+
package description mentions adjusting previews, and the npm package now
|
|
28
|
+
includes the code of conduct that its README and contributing guide link to.
|
|
29
|
+
- CI actions are pinned by commit and updated with Dependabot. Validation
|
|
30
|
+
starts with a summary and records the known limits of the review evidence.
|
|
31
|
+
|
|
3
32
|
## 0.2.3 — 2026-10-24
|
|
4
33
|
|
|
5
34
|
- The tested host is OpenCode CLI 2.1.4. OpenCode 2.1.3 and later embed Bun
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
|
2
|
+
|
|
3
|
+
## Our Pledge
|
|
4
|
+
|
|
5
|
+
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation.
|
|
6
|
+
|
|
7
|
+
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
|
|
8
|
+
|
|
9
|
+
## Our Standards
|
|
10
|
+
|
|
11
|
+
Examples of behavior that contributes to a positive environment for our community include:
|
|
12
|
+
|
|
13
|
+
* Demonstrating empathy and kindness toward other people
|
|
14
|
+
* Being respectful of differing opinions, viewpoints, and experiences
|
|
15
|
+
* Giving and gracefully accepting constructive feedback
|
|
16
|
+
* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
|
|
17
|
+
* Focusing on what is best not just for us as individuals, but for the overall community
|
|
18
|
+
|
|
19
|
+
Examples of unacceptable behavior include:
|
|
20
|
+
|
|
21
|
+
* The use of sexualized language or imagery, and sexual attention or advances of any kind
|
|
22
|
+
* Trolling, insulting or derogatory comments, and personal or political attacks
|
|
23
|
+
* Public or private harassment
|
|
24
|
+
* Publishing others' private information, such as a physical or email address, without their explicit permission
|
|
25
|
+
* Other conduct which could reasonably be considered inappropriate in a professional setting
|
|
26
|
+
|
|
27
|
+
## Enforcement Responsibilities
|
|
28
|
+
|
|
29
|
+
Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
|
|
30
|
+
|
|
31
|
+
Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
|
|
32
|
+
|
|
33
|
+
## Scope
|
|
34
|
+
|
|
35
|
+
This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
|
|
36
|
+
|
|
37
|
+
## Enforcement
|
|
38
|
+
|
|
39
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at weiting.lai.code@gmail.com. All complaints will be reviewed and investigated promptly and fairly.
|
|
40
|
+
|
|
41
|
+
All community leaders are obligated to respect the privacy and security of the reporter of any incident.
|
|
42
|
+
|
|
43
|
+
## Enforcement Guidelines
|
|
44
|
+
|
|
45
|
+
Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
|
|
46
|
+
|
|
47
|
+
### 1. Correction
|
|
48
|
+
|
|
49
|
+
**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
|
|
50
|
+
|
|
51
|
+
**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
|
|
52
|
+
|
|
53
|
+
### 2. Warning
|
|
54
|
+
|
|
55
|
+
**Community Impact**: A violation through a single incident or series of actions.
|
|
56
|
+
|
|
57
|
+
**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
|
|
58
|
+
|
|
59
|
+
### 3. Temporary Ban
|
|
60
|
+
|
|
61
|
+
**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
|
|
62
|
+
|
|
63
|
+
**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
|
|
64
|
+
|
|
65
|
+
### 4. Permanent Ban
|
|
66
|
+
|
|
67
|
+
**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
|
|
68
|
+
|
|
69
|
+
**Consequence**: A permanent ban from any sort of public interaction within the community.
|
|
70
|
+
|
|
71
|
+
## Attribution
|
|
72
|
+
|
|
73
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.1, available at [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
|
|
74
|
+
|
|
75
|
+
Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder][Mozilla CoC].
|
|
76
|
+
|
|
77
|
+
For answers to common questions about this code of conduct, see the FAQ at [https://www.contributor-covenant.org/faq][FAQ]. Translations are available at [https://www.contributor-covenant.org/translations][translations].
|
|
78
|
+
|
|
79
|
+
[homepage]: https://www.contributor-covenant.org
|
|
80
|
+
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
|
|
81
|
+
[Mozilla CoC]: https://github.com/mozilla/diversity
|
|
82
|
+
[FAQ]: https://www.contributor-covenant.org/faq
|
|
83
|
+
[translations]: https://www.contributor-covenant.org/translations
|
package/README.md
CHANGED
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
|
|
8
8
|
**Review Azure DevOps pull requests from a URL. No checkout required.**
|
|
9
9
|
|
|
10
|
-
Review
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
Review pull requests across your configured Azure DevOps organization with your
|
|
11
|
+
own OpenCode models, without cloning each repository. Preview the comments,
|
|
12
|
+
leave out findings or change their severity, and publish when you are ready.
|
|
13
|
+
No MCP server or CI pipeline setup is required.
|
|
14
14
|
|
|
15
15
|
AZPR is an independent community project. It is not built by or affiliated with
|
|
16
16
|
the OpenCode team.
|
|
@@ -18,17 +18,24 @@ the OpenCode team.
|
|
|
18
18
|
[Get started](docs/QUICKSTART.md) · [See the demo](docs/DEMO.md) ·
|
|
19
19
|
[Team setup and data handling](docs/ENTERPRISE.md) ·
|
|
20
20
|
[Validation and limitations](docs/VALIDATION.md) ·
|
|
21
|
-
[Download v0.
|
|
21
|
+
[Download v0.3.0](https://github.com/WTLAIB/opencode-azure-devops-pr-review-v2/releases/tag/v0.3.0)
|
|
22
22
|
|
|
23
|
-
[](docs/DEMO.md)
|
|
24
24
|
|
|
25
|
-
*A
|
|
25
|
+
*A 15-second edit of a real OpenCode 2.1.4 run: exclude one finding, lower
|
|
26
|
+
another to low, read the new preview, then publish. Waiting time is shortened.
|
|
27
|
+
Read the [demo and recording details](docs/DEMO.md), or watch the earlier
|
|
26
28
|
[73-second walkthrough](https://github.com/WTLAIB/opencode-azure-devops-pr-review-v2/releases/download/v0.2.0/azpr-live-demo.mp4)
|
|
27
|
-
|
|
28
|
-
the Azure portion shows an actual REST read-back in a terminal.*
|
|
29
|
+
of a review, preview and publication.*
|
|
29
30
|
|
|
30
31
|
## Why AZPR?
|
|
31
32
|
|
|
33
|
+
- **You decide what gets posted.** Preview the AI's comments, exclude findings
|
|
34
|
+
you don't want to publish, and adjust severity. AZPR prepares a new preview
|
|
35
|
+
without rerunning the review. Read it, then publish when ready. Your original
|
|
36
|
+
review stays intact.
|
|
37
|
+
- **Publish safely.** AZPR rechecks the PR head, skips matching comments it
|
|
38
|
+
already posted, and reads new comments back. Automatic publication is opt-in.
|
|
32
39
|
- **Follow the code beyond the diff.** Reviewers can look up definitions,
|
|
33
40
|
callers and tests using file reads and text search at the selected PR commit,
|
|
34
41
|
without depending on an Azure Code Search index.
|
|
@@ -39,10 +46,6 @@ the Azure portion shows an actual REST read-back in a terminal.*
|
|
|
39
46
|
- **Choose where to spend model effort.** Assign different OpenCode models to
|
|
40
47
|
functional review, risk review and verification, or use one model for all
|
|
41
48
|
roles. Keep a stronger model profile for selected PRs with `/pr-deep`.
|
|
42
|
-
- **Control what reaches the PR.** Preview the summary and inline comments,
|
|
43
|
-
then publish when ready. The runtime rechecks the PR head, skips comments
|
|
44
|
-
already published by AZPR and reads new comments back. Automatic publication
|
|
45
|
-
is available when you opt in.
|
|
46
49
|
- **Configure the Azure connection for your network.** Set a forward proxy and
|
|
47
50
|
additional CA certificates for AZPR's Azure DevOps requests. Model-provider
|
|
48
51
|
connections remain configured in OpenCode.
|
|
@@ -58,7 +61,7 @@ for proxy authentication and retention.
|
|
|
58
61
|
1. Install the npm package using OpenCode's plugin manager:
|
|
59
62
|
|
|
60
63
|
```sh
|
|
61
|
-
opencode plugin add opencode-azure-devops-pr-review@0.
|
|
64
|
+
opencode plugin add opencode-azure-devops-pr-review@0.3.0
|
|
62
65
|
```
|
|
63
66
|
|
|
64
67
|
2. Follow the [quickstart](docs/QUICKSTART.md) to save your PAT in a private
|
|
@@ -77,14 +80,27 @@ reviewers, then separate verification. If the completed review has findings to
|
|
|
77
80
|
comment on, `--preview` prepares their comments in a separate, cancellable run.
|
|
78
81
|
**Nothing is posted by these commands.** Previewing comments also uses a model.
|
|
79
82
|
|
|
80
|
-
Read the report and preview,
|
|
83
|
+
Read the report and preview. Before publishing, you can exclude a finding or
|
|
84
|
+
change its severity using IDs from your report, for example:
|
|
85
|
+
|
|
86
|
+
```text
|
|
87
|
+
/pr-comment REVIEW_ID_FROM_RECEIPT --exclude F-1 --severity F-2=low
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
F-1 is excluded from the new preview; F-2 appears as low in the summary, with no
|
|
91
|
+
new inline comment. Adjusting runs comment planning again with a model. Read the
|
|
92
|
+
whole new preview, then publish from the same conversation:
|
|
81
93
|
|
|
82
94
|
```text
|
|
83
95
|
/pr-comment REVIEW_ID_FROM_RECEIPT --publish
|
|
84
96
|
```
|
|
85
97
|
|
|
86
98
|
Use the review ID from the completed receipt. The command posts the saved
|
|
87
|
-
preview as the PAT owner
|
|
99
|
+
preview as the PAT owner and skips matching comments AZPR already posted. It
|
|
100
|
+
never edits them; for an adjusted review, the receipt identifies those whose
|
|
101
|
+
text differs from the new preview. See
|
|
102
|
+
[adjusting findings](#adjusting-findings-after-a-preview) for how repeating an
|
|
103
|
+
option replaces its earlier list. For a lighter first pass, use
|
|
88
104
|
`/pr-quick <PR URL> --preview`; its findings are not independently verified.
|
|
89
105
|
|
|
90
106
|
## Choose a review
|
|
@@ -210,14 +226,14 @@ Azure DevOps REST API with the runtime's built-in `fetch`.
|
|
|
210
226
|
Install the npm package with OpenCode's plugin manager:
|
|
211
227
|
|
|
212
228
|
```sh
|
|
213
|
-
opencode plugin add opencode-azure-devops-pr-review@0.
|
|
229
|
+
opencode plugin add opencode-azure-devops-pr-review@0.3.0
|
|
214
230
|
```
|
|
215
231
|
|
|
216
232
|
The same release is also a versioned Git package, which needs Git but not the
|
|
217
233
|
npm registry:
|
|
218
234
|
|
|
219
235
|
```sh
|
|
220
|
-
opencode plugin add 'github:WTLAIB/opencode-azure-devops-pr-review-v2#v0.
|
|
236
|
+
opencode plugin add 'github:WTLAIB/opencode-azure-devops-pr-review-v2#v0.3.0'
|
|
221
237
|
```
|
|
222
238
|
|
|
223
239
|
Add only one of them. Restart OpenCode, then run `/pr-setup` for setup instructions. Native packages
|
|
@@ -228,7 +244,7 @@ To select another configuration file, use an absolute path in the host config:
|
|
|
228
244
|
```json
|
|
229
245
|
{
|
|
230
246
|
"plugins": [{
|
|
231
|
-
"package": "opencode-azure-devops-pr-review@0.
|
|
247
|
+
"package": "opencode-azure-devops-pr-review@0.3.0",
|
|
232
248
|
"options": { "settingsFile": "/absolute/path/to/azpr/settings.json" }
|
|
233
249
|
}]
|
|
234
250
|
}
|
|
@@ -241,14 +257,14 @@ permissions, archive the old installation with its uninstaller, then add the
|
|
|
241
257
|
package. Keep the PAT file and private state directory in place.
|
|
242
258
|
|
|
243
259
|
To upgrade a native installation, change the version in its existing `plugins`
|
|
244
|
-
entry, for example from `#v0.2.
|
|
260
|
+
entry, for example from `#v0.2.3` to `#v0.3.0` for the Git package. To move a
|
|
245
261
|
Git installation to npm, replace that entry's Git specification with
|
|
246
|
-
`opencode-azure-devops-pr-review@0.
|
|
262
|
+
`opencode-azure-devops-pr-review@0.3.0`. Both use the same external settings.
|
|
247
263
|
Preserve any `options.settingsFile` and other options; keep one AZPR entry.
|
|
248
264
|
Restart the OpenCode service to load the new version. External settings, the
|
|
249
265
|
PAT file and review records stay in place. Exact versions stay pinned, so
|
|
250
266
|
`opencode plugin update` leaves them unchanged. See the
|
|
251
|
-
[0.
|
|
267
|
+
[0.3.0 release notes](docs/releases/v0.3.0.md) for upgrade details and the
|
|
252
268
|
[0.2.0 release notes](docs/releases/v0.2.0.md) for automatic comments, which
|
|
253
269
|
remain disabled unless you configure `afterReview` or request them with a
|
|
254
270
|
review command flag.
|
|
@@ -258,8 +274,8 @@ review command flag.
|
|
|
258
274
|
<details>
|
|
259
275
|
<summary>Source installation and replacement</summary>
|
|
260
276
|
|
|
261
|
-
Download the [v0.
|
|
262
|
-
and extract it, or check out tag `v0.
|
|
277
|
+
Download the [v0.3.0 source archive](https://github.com/WTLAIB/opencode-azure-devops-pr-review-v2/archive/refs/tags/v0.3.0.tar.gz)
|
|
278
|
+
and extract it, or check out tag `v0.3.0`. The installer needs POSIX `sh` and
|
|
263
279
|
Python 3's standard library. From that source directory:
|
|
264
280
|
|
|
265
281
|
```sh
|
|
@@ -477,7 +493,9 @@ troubleshooting.
|
|
|
477
493
|
| `/pr-quick <PR URL> [flag] [context]` | One reviewer per shard for both focuses, no verification; findings are reported, not verified. |
|
|
478
494
|
| `/pr-stop [run-id]` | Cancel this conversation's active command. |
|
|
479
495
|
| `/pr-comment [review-id]` | Preview comments for this conversation's latest completed review. |
|
|
480
|
-
| `/pr-comment [review-id] --publish` | Post the saved preview
|
|
496
|
+
| `/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. |
|
|
497
|
+
| `/pr-comment [review-id] --show` | Show the saved preview again; no model or Azure DevOps request. |
|
|
498
|
+
| `/pr-comment <review-id> --exclude <IDs>` / `--severity <ID=level,…>` / `--reset` | Leave findings out or change their severity after reading the preview, then preview again (see [adjusting findings](docs/COMMENTING.md#adjusting-findings-after-a-preview)). |
|
|
481
499
|
|
|
482
500
|
Supported PR URLs are `https://dev.azure.com/<org>/<project>/_git/<repo>/pullrequest/<id>`
|
|
483
501
|
and `https://<org>.visualstudio.com/[DefaultCollection/]<project>/_git/<repo>/pullrequest/<id>`.
|
|
@@ -532,6 +550,30 @@ coverage), and their inline comments need a location on a changed HEAD file.
|
|
|
532
550
|
When two shards of a quick review report one defect, the planner may combine
|
|
533
551
|
them into one comment under fixed rules (see [commenting](docs/COMMENTING.md)).
|
|
534
552
|
|
|
553
|
+
### Adjusting findings after a preview
|
|
554
|
+
|
|
555
|
+
When a preview contains a finding you disagree with, leave it out or change
|
|
556
|
+
its severity, then read the new preview:
|
|
557
|
+
|
|
558
|
+
```text
|
|
559
|
+
/pr-comment <review-id> --exclude F-1 --severity F-2=low
|
|
560
|
+
```
|
|
561
|
+
|
|
562
|
+
Each command plans the comments again with a model, so combine both options in
|
|
563
|
+
one command when you use both. The comments are planned without the excluded
|
|
564
|
+
findings and with the new severities, so their wording may change; the summary
|
|
565
|
+
index follows them, and nothing on the PR mentions the adjustment. Each option
|
|
566
|
+
replaces its whole saved list: `--exclude F-1` and then `--exclude F-2` excludes
|
|
567
|
+
only F-2. A changed severity changes how a finding is published, not the finding
|
|
568
|
+
itself; when a finding is wrong, exclude it. Excluding every finding posts
|
|
569
|
+
nothing. `--reset` clears the adjustments, and `/pr-comment <review-id> --show`
|
|
570
|
+
shows the saved preview without a model. An adjusted review is posted only
|
|
571
|
+
from the preview planned after its latest adjustment; once its publication has
|
|
572
|
+
started, it is neither adjusted nor planned again. Comments that an earlier
|
|
573
|
+
publication put on the PR are never changed: they are skipped as always, and
|
|
574
|
+
the receipt of an adjusted review names those whose text differs from the
|
|
575
|
+
preview. See [adjusting findings](docs/COMMENTING.md#adjusting-findings-after-a-preview).
|
|
576
|
+
|
|
535
577
|
### Automatic comments
|
|
536
578
|
|
|
537
579
|
By default nothing follows a review: you preview with `/pr-comment` and post
|
|
@@ -639,8 +681,8 @@ and a loopback fake Azure DevOps REST service in disposable directories under
|
|
|
639
681
|
Uninstall without `--apply` previews; `--apply` archives only this package under
|
|
640
682
|
`azpr-v2-backups` and leaves the private state directory for you to delete.
|
|
641
683
|
For a native installation, remove the entry you added, for example
|
|
642
|
-
`opencode plugin remove opencode-azure-devops-pr-review@0.
|
|
643
|
-
`opencode plugin remove 'github:WTLAIB/opencode-azure-devops-pr-review-v2#v0.
|
|
684
|
+
`opencode plugin remove opencode-azure-devops-pr-review@0.3.0` or
|
|
685
|
+
`opencode plugin remove 'github:WTLAIB/opencode-azure-devops-pr-review-v2#v0.3.0'`;
|
|
644
686
|
the external settings, PAT file and private review state remain available.
|
|
645
687
|
|
|
646
688
|
[Architecture](docs/ARCHITECTURE.md), [commenting](docs/COMMENTING.md),
|
|
@@ -653,7 +695,7 @@ or personal model selections.
|
|
|
653
695
|
## License and releases
|
|
654
696
|
|
|
655
697
|
[MIT](LICENSE), copyright 2026 WTLAIB. See the [changelog](CHANGELOG.md) for the
|
|
656
|
-
release scope, [v0.
|
|
698
|
+
release scope, [v0.3.0](https://github.com/WTLAIB/opencode-azure-devops-pr-review-v2/releases/tag/v0.3.0)
|
|
657
699
|
for downloads, the [npm package](https://www.npmjs.com/package/opencode-azure-devops-pr-review),
|
|
658
700
|
[v0.2.0](https://github.com/WTLAIB/opencode-azure-devops-pr-review-v2/releases/tag/v0.2.0)
|
|
659
701
|
for the recorded demonstration, and [releasing](docs/RELEASING.md) for the
|
package/docs/ARCHITECTURE.md
CHANGED
|
@@ -259,7 +259,9 @@ object.
|
|
|
259
259
|
`publishableFindings` supplies the findings: CONFIRMED ones and verifier
|
|
260
260
|
additions for review and deep, REPORTED ones for a quick review. A saved
|
|
261
261
|
review without a verification field is trusted only when its profile is review
|
|
262
|
-
or deep.
|
|
262
|
+
or deep. `commentFindings` hands them to planning as a person adjusted them
|
|
263
|
+
after a preview (see below); without adjustments they are exactly the
|
|
264
|
+
publishable findings. Planning (model) uses pages of at most four findings plus report segments
|
|
263
265
|
(on a large PR each page carries the changed files and dispositions of its own
|
|
264
266
|
findings and references to the complete lists), with
|
|
265
267
|
CONTINUE checkpoints when a page needs more reading: at most three continuation
|
|
@@ -310,6 +312,29 @@ markers back (`VERIFIED`). Creation results are `POSTED`, `ALREADY_PRESENT`,
|
|
|
310
312
|
recorded thread whose comment someone deleted on the PR; it is not posted
|
|
311
313
|
again). Re-running publication is safe.
|
|
312
314
|
|
|
315
|
+
A person's adjustments (`/pr-comment <review-id> --exclude`, `--severity`,
|
|
316
|
+
`--reset`) are stored apart from the review, as `review.adjustments`; the
|
|
317
|
+
review record, its findings and its report never change. `commentFindings`
|
|
318
|
+
leaves excluded findings out and applies changed severities, so the existing
|
|
319
|
+
page checks decide titles and inline eligibility, and the planner input gains
|
|
320
|
+
an `adjustments` field only while some are active. Two states matter:
|
|
321
|
+
|
|
322
|
+
- **Active adjustments** shape planning and the summary index. Published text
|
|
323
|
+
must not name an excluded finding: the page checks repair or drop the
|
|
324
|
+
planner's own text, and `excludedReferences` checks the assembled preview,
|
|
325
|
+
including the summary rows rendered from the review's finding summaries,
|
|
326
|
+
and holds publication when one still names an excluded ID.
|
|
327
|
+
- **Ever adjusted** (also after `--reset`) keeps the stricter publication
|
|
328
|
+
rules. An adjustment is saved together with dropping the earlier preview
|
|
329
|
+
before anything else, and a failed save changes nothing; the new preview is
|
|
330
|
+
saved strictly as well and dropped when that fails. Such a review is posted
|
|
331
|
+
only from a preview planned after its latest adjustment, never planned and
|
|
332
|
+
posted in one `--publish`, and once its publication has started it is
|
|
333
|
+
neither adjusted nor planned again. Its publication compares the text of
|
|
334
|
+
items already on the PR (from the first thread list and from the read-back)
|
|
335
|
+
and names in the receipt those that keep their earlier text; nothing posted
|
|
336
|
+
is changed.
|
|
337
|
+
|
|
313
338
|
## Authorization and isolation
|
|
314
339
|
|
|
315
340
|
Private roles (`azpr-<mode>-functional|risk|verifier|dedupe|comment-plan`, and
|
package/docs/COMMENTING.md
CHANGED
|
@@ -227,6 +227,85 @@ Every page is validated item by item:
|
|
|
227
227
|
A low finding never becomes an inline comment, and the verified severity always
|
|
228
228
|
wins over the planner's label.
|
|
229
229
|
|
|
230
|
+
## Adjusting findings after a preview
|
|
231
|
+
|
|
232
|
+
After reading a preview, a person can leave findings out of publication or
|
|
233
|
+
change their severity, and plan the preview again:
|
|
234
|
+
|
|
235
|
+
```text
|
|
236
|
+
/pr-comment <review-id> --exclude F-1,R-2
|
|
237
|
+
/pr-comment <review-id> --severity F-3=low,Q-1001=medium
|
|
238
|
+
/pr-comment <review-id> --exclude F-1 --severity F-3=low
|
|
239
|
+
/pr-comment <review-id> --reset
|
|
240
|
+
/pr-comment [review-id] --show
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
- The review ID is required: every review has its own F-1. IDs are those of
|
|
244
|
+
the review report (`f1` reads as F-1). Only findings the review can publish
|
|
245
|
+
are accepted: confirmed and verifier-added ones of a review or deep review,
|
|
246
|
+
reported ones of a quick review. A merged duplicate names the finding it was
|
|
247
|
+
merged into; any other ID refuses the whole command and changes nothing.
|
|
248
|
+
- Each list is complete and replaces the saved one (`none` empties it): after
|
|
249
|
+
`--exclude F-1`, a later `--exclude F-2` excludes only F-2 and restores F-1,
|
|
250
|
+
so name both (`--exclude F-1,F-2`) to keep both out; the receipt lists what
|
|
251
|
+
was excluded and restored. The other list is kept, except that excluding a
|
|
252
|
+
finding drops its severity change and a severity for an excluded finding
|
|
253
|
+
restores it. A finding named in both lists is refused, and a severity equal
|
|
254
|
+
to the review's is no change. `--reset` clears both.
|
|
255
|
+
- A changed severity changes how a finding is published (its title, whether it
|
|
256
|
+
can get an inline comment, the summary counts); it does not verify the
|
|
257
|
+
finding again or change its evidence, trigger or impact. When the finding
|
|
258
|
+
itself is wrong, exclude it.
|
|
259
|
+
- Each change plans the preview again with a model. The planner receives the
|
|
260
|
+
adjusted findings (without the excluded ones, with the new severities) and an
|
|
261
|
+
`adjustments` field that states them; the summary index and its counts
|
|
262
|
+
follow them. A finding set to low stays in the summary only, and a raised one
|
|
263
|
+
becomes eligible for an inline comment (it still needs a location that can
|
|
264
|
+
carry one and no live thread that covers it). The other comments are written
|
|
265
|
+
again, so their wording may change: read the whole preview before
|
|
266
|
+
publishing. The review itself, its findings and its report are not changed.
|
|
267
|
+
- An excluded finding is never assigned to a page, so it gets no comment of its
|
|
268
|
+
own. Any published text that names the ID of an excluded finding (the body of
|
|
269
|
+
any inline comment, combined ones included, the summary note or
|
|
270
|
+
`summaryDetails`) gets a correction turn; after the last one the comment is
|
|
271
|
+
skipped (its finding stays in the summary index) and the note or details are
|
|
272
|
+
dropped. The assembled preview is checked as well: a summary row is the
|
|
273
|
+
review's own text for its finding, so when a kept finding's summary names an
|
|
274
|
+
excluded one, the preview says which row and publication is held until you
|
|
275
|
+
exclude that finding as well or restore the excluded one. A reference
|
|
276
|
+
without the ID cannot be detected; the preview shows it.
|
|
277
|
+
- Excluding every finding plans nothing and posts nothing: the result is
|
|
278
|
+
`NOTHING_TO_POST`, not the summary of a review without defects.
|
|
279
|
+
`--exclude none` brings the findings back.
|
|
280
|
+
- Adjustments are saved with the review, with the time of each change, survive
|
|
281
|
+
a restart and apply to a later `/pr-comment <review-id>` until `--reset`. The
|
|
282
|
+
preview and the receipt list them; nothing posted to the PR mentions them.
|
|
283
|
+
- A review that was adjusted, also one reset since, is posted only from a
|
|
284
|
+
preview planned after its latest adjustment: every adjustment discards the
|
|
285
|
+
earlier preview in the same save, and `--publish` never plans and posts such
|
|
286
|
+
a review in one step (for example after a failed new preview, or a restart
|
|
287
|
+
while it was planned). An adjustment that cannot be saved changes nothing and
|
|
288
|
+
the receipt says so; a new preview that cannot be saved is dropped and has
|
|
289
|
+
to be planned again.
|
|
290
|
+
- Once publication of an adjusted preview has started (an item was sent, may
|
|
291
|
+
have landed or was found on the PR), the review is neither adjusted nor
|
|
292
|
+
planned again: `--publish` retries the same preview and `--show` shows it;
|
|
293
|
+
run a new review to change what is posted.
|
|
294
|
+
- Adjustments shape only what a publication adds; AZPR never changes or
|
|
295
|
+
replaces a posted comment. An item the PR already has (the same marker, from
|
|
296
|
+
an earlier publication; inline markers follow the anchored lines, not the
|
|
297
|
+
commit) is skipped as for any review and keeps its earlier text. For an
|
|
298
|
+
adjusted review the receipt names those items whose text differs from the
|
|
299
|
+
preview (also when a comment appears only as publication reads the threads
|
|
300
|
+
back), marks the summary and the comments whose severity you changed, and
|
|
301
|
+
counts the other AZPR comments on the PR, where a finding you excluded may
|
|
302
|
+
still be visible; edit them on the PR if they should change.
|
|
303
|
+
- `--show` prints the saved preview, with its adjustments, without a model or
|
|
304
|
+
an Azure DevOps request.
|
|
305
|
+
|
|
306
|
+
Without these options `/pr-comment` works as before: the planner's input and
|
|
307
|
+
system prompt, the saved review and the receipts are unchanged.
|
|
308
|
+
|
|
230
309
|
## Publication
|
|
231
310
|
|
|
232
311
|
Publication is deterministic runtime code using the Azure DevOps REST API
|
package/docs/DEMO.md
CHANGED
|
@@ -1,6 +1,50 @@
|
|
|
1
1
|
# See a review before installing
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## Adjust findings before publishing
|
|
4
|
+
|
|
5
|
+

|
|
6
|
+
|
|
7
|
+
The 15-second teaser uses a **real OpenCode 2.1.4 session, real configured
|
|
8
|
+
model calls and real Azure DevOps publication** on the same dedicated test PR
|
|
9
|
+
as the earlier recording below: one `fulfillment.py` file with three
|
|
10
|
+
deliberately seeded regressions. It demonstrates the workflow; it is not a
|
|
11
|
+
benchmark of review accuracy or a promise about the time or cost of another PR.
|
|
12
|
+
|
|
13
|
+
Recorded on **2026-10-26**, on Ubuntu 22.04 under WSL2, using
|
|
14
|
+
`openai/gpt-6-luna` for the functional reviewer, risk reviewer, verifier and
|
|
15
|
+
comment planner. The installed plugin matched all 27 runtime and prompt files
|
|
16
|
+
in public Git commit [`dfba561`](https://github.com/WTLAIB/opencode-azure-devops-pr-review-v2/commit/dfba561840c0d61be6f8fc2e921507da8bbcbb11)
|
|
17
|
+
of the 0.3.0 release candidate. Model IDs identify the configured selection,
|
|
18
|
+
not an independently attested provider backend.
|
|
19
|
+
|
|
20
|
+
The recording follows one conversation:
|
|
21
|
+
|
|
22
|
+
1. `/pr-review <test-pr-url> --preview` completes the review in 66 seconds. The
|
|
23
|
+
verifier confirms three medium findings and merges two duplicate candidates.
|
|
24
|
+
The automatic preview, 14 seconds later, prepares a summary and three inline
|
|
25
|
+
comments; nothing is posted.
|
|
26
|
+
2. `/pr-comment 63f7d3d6 --exclude F-3 --severity F-2=low` plans a new preview
|
|
27
|
+
in 8 seconds. F-3 is left out, F-2 is listed as low in the summary with no
|
|
28
|
+
inline comment, and the preview names both adjustments.
|
|
29
|
+
3. `/pr-comment 63f7d3d6 --publish` posts the summary and the F-1 comment; both
|
|
30
|
+
are read back from Azure DevOps as `VERIFIED`.
|
|
31
|
+
4. Repeating the command reports `ALREADY_PRESENT=2`; nothing is posted twice.
|
|
32
|
+
The two demonstration comments are retained on the test PR.
|
|
33
|
+
|
|
34
|
+

|
|
35
|
+
|
|
36
|
+

|
|
37
|
+
|
|
38
|
+
These are faithful rendered frames from one terminal capture, **not Azure
|
|
39
|
+
DevOps browser screenshots**. Commands were submitted through OpenCode's native
|
|
40
|
+
command API to the session shown in the attached TUI, so they appear as AZPR
|
|
41
|
+
notices and segment captions rather than as typed input. The TUI sidebar was
|
|
42
|
+
hidden before the segments shown, and the bottom seven rows (the empty input
|
|
43
|
+
box with the conversation's chat model, and the status/path bar) are cropped.
|
|
44
|
+
Segments that showed the local debug directory were left out. The original
|
|
45
|
+
private cast is unchanged.
|
|
46
|
+
|
|
47
|
+
## Earlier recording: review, preview and publication
|
|
4
48
|
|
|
5
49
|
[Watch the 73-second walkthrough (MP4)](https://github.com/WTLAIB/opencode-azure-devops-pr-review-v2/releases/download/v0.2.0/azpr-live-demo.mp4)
|
|
6
50
|
|
package/docs/QUICKSTART.md
CHANGED
|
@@ -24,15 +24,15 @@ Check the host version:
|
|
|
24
24
|
opencode --version
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
-
## 2. Install v0.
|
|
27
|
+
## 2. Install v0.3.0
|
|
28
28
|
|
|
29
|
-
Already using an earlier version? Follow the [upgrade instructions](releases/v0.
|
|
29
|
+
Already using an earlier version? Follow the [upgrade instructions](releases/v0.3.0.md#upgrading)
|
|
30
30
|
to preserve your current configuration and use one AZPR installation.
|
|
31
31
|
|
|
32
32
|
In your terminal:
|
|
33
33
|
|
|
34
34
|
```sh
|
|
35
|
-
opencode plugin add opencode-azure-devops-pr-review@0.
|
|
35
|
+
opencode plugin add opencode-azure-devops-pr-review@0.3.0
|
|
36
36
|
```
|
|
37
37
|
|
|
38
38
|
Restart OpenCode and open an ordinary conversation. This is the host's native
|
|
@@ -40,7 +40,7 @@ package installation; no npm account or separate build is needed. The
|
|
|
40
40
|
plugin exposes `/pr-setup` even before its review configuration exists.
|
|
41
41
|
|
|
42
42
|
To install the same release from Git instead of the npm registry, use
|
|
43
|
-
`opencode plugin add 'github:WTLAIB/opencode-azure-devops-pr-review-v2#v0.
|
|
43
|
+
`opencode plugin add 'github:WTLAIB/opencode-azure-devops-pr-review-v2#v0.3.0'`.
|
|
44
44
|
Add only one of the two.
|
|
45
45
|
|
|
46
46
|
For an existing source installation, keep using `install.sh --replace`, or
|
|
@@ -48,7 +48,7 @@ follow the migration notes in [installation](../README.md#native-package-npm-or-
|
|
|
48
48
|
Do not load both copies in the same OpenCode profile.
|
|
49
49
|
|
|
50
50
|
Prefer a source archive? Download and extract the
|
|
51
|
-
[v0.
|
|
51
|
+
[v0.3.0 archive](https://github.com/WTLAIB/opencode-azure-devops-pr-review-v2/archive/refs/tags/v0.3.0.tar.gz),
|
|
52
52
|
then run `sh install.sh --config-dir /absolute/path/to/your/opencode-config`
|
|
53
53
|
inside it. That directory must be the one your OpenCode actually loads. The
|
|
54
54
|
source installer creates starter settings; add `--replace` to the setup
|
|
@@ -171,6 +171,26 @@ and cost. Refreshing a preview with `/pr-comment <review-id>` runs planning
|
|
|
171
171
|
again. Use the displayed `/pr-stop <run-id>` to cancel an active command; no
|
|
172
172
|
cost cap is configured by default.
|
|
173
173
|
|
|
174
|
+
## Optional: adjust findings before publishing
|
|
175
|
+
|
|
176
|
+
Use finding IDs from your report to leave findings out or change their severity:
|
|
177
|
+
|
|
178
|
+
```text
|
|
179
|
+
/pr-comment 1a2b3c4d --exclude F-1 --severity F-2=low
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
In this example, F-1 is excluded from the new preview; F-2 appears as low in the
|
|
183
|
+
summary, with no new inline comment. The original review is preserved. A changed
|
|
184
|
+
severity does not verify the finding again; exclude a finding when it is wrong.
|
|
185
|
+
|
|
186
|
+
AZPR uses a model to plan the comments again without rerunning the review, so
|
|
187
|
+
read the whole new preview. Each option replaces its own saved list:
|
|
188
|
+
`--exclude F-1` followed by `--exclude F-2` excludes only F-2; use
|
|
189
|
+
`--exclude F-1,F-2` to keep both out. `--reset` clears both adjustment lists
|
|
190
|
+
and plans again; `--show` displays the saved preview without a model or Azure
|
|
191
|
+
request. See [adjusting findings](COMMENTING.md#adjusting-findings-after-a-preview)
|
|
192
|
+
for the full rules.
|
|
193
|
+
|
|
174
194
|
## Optional: publish after inspecting the preview
|
|
175
195
|
|
|
176
196
|
```text
|
|
@@ -180,8 +200,14 @@ cost cap is configured by default.
|
|
|
180
200
|
This explicit command posts the saved preview through your PAT after checking
|
|
181
201
|
the PR is active and its source commit is unchanged. Existing markers are
|
|
182
202
|
skipped. Check the publication receipt for failures or incomplete read-back.
|
|
183
|
-
|
|
184
|
-
|
|
203
|
+
An adjusted review needs a saved preview planned after its latest adjustment,
|
|
204
|
+
also after `--reset`; `--publish` refuses if that preview is missing. Once
|
|
205
|
+
publication starts, its adjustments and preview are fixed, and `--publish`
|
|
206
|
+
retries the saved content. Earlier comments on the PR are never edited; the
|
|
207
|
+
receipt names those whose text differs from an adjusted preview.
|
|
208
|
+
|
|
209
|
+
For a review that has never been adjusted, `--publish` plans first if no preview
|
|
210
|
+
exists; use `/pr-comment <review-id>` to prepare and inspect a preview first. See
|
|
185
211
|
[automatic comments](COMMENTING.md#automatic-comments-after-a-review) for
|
|
186
212
|
`afterReview` and the flags that override it for one review.
|
|
187
213
|
|
package/docs/ROADMAP.md
CHANGED
|
@@ -6,6 +6,14 @@ with; [validation history](VALIDATION_HISTORY.md) keeps earlier results.
|
|
|
6
6
|
|
|
7
7
|
## Implemented (stability revision)
|
|
8
8
|
|
|
9
|
+
- **Adjust findings before publishing.** After reading a preview, use
|
|
10
|
+
`/pr-comment <review-id> --exclude` or `--severity` to choose which findings
|
|
11
|
+
to publish and at what severity. The model plans a new preview while the
|
|
12
|
+
original review stays intact. Each list replaces the saved one; `--reset`
|
|
13
|
+
clears both, and `--show` displays the saved preview without a model or Azure
|
|
14
|
+
request. Adjusted reviews require a saved preview and cannot be adjusted or
|
|
15
|
+
planned again once publication starts. Earlier PR comments keep their text;
|
|
16
|
+
the receipt reports differences. See [commenting](COMMENTING.md#adjusting-findings-after-a-preview).
|
|
9
17
|
- **Optional automatic comments.** `afterReview` selects `none` (default),
|
|
10
18
|
`preview` or `publish` for each mode; a flag after the PR URL overrides it
|
|
11
19
|
for one review. A COMPLETE review hands off to a separate, cancellable
|