opencode-azure-devops-pr-review 0.3.7 → 0.4.1

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 CHANGED
@@ -1,5 +1,142 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.4.1 — 2026-11-16
4
+
5
+ AZPR is tested with OpenCode 2.3.0 instead of 2.2.4, and two things that went
6
+ wrong on 2.3.0 are fixed. The same release also passed its host fixtures on
7
+ OpenCode 2.2.4, where `/pr-check` shows the OpenCode WARNING row. The
8
+ reviewer and verifier instructions are those of 0.4.0, and no setting is new.
9
+
10
+ OpenCode 2.3.0:
11
+
12
+ - A review no longer wakes your conversation's own model. OpenCode 2.3.0
13
+ hands every answer of a child session to its parent and lets the parent's
14
+ model respond to it. AZPR's private sessions were children of the
15
+ conversation, so on 2.3.0 that model, with its edit and shell tools,
16
+ received the reviewers' raw output and AZPR's notices and answered each
17
+ one: 7 of the 12 model requests of a 2-file review in the test fixture.
18
+ Private sessions are now sessions of their own, created where the
19
+ conversation is. What the reviewers, the verifier and the comment planner
20
+ are sent did not change.
21
+ - A model stream that breaks off mid-answer no longer fails the stage.
22
+ OpenCode 2.3.0 retries the interrupted step by itself instead of asking the
23
+ model to continue. AZPR did not recognise that and ran the stage again in a
24
+ new session, and a second interruption failed it. It now takes the retried
25
+ step's answer; the receipt counts such steps as `step-retries`.
26
+ - The inactivity watchdog, the retry of a provider 503, the refused background
27
+ summary and the context-overflow split work on 2.3.0 as before.
28
+
29
+ Private sessions in the session list:
30
+
31
+ - OpenCode lists a session without a parent like a conversation, so AZPR's
32
+ private sessions now appear next to your conversations, titled
33
+ `[AZPR <id>] …`; a plugin cannot archive them. When a review ends, AZPR
34
+ therefore deletes its sessions at once, except the one that holds the report
35
+ or draft, which the receipt names. A comment run keeps none: its receipt
36
+ carries the preview or the publication result. Until now a completed review
37
+ kept all of its sessions until it was evicted. The kept session is deleted
38
+ with its review, as before (the newest 20 are kept).
39
+ - A review's receipt says how many sessions were deleted (`Session notice`).
40
+ - While `debug.enabled` is on, every session is still kept until the review
41
+ is evicted, so each review adds all of its sessions to the list. Turn debug
42
+ off for everyday use; `deletePrivateSessions: false` keeps everything too.
43
+ - A review that an OpenCode restart interrupts leaves its sessions in the
44
+ list: AZPR had not recorded them yet. Delete those yourself.
45
+ - A session whose deletion failed or timed out stays on record: it is
46
+ deleted with its review, or, when no review keeps it, tried again after
47
+ every later run and closed to AZPR commands meanwhile. Such a session used
48
+ to be forgotten. A command typed in a session that is being deleted is
49
+ refused. A session OpenCode creates only after its stage was cancelled is
50
+ deleted when it arrives.
51
+ - A new review cannot be started from a saved review's own session, also after
52
+ an OpenCode restart; until now only the running process refused that.
53
+ - Each private session carries `metadata.azpr` with its run, role and
54
+ conversation (and, for a comment run, the review), so tools that list
55
+ sessions can tell AZPR's sessions from conversations without reading titles.
56
+
57
+ Tools:
58
+
59
+ - A reviewer's tool call that OpenCode stops ends at once instead of when its
60
+ Azure DevOps request returns. The request only that call waits for (a folder
61
+ listing of one level, the PR's threads) is aborted; a file, a recursive
62
+ listing or the repository archive, which the run's other sessions may be
63
+ waiting for too, is still read to the end and kept for them.
64
+
65
+ Documentation:
66
+
67
+ - A model entry that lets the provider choose the model for each session,
68
+ such as GitHub Copilot's Auto in OpenCode 2.2.7 and later, cannot be an AZPR
69
+ model: AZPR refuses a request on another model than the configured one, and
70
+ `/pr-check` does not detect such an entry.
71
+ - While a provider's host cannot be reached, OpenCode 2.3.0 retries the
72
+ request for up to an hour. AZPR allows those retries, so a review waits
73
+ instead of failing; `/pr-stop` ends it.
74
+
75
+ ## 0.4.0 — 2026-11-14
76
+
77
+ Two defaults change. They apply where a settings file does not name the
78
+ setting, as in the file `/pr-setup` writes; a file that names it, as one
79
+ installed with `install.sh` does, keeps its values.
80
+
81
+ - A comment preview now follows every COMPLETE review: `afterReview` is
82
+ `preview` for each mode (it was `none`). The preview is planned with a model
83
+ and posts nothing. Add `--no-comment` after the PR URL for a review without
84
+ one, or set `afterReview` to `none`. Publication is still never a default.
85
+ - `workflow.parallelSessions` is 8 (was 4) and `azure.concurrency` is 6 (was
86
+ 3). They matter for a PR of more than one shard. Lower `parallelSessions`
87
+ when your provider limits the request rate, or with OpenCode's claude-agent
88
+ provider on a machine with little memory.
89
+
90
+ Commands:
91
+
92
+ - No `/pr-comment` command needs a review ID any more: `--exclude`,
93
+ `--severity` and `--reset` act on the conversation's current review, as
94
+ `--publish` and `--show` already did. The current review is the one that was
95
+ completed or used there last, so naming a review by its ID once makes it the
96
+ current one; in one of a review's own sessions it is that review.
97
+ - The start notice and the receipt of every comment run name the review and
98
+ its PR, for example `Acted on review 1a2b3c4d (/pr-review) of PR #123 in
99
+ project/repository`.
100
+ - A preview's receipt ends with the commands for the next step, without the
101
+ review ID and with that review's finding IDs. Each adjustment list replaces
102
+ the saved one, so an example keeps the adjustments already saved.
103
+ - New `/pr-comment --list`: the reviews saved for the conversation, with their
104
+ IDs, PRs and state. No model or Azure DevOps request.
105
+ - Every command answers `--help` (or `-h`) with its usage and examples,
106
+ without a model or Azure DevOps request.
107
+ - Command descriptions start with what the command is for and point to
108
+ `--help`: OpenCode's command list shows one line of a description and cuts
109
+ what does not fit.
110
+ - A review's receipt lists the comment commands without the ID first and keeps
111
+ the ID form for acting on that review later.
112
+
113
+ Reports:
114
+
115
+ - A review that ran without content search says so. When the repository
116
+ archive is larger than `azure.archiveMegabytes` allows, or is one AZPR cannot
117
+ read (ZIP64, encrypted, damaged), `azpr_search_code` answers that search is
118
+ unavailable; until now only the models saw that. The report's limitations
119
+ and the receipt (`Content search notice`) state that sessions could find and
120
+ read files but not search their contents, and name the setting's value where
121
+ a larger one would help. The debug record's `result.json` lists the reasons
122
+ under `searchUnavailable`.
123
+ - A verifier that confirms a finding whose suggestion is only a placeholder
124
+ ("N/A", "No correction needed.") is asked in the same session to state the
125
+ correction or to reject the finding. Left as it is after the correction
126
+ turns, the finding is NEEDS_INFO: it stays in the report and gets no comment.
127
+
128
+ Documentation:
129
+
130
+ - The README's examples show several finding IDs in one list
131
+ (`--exclude F-1,R-2`), and the `afterReview` row of the settings table has
132
+ one value per line.
133
+ - The roadmap no longer lists three changes as planned that the work on 0.3.7
134
+ examined and dropped, and says why. The README states what a smaller model
135
+ in `models.review` costs in issues found.
136
+ - The instructions for reviewers and verifiers are unchanged, and an
137
+ installation has the same set of files as 0.3.7. See
138
+ [validation](docs/VALIDATION.md#040-release-candidate-acceptance-2026-11-14).
139
+
3
140
  ## 0.3.7 — 2026-11-12
4
141
 
5
142
  - A change that breaks something that worked before is at least medium: an
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  [![CI](https://github.com/WTLAIB/opencode-azure-devops-pr-review-v2/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/WTLAIB/opencode-azure-devops-pr-review-v2/actions/workflows/ci.yml?query=branch%3Amain)
4
4
  [![npm](https://img.shields.io/npm/v/opencode-azure-devops-pr-review)](https://www.npmjs.com/package/opencode-azure-devops-pr-review)
5
5
  [![License: MIT](https://img.shields.io/badge/license-MIT-blue)](LICENSE)
6
- [![Tested with OpenCode 2.2.4](https://img.shields.io/badge/OpenCode-2.2.4%20tested-blue)](docs/VALIDATION.md)
6
+ [![Tested with OpenCode 2.3.0](https://img.shields.io/badge/OpenCode-2.3.0%20tested-blue)](docs/VALIDATION.md)
7
7
 
8
8
  **Review Azure DevOps pull requests from a URL. No checkout required.**
9
9
 
@@ -52,46 +52,57 @@ is an actual capture excerpt with identifying UI removed and its text unchanged.
52
52
  [company networks](docs/ENTERPRISE.md#company-networks) first):
53
53
 
54
54
  ```sh
55
- opencode plugin add opencode-azure-devops-pr-review@0.3.7
55
+ opencode plugin add opencode-azure-devops-pr-review@0.4.1
56
56
  ```
57
57
 
58
58
  2. Follow the [quickstart](docs/QUICKSTART.md) to save your PAT in a private
59
59
  file and run `/pr-setup` with your organization and one model. Restart the
60
60
  OpenCode service (`opencode service restart`) to load the settings.
61
- 3. In one OpenCode conversation, check access, then review and preview:
61
+ 3. In one OpenCode conversation, check access, then review:
62
62
 
63
63
  ```text
64
64
  /pr-check https://dev.azure.com/YOUR_ORG/YOUR_PROJECT/_git/YOUR_REPO/pullrequest/123
65
- /pr-review https://dev.azure.com/YOUR_ORG/YOUR_PROJECT/_git/YOUR_REPO/pullrequest/123 --preview
65
+ /pr-review https://dev.azure.com/YOUR_ORG/YOUR_PROJECT/_git/YOUR_REPO/pullrequest/123
66
66
  ```
67
67
 
68
68
  Replace the sample URL with your PR. Wait for `/pr-check` to report `READY`
69
69
  before starting the review; it uses no model. The review runs functional and risk
70
70
  reviewers, then separate verification. If the completed review has findings to
71
- comment on, `--preview` prepares their comments in a separate, cancellable run.
72
- **Nothing is posted by these commands.** Previewing comments also uses a model.
73
- For a lighter first pass, use `/pr-quick <PR URL> --preview`; its findings are
74
- not independently verified.
71
+ comment on, a **comment preview** follows in a separate, cancellable run and
72
+ shows the comments as they would be posted. **Nothing is posted by these
73
+ commands** unless you set `afterReview` to `publish`. Previewing comments also
74
+ uses a model; add `--no-comment` after the URL for a review without a preview.
75
+ For a lighter first pass, use `/pr-quick <PR URL>`; its findings are not
76
+ independently verified. Every command answers `--help` with its options,
77
+ without a model.
75
78
 
76
79
  <details>
77
80
  <summary>Optional: adjust findings and publish after reading the preview</summary>
78
81
 
79
- Read the report and preview. Before publishing, you can exclude a finding or
80
- change its severity using IDs from your report, for example:
82
+ Read the preview; it ends with the commands for the next step. Before
83
+ publishing, you can leave findings out or change their severity, using the
84
+ finding IDs the preview and the report show:
81
85
 
82
86
  ```text
83
- /pr-comment REVIEW_ID_FROM_RECEIPT --exclude F-1 --severity F-2=low
87
+ /pr-comment --exclude F-1,R-2 leave two findings out
88
+ /pr-comment --severity F-3=low,R-4=medium change two severities
89
+ /pr-comment --exclude F-1,R-2 --severity F-3=low both in one command
84
90
  ```
85
91
 
86
- F-1 is excluded from the new preview; F-2 appears as low in the summary, with no
87
- new inline comment. Adjusting runs comment planning again with a model. Read the
88
- whole new preview, then publish from the same conversation:
92
+ With the last line, F-1 and R-2 are excluded from the new preview and F-3
93
+ appears as low in the summary, with no inline comment. Adjusting runs comment
94
+ planning again with a model. Read the whole new preview, then publish from the
95
+ same conversation:
89
96
 
90
97
  ```text
91
- /pr-comment REVIEW_ID_FROM_RECEIPT --publish
98
+ /pr-comment --publish
92
99
  ```
93
100
 
94
- Use the review ID from the completed receipt. The command posts the saved
101
+ None of these commands needs a review ID: they act on the conversation's
102
+ current review, the one completed or used there last, and each receipt names
103
+ that review and its PR. To act on an older review, put its ID first
104
+ (`/pr-comment 1a2b3c4d --publish`); `/pr-comment --list` shows the saved
105
+ reviews. The command posts the saved
95
106
  preview as the PAT owner and skips matching comments AZPR already posted. It
96
107
  never edits them; for an adjusted review, the receipt identifies those whose
97
108
  text differs from the new preview. See
@@ -184,6 +195,12 @@ and reasoning effort** on the same 50 PRs:
184
195
  - **Why not higher or lower?** `high` scored about the same at a higher cost,
185
196
  `xhigh` added more marginal findings, and `low` missed more issues, including
186
197
  High-severity ones.
198
+ - **`/pr-review` depends on its models in the same way.** In that comparison
199
+ `/pr-review` with GPT-6 Luna at its default effort posted 91 comments and
200
+ matched 27.8% of the expected issues; the recommended deep setup posted 323
201
+ and matched 65.2% (one run each, scored by our local judge). A smaller model
202
+ in `models.review` trades issues found for cost and time, so run `/pr-deep`,
203
+ or set stronger review models, where a missed defect costs more.
187
204
 
188
205
  The full method, the comparison of all 12 combinations and the limits are in
189
206
  the [validation record](docs/VALIDATION.md#martian-code-review-bench-2026-11-05-and-06).
@@ -284,11 +301,11 @@ models and runs.
284
301
 
285
302
  | Component | Tested target |
286
303
  | --- | --- |
287
- | OpenCode | **OpenCode CLI 2.2.4** (`@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. |
304
+ | OpenCode | **OpenCode CLI 2.3.0** (`@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. |
288
305
  | Operating system | **Ubuntu 22.04** (validation environment: WSL2). Other operating systems are not yet validated. |
289
306
  | Azure | **Azure DevOps Services**, REST API **7.1**. Azure DevOps Server is not supported by the current URL handling. |
290
307
  | 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. |
291
- | Models | Your OpenCode provider/model IDs with tool support. Each mode checks the models it uses. |
308
+ | Models | Your OpenCode provider/model IDs with tool support. Each mode checks the models it uses. Name a concrete model, not one that routes each session to another model (see [configuration](#configuration)). |
292
309
 
293
310
  The npm package, the Git package and the release source archive contain the
294
311
  same runtime. A fresh installation exposes `/pr-setup` before
@@ -339,8 +356,9 @@ for both quick and verified reviews.
339
356
  6. `/pr-comment` plans a preview with a model. With `--publish`, the runtime
340
357
  posts the saved text itself, skipping comments that already exist and
341
358
  reading every created comment back from Azure DevOps. Re-running a publish
342
- is safe. `afterReview` or a flag after the PR URL can start this step after
343
- a COMPLETE review ([automatic comments](#automatic-comments)).
359
+ is safe. A COMPLETE review is followed by a preview unless `afterReview` or
360
+ a flag after the PR URL says otherwise
361
+ ([automatic comments](#automatic-comments)).
344
362
 
345
363
  `/pr-quick` is the lighter alternative for small or routine PRs: one reviewer
346
364
  per shard covers both the functional and the risk focus and checks its own
@@ -382,17 +400,17 @@ Azure DevOps REST API with the runtime's built-in `fetch`.
382
400
  Install the npm package with OpenCode's plugin manager:
383
401
 
384
402
  ```sh
385
- opencode plugin add opencode-azure-devops-pr-review@0.3.7
403
+ opencode plugin add opencode-azure-devops-pr-review@0.4.1
386
404
  ```
387
405
 
388
406
  The same release is also a versioned Git package, which needs Git but not the
389
407
  npm registry:
390
408
 
391
409
  ```sh
392
- opencode plugin add 'github:WTLAIB/opencode-azure-devops-pr-review-v2#v0.3.7'
410
+ opencode plugin add 'github:WTLAIB/opencode-azure-devops-pr-review-v2#v0.4.1'
393
411
  ```
394
412
 
395
- Add only one of them. OpenCode 2.2.4 loads the plugin into a running OpenCode
413
+ Add only one of them. OpenCode 2.3.0 loads the plugin into a running OpenCode
396
414
  service within a few seconds; if `/pr-setup` does not appear in a new
397
415
  conversation, run `opencode service restart`. Then run `/pr-setup` for setup
398
416
  instructions. Native packages
@@ -403,7 +421,7 @@ To select another configuration file, use an absolute path in the host config:
403
421
  ```json
404
422
  {
405
423
  "plugins": [{
406
- "package": "opencode-azure-devops-pr-review@0.3.7",
424
+ "package": "opencode-azure-devops-pr-review@0.4.1",
407
425
  "options": { "settingsFile": "/absolute/path/to/azpr/settings.json" }
408
426
  }]
409
427
  }
@@ -422,13 +440,13 @@ with a new version adds a second entry**: OpenCode keeps running the version
422
440
  listed first and reports the new one as `Duplicate plugin ID: azpr` (from
423
441
  0.3.1, `/pr-check` also warns about it). Upgrade when no AZPR command is
424
442
  running, since
425
- OpenCode 2.2.4 replaces the running plugin as soon as its entry changes.
443
+ OpenCode 2.3.0 replaces the running plugin as soon as its entry changes.
426
444
 
427
445
  For an entry that `opencode plugin add` created, add the new version and,
428
446
  only when that succeeds, remove the previous one:
429
447
 
430
448
  ```sh
431
- opencode plugin add opencode-azure-devops-pr-review@0.3.7 &&
449
+ opencode plugin add opencode-azure-devops-pr-review@0.4.1 &&
432
450
  opencode plugin remove opencode-azure-devops-pr-review@PREVIOUS_VERSION
433
451
  ```
434
452
 
@@ -451,9 +469,11 @@ configuration needs no new `/pr-setup`. `opencode plugin list` should then
451
469
  show a single `azpr` row with the new version (from 0.3.1, `/pr-check` names
452
470
  it too); if it still shows the previous one, run `opencode service restart`.
453
471
  Exact versions stay pinned, so `opencode plugin update` leaves them unchanged.
454
- See the [0.3.7 release notes](docs/releases/v0.3.7.md) for what changed and the
455
- [0.2.0 release notes](docs/releases/v0.2.0.md) for automatic comments, which
456
- remain disabled unless you configure `afterReview` or request them with a
472
+ See the [0.4.1 release notes](docs/releases/v0.4.1.md) for what changed, the
473
+ [0.4.0 release notes](docs/releases/v0.4.0.md) for commands without review IDs and the
474
+ [0.2.0 release notes](docs/releases/v0.2.0.md) for automatic comments. A
475
+ preview follows each COMPLETE review unless `afterReview` says otherwise;
476
+ automatic publication stays off unless you configure it or request it with a
457
477
  review command flag.
458
478
 
459
479
  ### Source archive or checkout
@@ -461,8 +481,8 @@ review command flag.
461
481
  <details>
462
482
  <summary>Source installation and replacement</summary>
463
483
 
464
- Download the [v0.3.7 source archive](https://github.com/WTLAIB/opencode-azure-devops-pr-review-v2/archive/refs/tags/v0.3.7.tar.gz)
465
- and extract it, or check out tag `v0.3.7`. The installer needs POSIX `sh` and
484
+ Download the [v0.4.1 source archive](https://github.com/WTLAIB/opencode-azure-devops-pr-review-v2/archive/refs/tags/v0.4.1.tar.gz)
485
+ and extract it, or check out tag `v0.4.1`. The installer needs POSIX `sh` and
466
486
  Python 3's standard library. From that source directory:
467
487
 
468
488
  ```sh
@@ -591,6 +611,13 @@ never blocks `/pr-review`. Comment planning uses the review's risk model
591
611
  turns on the severity rating. Left out or empty, no rating runs and the
592
612
  verifier's severity is final.
593
613
 
614
+ Name the model that should do the work. AZPR binds every private session to
615
+ the exact model in its settings and refuses a request that OpenCode sends on
616
+ another one, so an entry that lets the provider pick the model for each
617
+ session, such as GitHub Copilot's **Auto** (OpenCode 2.2.7 and later), cannot
618
+ be an AZPR model: its sessions fail with `Model mismatch`. `/pr-check` finds
619
+ such an entry in the model catalog and does not detect this.
620
+
594
621
  | Role | Focus and useful model capabilities |
595
622
  | --- | --- |
596
623
  | `functional` | Requirements, boundaries, state changes, API compatibility and regressions. Strong code comprehension in the project's language. |
@@ -656,22 +683,22 @@ copies that different reviewers get can each produce a finding.
656
683
  | `runTimeoutSeconds` | `null` (no whole-command timer); an integer 10–7200 enables one. |
657
684
  | `shell` | `deny`: private reviewers cannot run shell commands (the tool is hidden). `ask`: each command needs your approval in OpenCode. `inherit`: host permissions decide. |
658
685
  | `progressNotices` | `true`: short PROGRESS notices in the invoking conversation. |
659
- | `deletePrivateSessions` | `true`: AZPR deletes its private reviewer sessions once they are no longer needed (see [retention](#retention-and-privacy)); `false` keeps every session. |
660
- | `afterReview.quick` / `.review` / `.deep` | `none` each: nothing follows a review; run `/pr-comment` yourself. `preview` plans a comment preview after a COMPLETE review of that mode (a model runs; nothing is posted); `publish` plans and posts it as the PAT owner; a comment that a safeguard holds back waits for a person. A flag after the PR URL overrides it for one run. See [automatic comments](#automatic-comments). |
686
+ | `deletePrivateSessions` | `true`: when a command ends, AZPR deletes its private reviewer sessions except the one that holds the review's report (see [retention](#retention-and-privacy)); `false` keeps every session. |
687
+ | `afterReview.quick` / `.review` / `.deep` | What follows a COMPLETE review of that mode; `preview` each.<br>`preview`: plan a comment preview (a model runs; nothing is posted).<br>`none`: nothing follows; run `/pr-comment` yourself.<br>`publish`: plan the comments and post them as the PAT owner; a comment that a safeguard holds back waits for a person.<br>A flag after the PR URL (`--preview`, `--publish`, `--no-comment`) overrides it for one run. See [automatic comments](#automatic-comments). |
661
688
  | `azure.organization` | Required. The `<org>` of `https://dev.azure.com/<org>`; PR URLs of other organizations are refused. |
662
689
  | `azure.pat` | A personal access token for that organization with **Code (Read)** and **Pull Request Threads (Read & write)**, or `""` when `azure.patFile` is set. Sent only to `https://dev.azure.com/<org>` and never logged. |
663
690
  | `azure.patFile` | `""`. Recommended: the absolute path of a file that holds only the PAT, so `settings.json` holds no secret. It must be a regular file you own that only you can access (mode 600, not a symbolic link). AZPR reads it at start and before each command; after replacing it, restart the OpenCode service. Set either this or `azure.pat`. |
664
- | `azure.concurrency` | `3` simultaneous Azure DevOps calls across all AZPR commands. |
691
+ | `azure.concurrency` | `6` (1–8) simultaneous Azure DevOps calls across all AZPR commands. |
665
692
  | `azure.callTimeoutSeconds` | `120`; a hung call is aborted and its slot released (reads are retried). |
666
- | `azure.archiveMegabytes` | `100` (1–1024): the largest repository zip that content search downloads per run and commit; a larger repository is not searched. It is held in memory during a review. |
693
+ | `azure.archiveMegabytes` | `100` (1–1024): the largest repository zip that content search downloads per run and commit; a larger repository is not searched, and the review's report and receipt say so. It is held in memory during a review. |
667
694
  | `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). |
668
695
  | `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. |
669
696
  | `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. |
670
697
  | `workflow.shardFiles` | `25` changed files per initial-review session. |
671
698
  | `workflow.shardFindings` | At most `15` findings per verification session; one file's findings stay in the same session (a file is split only when it alone has more). |
672
- | `workflow.parallelSessions` | `4` reviewer sessions at once within a command; comment planning runs at most two pages at once (one when this is `1`). |
699
+ | `workflow.parallelSessions` | `8` (1–16) reviewer sessions at once within a command; it matters only for a PR of more than one shard. Lower it, to `4` for example, when the provider limits your request rate, or with OpenCode's claude-agent provider on a machine with little memory: each of its sessions keeps a process of about 200 MB for minutes after it ends. Comment planning runs at most two pages at once (one when this is `1`). |
673
700
  | `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. |
674
- | `workflow.stageRetries` | `1` new-session retry after a transient failure (provider 429/5xx, interrupted stream) or an inactivity stop. 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. |
701
+ | `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. |
675
702
  | `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. |
676
703
  | `debug.enabled` / `debug.directory` / `debug.keepRuns` | `false` / `""` / `20` run directories kept (`0` keeps all); see [debugging](docs/DEBUGGING.md). |
677
704
 
@@ -731,10 +758,19 @@ troubleshooting.
731
758
  | `/pr-deep <PR URL> [flag] [context]` | The same review with the stronger models of `models.deep`; usually slower and costlier. |
732
759
  | `/pr-quick <PR URL> [flag] [context]` | One reviewer per shard for both focuses, no verification; findings are reported, not verified. |
733
760
  | `/pr-stop [run-id]` | Cancel this conversation's active command. |
734
- | `/pr-comment [review-id]` | Preview comments for this conversation's latest completed review. |
761
+ | `/pr-comment [review-id]` | Preview comments for this conversation's current review. |
735
762
  | `/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. |
736
763
  | `/pr-comment [review-id] --show` | Show the saved preview again; no model or Azure DevOps request. |
737
- | `/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)). |
764
+ | `/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,R-2` (see [adjusting findings](docs/COMMENTING.md#adjusting-findings-after-a-preview)). |
765
+ | `/pr-comment --list` | The reviews saved for this conversation, with their IDs, PRs and state; no model or Azure DevOps request. |
766
+ | `/<command> --help` | The command's usage and examples; no model or Azure DevOps request. |
767
+
768
+ A `/pr-comment` command without a review ID acts on the conversation's
769
+ **current review**: the one completed or used there last (in one of a review's
770
+ own sessions, that review). Its STARTED notice and receipt name the review and
771
+ its PR, and a preview ends with the commands for the next step. OpenCode's
772
+ command list shows one line per command and cuts what does not fit, so the
773
+ options are in `--help`.
738
774
 
739
775
  Supported PR URLs are `https://dev.azure.com/<org>/<project>/_git/<repo>/pullrequest/<id>`
740
776
  and `https://<org>.visualstudio.com/[DefaultCollection/]<project>/_git/<repo>/pullrequest/<id>`.
@@ -796,13 +832,22 @@ them into one comment under fixed rules (see [commenting](docs/COMMENTING.md)).
796
832
 
797
833
  ### Adjusting findings after a preview
798
834
 
799
- When a preview contains a finding you disagree with, leave it out or change
800
- its severity, then read the new preview:
835
+ When a preview contains findings you disagree with, leave them out or change
836
+ their severity, then read the new preview. Several IDs go in one list,
837
+ separated by commas:
801
838
 
802
839
  ```text
803
- /pr-comment <review-id> --exclude F-1 --severity F-2=low
840
+ /pr-comment --exclude F-1,R-2 leave F-1 and R-2 out
841
+ /pr-comment --severity F-3=low,R-4=medium publish F-3 as low and R-4 as medium
842
+ /pr-comment --exclude F-1,R-2 --severity F-3=low both in one command
843
+ /pr-comment --exclude none put every finding back
844
+ /pr-comment --reset undo every adjustment
804
845
  ```
805
846
 
847
+ The commands act on the conversation's current review; put a review ID first
848
+ to adjust another one (`/pr-comment 1a2b3c4d --exclude F-1`). The finding IDs
849
+ are those of the report and the preview, and `f1` reads as F-1.
850
+
806
851
  Changed adjustments trigger new model planning when findings remain, so
807
852
  combine both options in one command when you use both. Repeating the saved
808
853
  adjustments changes nothing and does not plan again. Comments are planned
@@ -812,7 +857,7 @@ adjustment. Each option replaces its whole saved list: `--exclude F-1` and then
812
857
  `--exclude F-2` excludes only F-2. A changed severity changes how a finding is
813
858
  published, not the finding itself; when a finding is wrong, exclude it.
814
859
  Excluding every finding posts nothing. `--reset` clears the adjustments, and
815
- `/pr-comment <review-id> --show` shows the saved preview without a model. An
860
+ `/pr-comment --show` shows the saved preview without a model. An
816
861
  adjusted review is posted only from the preview planned after its latest
817
862
  adjustment; once its publication has started, it is neither adjusted nor
818
863
  planned again. Comments that an earlier publication put on the PR are never
@@ -822,24 +867,33 @@ names those whose text differs from the preview. See
822
867
 
823
868
  ### Automatic comments
824
869
 
825
- By default nothing follows a review: you preview with `/pr-comment` and post
826
- with `/pr-comment <id> --publish`. `afterReview` sets, per mode, what follows
827
- a COMPLETE review, and a flag right after the PR URL sets it for one run:
870
+ By default a comment preview follows a COMPLETE review: it shows the comments
871
+ as they would be posted and posts nothing, and you post them with
872
+ `/pr-comment --publish`. `afterReview` sets, per mode, what follows a COMPLETE
873
+ review, and a flag right after the PR URL sets it for one run:
828
874
 
829
875
  ```json
830
- { "afterReview": { "quick": "preview", "review": "none", "deep": "none" } }
876
+ { "afterReview": { "quick": "preview", "review": "preview", "deep": "none" } }
831
877
  ```
832
878
 
833
879
  ```text
880
+ /pr-review <PR URL> what afterReview.review says (a preview unless you changed it)
834
881
  /pr-review <PR URL> --preview plan a preview after a COMPLETE review
835
882
  /pr-review <PR URL> --publish plan and post the comments after a COMPLETE review
836
883
  /pr-review <PR URL> --no-comment nothing follows this review, whatever afterReview says
837
884
  ```
838
885
 
886
+ Set a mode to `none` when you mostly read the report and comment rarely, for
887
+ example for `/pr-deep` with a costly model: the preview is planned by that
888
+ mode's `risk` model (the quick reviewer for a quick review), one request for
889
+ about four findings. A settings file
890
+ that names `afterReview` keeps its values on an upgrade; one that does not,
891
+ such as the file `/pr-setup` writes, follows this default.
892
+
839
893
  The step runs after the review's receipt as a separate comment command with
840
894
  its own run ID, `STARTED` notice and receipt; `/pr-stop` stops it like any
841
895
  command. It is the same planning and publication as `/pr-comment`, so a
842
- preview uses a model, and `/pr-comment <id> --publish` later posts exactly that
896
+ preview uses a model, and `/pr-comment --publish` later posts exactly that
843
897
  preview. Nothing follows a review that is not COMPLETE, or that was stopped
844
898
  while its report was delivered. A review without
845
899
  findings to comment on gets one notice instead, with no planning, model
@@ -868,13 +922,13 @@ written. A
868
922
  quick review is posted when you chose
869
923
  it: its comments keep the disclosure `quick review, not independently
870
924
  verified`, and its summary names incomplete coverage; its verification hint
871
- is advisory (set `afterReview.quick` to `preview` to read the comments first).
925
+ is advisory (leave `afterReview.quick` at `preview` to read the comments first).
872
926
  When every finding is already discussed on the PR, typically by AZPR's own
873
927
  comment from an earlier run, there is nothing new to post: the receipt says
874
928
  `NOTHING_TO_POST` and the plan is saved (the summary's marker follows the
875
929
  inline comments, so re-reviewing an unchanged PR would otherwise add a summary
876
930
  each time). Publication itself still rechecks that the PR is active and
877
- unchanged. A command you type, such as `/pr-comment <id> --publish`, posts
931
+ unchanged. A command you type, such as `/pr-comment --publish`, posts
878
932
  every item of the saved preview, held ones included.
879
933
 
880
934
  ### Publication
@@ -896,12 +950,22 @@ are removed automatically. A receipt that cannot reach the conversation is saved
896
950
  under `receipts/` there. `/pr-comment` only accepts reviews started in the same
897
951
  conversation (or from one of that review's sessions).
898
952
 
899
- OpenCode does not delete sessions by itself, so AZPR removes its private
900
- reviewer sessions (`deletePrivateSessions`, on by default): a completed review's
901
- sessions go when the review is evicted, since `/pr-comment` needs them until
902
- then. A review that did not complete keeps only the session holding its report
903
- or draft (every session while debug is enabled), and these kept sessions follow
904
- the same limit of 20 runs. Your own conversations are never deleted.
953
+ AZPR's private reviewer sessions are sessions of their own, not children of
954
+ your conversation: OpenCode 2.3.0 hands every answer of a child session to its
955
+ parent and lets the parent's model respond to it. OpenCode therefore lists them
956
+ next to your conversations, titled `[AZPR <id>] …`, and does not delete
957
+ sessions by itself, so AZPR removes them (`deletePrivateSessions`, on by
958
+ default). When a review ends, only the session that holds its report or draft
959
+ stays, which is the one the receipt names, and the other sessions are deleted
960
+ at once; a comment run keeps none, since its receipt carries the preview or
961
+ the publication result. That one session goes when its review is evicted (a
962
+ review that did not complete follows the same limit of 20 runs). A session
963
+ OpenCode did not delete when asked stays on record: it goes with its review,
964
+ or, when no review keeps it, takes no AZPR commands and is tried again after
965
+ every later run. While debug is enabled every session is kept until its
966
+ review is evicted, so turn `debug.enabled` off for everyday use if the list
967
+ gets long. A review that an OpenCode restart interrupts leaves its sessions in
968
+ the list; delete those yourself. Your own conversations are never deleted.
905
969
 
906
970
  ## Development and removal
907
971
 
@@ -927,8 +991,8 @@ and a loopback fake Azure DevOps REST service in disposable directories under
927
991
  Uninstall without `--apply` previews; `--apply` archives only this package under
928
992
  `azpr-v2-backups` and leaves the private state directory for you to delete.
929
993
  For a native installation, remove the entry you added, for example
930
- `opencode plugin remove opencode-azure-devops-pr-review@0.3.7` or
931
- `opencode plugin remove 'github:WTLAIB/opencode-azure-devops-pr-review-v2#v0.3.7'`;
994
+ `opencode plugin remove opencode-azure-devops-pr-review@0.4.1` or
995
+ `opencode plugin remove 'github:WTLAIB/opencode-azure-devops-pr-review-v2#v0.4.1'`;
932
996
  the external settings, PAT file and private review state remain available.
933
997
 
934
998
  [Architecture](docs/ARCHITECTURE.md), [commenting](docs/COMMENTING.md),
@@ -941,7 +1005,7 @@ or personal model selections.
941
1005
  ## License and releases
942
1006
 
943
1007
  [MIT](LICENSE), copyright 2026 WTLAIB. See the [changelog](CHANGELOG.md) for the
944
- release scope, [v0.3.7](https://github.com/WTLAIB/opencode-azure-devops-pr-review-v2/releases/tag/v0.3.7)
1008
+ release scope, [v0.4.1](https://github.com/WTLAIB/opencode-azure-devops-pr-review-v2/releases/tag/v0.4.1)
945
1009
  for downloads, the [npm package](https://www.npmjs.com/package/opencode-azure-devops-pr-review),
946
1010
  [v0.2.0](https://github.com/WTLAIB/opencode-azure-devops-pr-review-v2/releases/tag/v0.2.0)
947
1011
  for the recorded demonstration, and [releasing](docs/RELEASING.md) for the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-azure-devops-pr-review",
3
- "version": "0.3.7",
3
+ "version": "0.4.1",
4
4
  "type": "module",
5
5
  "description": "Azure DevOps PR reviews from a URL in OpenCode, with no checkout, configurable models, separate verification, and comment previews you can adjust before posting",
6
6
  "scripts": {