opencode-azure-devops-pr-review 0.2.1 → 0.2.3
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 +6 -3
- package/CHANGELOG.md +37 -0
- package/CONTRIBUTING.md +4 -3
- package/README.md +130 -45
- package/docs/ARCHITECTURE.md +11 -5
- package/docs/AZURE_DEVOPS.md +7 -2
- package/docs/DEBUGGING.md +7 -6
- package/docs/ENTERPRISE.md +1 -1
- package/docs/QUICKSTART.md +50 -46
- package/docs/RELEASING.md +2 -2
- package/docs/ROADMAP.md +5 -3
- package/docs/VALIDATION.md +148 -6
- package/docs/releases/v0.2.2.md +76 -0
- package/docs/releases/v0.2.3.md +93 -0
- package/install.sh +1 -1
- package/package.json +3 -2
- package/src/azure.mjs +15 -6
- package/src/host.mjs +9 -8
- package/src/runtime.mjs +7 -6
- package/src/session.mjs +10 -3
package/AGENTS.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# AI development guide
|
|
2
2
|
|
|
3
3
|
This repository targets the OpenCode V2 plugin API (tested with
|
|
4
|
-
`@opencode/cli@2.1.
|
|
4
|
+
`@opencode/cli@2.1.4`), the Azure DevOps Services REST API (api-version 7.1)
|
|
5
5
|
and Ubuntu 22.04. Public source and documentation use English. Follow the user's
|
|
6
6
|
conversation language and current authorization scope.
|
|
7
7
|
|
|
@@ -73,7 +73,9 @@ settings, backups and failure records. Never upload `.local/`.
|
|
|
73
73
|
- All AZPR Azure DevOps traffic shares the queue in `tool-queue.mjs` (concurrency and
|
|
74
74
|
per-call timeout). Release slots in `finally`; never depend on a hook running.
|
|
75
75
|
- Large PRs are handled by sharding, not by compaction: private sessions may not
|
|
76
|
-
compact, and a compaction
|
|
76
|
+
compact, and a compaction the host attempts in a reviewer's turn means "split
|
|
77
|
+
this shard". A refused background summary (`experimental.background_compaction`)
|
|
78
|
+
ends nothing, so the turn's own failure decides its class.
|
|
77
79
|
- There is deliberately no default whole-run timeout and no per-stage step cap;
|
|
78
80
|
see the roadmap's Deferred section before adding either.
|
|
79
81
|
|
|
@@ -131,7 +133,8 @@ Detect capabilities; do not assume them.
|
|
|
131
133
|
|
|
132
134
|
Run `npm run check` and `npm test`. For changes touching hooks, sessions, tools, Azure access or
|
|
133
135
|
publication, also run `node tests/host-v2-smoke.mjs <opencode binary>` (fresh and
|
|
134
|
-
`--replace`)
|
|
136
|
+
`--replace`), `node tests/host-v2-comment-scale.mjs <opencode binary>` and
|
|
137
|
+
`node tests/host-v2-background-compaction.mjs <opencode binary>`.
|
|
135
138
|
For package entry points, first-run setup or settings-path changes, also run
|
|
136
139
|
`node tests/host-v2-smoke.mjs <opencode binary> --native`; this installs the
|
|
137
140
|
packed artifact through OpenCode's plugin manager in an isolated profile.
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,42 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.2.3 — 2026-10-24
|
|
4
|
+
|
|
5
|
+
- The tested host is OpenCode CLI 2.1.4. OpenCode 2.1.3 and later embed Bun
|
|
6
|
+
1.4.4, which reports a proxy that refuses the CONNECT tunnel as an
|
|
7
|
+
`ERR_PROXY_TUNNEL` error instead of returning the proxy's answer. AZPR maps
|
|
8
|
+
it to the earlier messages and retry rules: a missing proxy password is again
|
|
9
|
+
explained as HTTP 407 without retries, and a refused tunnel never leaves a
|
|
10
|
+
comment write uncertain.
|
|
11
|
+
- Azure DevOps calls keep the configured `azure.callTimeoutSeconds`. The
|
|
12
|
+
runtime's fetch gave up on a silent request after about six minutes by
|
|
13
|
+
itself, so a longer setting ended early with a retried network error.
|
|
14
|
+
- With OpenCode's opt-in `experimental.background_compaction`, a refused
|
|
15
|
+
background summary no longer turns a later failure into a context-overflow
|
|
16
|
+
split. A permanent error such as HTTP 401 stops the stage without new
|
|
17
|
+
sessions, and a failed follow-up keeps the answer it followed.
|
|
18
|
+
- The README states that AZPR is an independent community project, not built
|
|
19
|
+
by or affiliated with the OpenCode team.
|
|
20
|
+
- A fifth exact-host fixture covers background compaction followed by a
|
|
21
|
+
permanent failure; CI runs it.
|
|
22
|
+
|
|
23
|
+
## 0.2.2 — 2026-10-23
|
|
24
|
+
|
|
25
|
+
- The README leads with reviewing Azure DevOps PRs from a URL without a local
|
|
26
|
+
checkout, then explains source lookup, model choices, verification, comment
|
|
27
|
+
control and corporate connection settings with their limits.
|
|
28
|
+
- The README and quickstart use the same first-review workflow:
|
|
29
|
+
`/pr-review <PR URL> --preview`. Quick review remains an explicit lighter
|
|
30
|
+
alternative, with model-request and cost guidance.
|
|
31
|
+
- Compatibility explicitly excludes OpenCode 1.x without implying a separate
|
|
32
|
+
maintained AZPR product line. Detailed references remain folded with visible
|
|
33
|
+
navigation targets, and the archive-limit link points to the relevant guide.
|
|
34
|
+
- The Azure Code Search description correctly distinguishes indexed branches
|
|
35
|
+
from AZPR's searches at a selected commit.
|
|
36
|
+
- The npm package description reflects the URL-based workflow, and the
|
|
37
|
+
`opencode-v2` keyword identifies its plugin API target.
|
|
38
|
+
- No runtime, prompt, settings or installation behavior change.
|
|
39
|
+
|
|
3
40
|
## 0.2.1 — 2026-10-23
|
|
4
41
|
|
|
5
42
|
- AZPR is published to the npm registry as `opencode-azure-devops-pr-review`:
|
package/CONTRIBUTING.md
CHANGED
|
@@ -29,7 +29,7 @@ can go straight to a pull request.
|
|
|
29
29
|
## Work locally
|
|
30
30
|
|
|
31
31
|
Use Node.js 22.12 or later, POSIX `sh`, Python 3 and Git. The current host
|
|
32
|
-
acceptance target is OpenCode V2 `@opencode/cli@2.1.
|
|
32
|
+
acceptance target is OpenCode V2 `@opencode/cli@2.1.4` on Ubuntu 22.04; other
|
|
33
33
|
environments are not yet validated. The runtime has no npm dependencies or
|
|
34
34
|
build step. From your checkout:
|
|
35
35
|
|
|
@@ -45,16 +45,17 @@ findings and independently verified findings. Add a focused regression test
|
|
|
45
45
|
when fixing behavior, and update the relevant documentation when it changes.
|
|
46
46
|
|
|
47
47
|
Changes to hooks, sessions, tools, Azure access or publication also need all
|
|
48
|
-
|
|
48
|
+
five host fixture runs. Install the tested host into a disposable local directory
|
|
49
49
|
without changing your everyday OpenCode installation:
|
|
50
50
|
|
|
51
51
|
```sh
|
|
52
|
-
npm install --prefix "$PWD/.local/contributor-host" --no-audit --no-fund @opencode/cli@2.1.
|
|
52
|
+
npm install --prefix "$PWD/.local/contributor-host" --no-audit --no-fund @opencode/cli@2.1.4
|
|
53
53
|
AZPR_TEST_HOST="$PWD/.local/contributor-host/node_modules/.bin/opencode"
|
|
54
54
|
node tests/host-v2-smoke.mjs "$AZPR_TEST_HOST"
|
|
55
55
|
node tests/host-v2-smoke.mjs "$AZPR_TEST_HOST" --replace
|
|
56
56
|
node tests/host-v2-smoke.mjs "$AZPR_TEST_HOST" --native
|
|
57
57
|
node tests/host-v2-comment-scale.mjs "$AZPR_TEST_HOST"
|
|
58
|
+
node tests/host-v2-background-compaction.mjs "$AZPR_TEST_HOST"
|
|
58
59
|
```
|
|
59
60
|
|
|
60
61
|
The fixtures need `openssl` and use isolated configuration, a fake model
|
package/README.md
CHANGED
|
@@ -1,20 +1,24 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Azure DevOps PR Review for OpenCode
|
|
2
2
|
|
|
3
3
|
[](https://github.com/WTLAIB/opencode-azure-devops-pr-review-v2/actions/workflows/ci.yml?query=branch%3Amain)
|
|
4
4
|
[](https://www.npmjs.com/package/opencode-azure-devops-pr-review)
|
|
5
5
|
[](LICENSE)
|
|
6
|
-
[](docs/VALIDATION.md)
|
|
7
7
|
|
|
8
|
-
Review Azure DevOps pull requests
|
|
9
|
-
verified review modes, comment previews, and explicit publishing.
|
|
8
|
+
**Review Azure DevOps pull requests from a URL. No checkout required.**
|
|
10
9
|
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
Review across repositories in your configured Azure DevOps organization without
|
|
11
|
+
managing a local clone of each project. AZPR uses your OpenCode models to inspect
|
|
12
|
+
the changes, check findings, and prepare inline comments you can preview before
|
|
13
|
+
publishing. No MCP server or CI pipeline setup is required.
|
|
14
|
+
|
|
15
|
+
AZPR is an independent community project. It is not built by or affiliated with
|
|
16
|
+
the OpenCode team.
|
|
13
17
|
|
|
14
18
|
[Get started](docs/QUICKSTART.md) · [See the demo](docs/DEMO.md) ·
|
|
15
19
|
[Team setup and data handling](docs/ENTERPRISE.md) ·
|
|
16
20
|
[Validation and limitations](docs/VALIDATION.md) ·
|
|
17
|
-
[Download v0.2.
|
|
21
|
+
[Download v0.2.3](https://github.com/WTLAIB/opencode-azure-devops-pr-review-v2/releases/tag/v0.2.3)
|
|
18
22
|
|
|
19
23
|
[](docs/DEMO.md)
|
|
20
24
|
|
|
@@ -23,6 +27,66 @@ and choose when to publish to Azure DevOps.** No MCP server is needed.
|
|
|
23
27
|
or read the [demo and recording details](docs/DEMO.md). Waiting time is shortened;
|
|
24
28
|
the Azure portion shows an actual REST read-back in a terminal.*
|
|
25
29
|
|
|
30
|
+
## Why AZPR?
|
|
31
|
+
|
|
32
|
+
- **Follow the code beyond the diff.** Reviewers can look up definitions,
|
|
33
|
+
callers and tests using file reads and text search at the selected PR commit,
|
|
34
|
+
without depending on an Azure Code Search index.
|
|
35
|
+
- **Give findings a separate check.** Functional and risk reviewers propose
|
|
36
|
+
findings; independent verifier sessions re-read the source and look for
|
|
37
|
+
counterevidence. Quick mode skips this second check when you want a lighter
|
|
38
|
+
pass.
|
|
39
|
+
- **Choose where to spend model effort.** Assign different OpenCode models to
|
|
40
|
+
functional review, risk review and verification, or use one model for all
|
|
41
|
+
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
|
+
- **Configure the Azure connection for your network.** Set a forward proxy and
|
|
47
|
+
additional CA certificates for AZPR's Azure DevOps requests. Model-provider
|
|
48
|
+
connections remain configured in OpenCode.
|
|
49
|
+
|
|
50
|
+
Content search downloads a bounded repository archive into memory; source
|
|
51
|
+
context is sent through your selected model providers, and review records are
|
|
52
|
+
saved locally. See [content-search limits](docs/AZURE_DEVOPS.md#who-calls-what)
|
|
53
|
+
for archive and file-size bounds, and [team setup and data handling](docs/ENTERPRISE.md)
|
|
54
|
+
for proxy authentication and retention.
|
|
55
|
+
|
|
56
|
+
## Your first review
|
|
57
|
+
|
|
58
|
+
1. Install the npm package using OpenCode's plugin manager:
|
|
59
|
+
|
|
60
|
+
```sh
|
|
61
|
+
opencode plugin add opencode-azure-devops-pr-review@0.2.3
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
2. Follow the [quickstart](docs/QUICKSTART.md) to save your PAT in a private
|
|
65
|
+
file and run `/pr-setup` with your organization and one model. Restart the
|
|
66
|
+
OpenCode service to load the settings.
|
|
67
|
+
3. In one OpenCode conversation, check access, then review and preview:
|
|
68
|
+
|
|
69
|
+
```text
|
|
70
|
+
/pr-check https://dev.azure.com/YOUR_ORG/YOUR_PROJECT/_git/YOUR_REPO/pullrequest/123
|
|
71
|
+
/pr-review https://dev.azure.com/YOUR_ORG/YOUR_PROJECT/_git/YOUR_REPO/pullrequest/123 --preview
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Replace the sample URL with your PR. Wait for `/pr-check` to report `READY`
|
|
75
|
+
before starting the review; it uses no model. The review runs functional and risk
|
|
76
|
+
reviewers, then separate verification. If the completed review has findings to
|
|
77
|
+
comment on, `--preview` prepares their comments in a separate, cancellable run.
|
|
78
|
+
**Nothing is posted by these commands.** Previewing comments also uses a model.
|
|
79
|
+
|
|
80
|
+
Read the report and preview, then publish from the same conversation:
|
|
81
|
+
|
|
82
|
+
```text
|
|
83
|
+
/pr-comment REVIEW_ID_FROM_RECEIPT --publish
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Use the review ID from the completed receipt. The command posts the saved
|
|
87
|
+
preview as the PAT owner. For a lighter first pass, use
|
|
88
|
+
`/pr-quick <PR URL> --preview`; its findings are not independently verified.
|
|
89
|
+
|
|
26
90
|
## Choose a review
|
|
27
91
|
|
|
28
92
|
| Command | Best starting point | What runs |
|
|
@@ -32,8 +96,12 @@ the Azure portion shows an actual REST read-back in a terminal.*
|
|
|
32
96
|
| `/pr-deep` | Important or risky changes worth a stronger model | The same verified pipeline as `/pr-review`, run with the stronger models you set in `models.deep`; usually slower and costlier. |
|
|
33
97
|
|
|
34
98
|
All three modes use the same Azure comment layout. Quick comments disclose their
|
|
35
|
-
method.
|
|
36
|
-
|
|
99
|
+
method. Separate verification adds scrutiny; it does not guarantee correct
|
|
100
|
+
findings or complete defect coverage. Mixing models is a choice about capability
|
|
101
|
+
and cost, not a proven accuracy improvement. See [model configuration](#configuration).
|
|
102
|
+
|
|
103
|
+
<details>
|
|
104
|
+
<summary>Sessions, model requests and cost</summary>
|
|
37
105
|
|
|
38
106
|
For a small PR that fits in one shard and one comment-planning page, quick
|
|
39
107
|
usually needs one review session plus one planning session; review needs two
|
|
@@ -43,37 +111,29 @@ and extra planning pages add work. Previewing comments also uses a model.
|
|
|
43
111
|
See [measured runs and their limits](docs/VALIDATION.md) for cost and timing
|
|
44
112
|
examples, rather than treating a session count as a price guarantee.
|
|
45
113
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
Install the package using OpenCode's plugin manager:
|
|
114
|
+
</details>
|
|
49
115
|
|
|
50
|
-
|
|
51
|
-
opencode plugin add opencode-azure-devops-pr-review@0.2.1
|
|
52
|
-
```
|
|
116
|
+
## Is this the right workflow?
|
|
53
117
|
|
|
54
|
-
|
|
55
|
-
and
|
|
56
|
-
|
|
118
|
+
AZPR fits reviewers who already use OpenCode, review Azure DevOps Services PRs
|
|
119
|
+
on demand, and want to choose their models and inspect comments before posting.
|
|
120
|
+
It combines source retrieval, review stages and publication checks in one plugin.
|
|
57
121
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
/pr-comment REVIEW_ID_FROM_RECEIPT
|
|
62
|
-
```
|
|
122
|
+
If you need an unattended review on every PR event, look for a webhook or CI
|
|
123
|
+
integration; AZPR runs when you invoke a command. If your work includes editing
|
|
124
|
+
code or running the project's tests, use a local checkout for that work.
|
|
63
125
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
review; [automatic comments](#automatic-comments) can also publish, but only
|
|
70
|
-
when you ask for it.
|
|
126
|
+
The [validation record](docs/VALIDATION.md) includes real model/Azure runs, a
|
|
127
|
+
316-file test PR, isolated OpenCode host checks, and an offline test suite for
|
|
128
|
+
runtime and packaging behavior. It also records missed defects and untested
|
|
129
|
+
environments. The demo shows the workflow; these checks do not establish a
|
|
130
|
+
general review-accuracy score.
|
|
71
131
|
|
|
72
132
|
## Compatibility
|
|
73
133
|
|
|
74
134
|
| Component | Tested target |
|
|
75
135
|
| --- | --- |
|
|
76
|
-
| OpenCode | **
|
|
136
|
+
| OpenCode | **OpenCode CLI 2.1.4** (`@opencode/cli`; V2 plugin API). OpenCode 1.x is not supported. |
|
|
77
137
|
| Operating system | **Ubuntu 22.04** (validation environment: WSL2). Other operating systems are not yet validated. |
|
|
78
138
|
| Azure | **Azure DevOps Services**, REST API **7.1**. Azure DevOps Server is not supported by the current URL handling. |
|
|
79
139
|
| 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. |
|
|
@@ -86,13 +146,18 @@ for both quick and verified reviews.
|
|
|
86
146
|
|
|
87
147
|
## How reviews work
|
|
88
148
|
|
|
149
|
+
<details>
|
|
150
|
+
<summary>Review stages, recovery and saved results</summary>
|
|
151
|
+
|
|
89
152
|
1. The runtime reads the PR deterministically from Azure DevOps: identity, the
|
|
90
153
|
latest iteration's source commit and merge base, and the complete
|
|
91
154
|
changed-file list. Reviewers read the repository through AZPR's own
|
|
92
155
|
read-only tools at exact commits.
|
|
93
156
|
2. Two full-scope reviewers (functional and risk) review the changed files in
|
|
94
157
|
bounded **shards**. A shard that fills its model context is split in half
|
|
95
|
-
and run again instead of failing.
|
|
158
|
+
and run again instead of failing. Reviewer sessions never compact, so
|
|
159
|
+
OpenCode's opt-in `experimental.background_compaction` does not apply to
|
|
160
|
+
them: AZPR refuses its summary requests before anything is sent.
|
|
96
161
|
3. A verifier independently re-checks every candidate finding against the
|
|
97
162
|
source, sharded by finding. Answers that break the output contract get a
|
|
98
163
|
short **correction turn** in the same session; whatever is still unusable is
|
|
@@ -133,6 +198,8 @@ survive an OpenCode restart.
|
|
|
133
198
|
See [current validation](docs/VALIDATION.md) for what was tested and what was
|
|
134
199
|
not; earlier runs are kept in [validation history](docs/VALIDATION_HISTORY.md).
|
|
135
200
|
|
|
201
|
+
</details>
|
|
202
|
+
|
|
136
203
|
## Requirements and installation
|
|
137
204
|
|
|
138
205
|
The plugin has no npm dependencies, build step or provider SDK. It calls the
|
|
@@ -143,14 +210,14 @@ Azure DevOps REST API with the runtime's built-in `fetch`.
|
|
|
143
210
|
Install the npm package with OpenCode's plugin manager:
|
|
144
211
|
|
|
145
212
|
```sh
|
|
146
|
-
opencode plugin add opencode-azure-devops-pr-review@0.2.
|
|
213
|
+
opencode plugin add opencode-azure-devops-pr-review@0.2.3
|
|
147
214
|
```
|
|
148
215
|
|
|
149
216
|
The same release is also a versioned Git package, which needs Git but not the
|
|
150
217
|
npm registry:
|
|
151
218
|
|
|
152
219
|
```sh
|
|
153
|
-
opencode plugin add 'github:WTLAIB/opencode-azure-devops-pr-review-v2#v0.2.
|
|
220
|
+
opencode plugin add 'github:WTLAIB/opencode-azure-devops-pr-review-v2#v0.2.3'
|
|
154
221
|
```
|
|
155
222
|
|
|
156
223
|
Add only one of them. Restart OpenCode, then run `/pr-setup` for setup instructions. Native packages
|
|
@@ -161,7 +228,7 @@ To select another configuration file, use an absolute path in the host config:
|
|
|
161
228
|
```json
|
|
162
229
|
{
|
|
163
230
|
"plugins": [{
|
|
164
|
-
"package": "opencode-azure-devops-pr-review@0.2.
|
|
231
|
+
"package": "opencode-azure-devops-pr-review@0.2.3",
|
|
165
232
|
"options": { "settingsFile": "/absolute/path/to/azpr/settings.json" }
|
|
166
233
|
}]
|
|
167
234
|
}
|
|
@@ -174,22 +241,25 @@ permissions, archive the old installation with its uninstaller, then add the
|
|
|
174
241
|
package. Keep the PAT file and private state directory in place.
|
|
175
242
|
|
|
176
243
|
To upgrade a native installation, change the version in its existing `plugins`
|
|
177
|
-
entry, for example from `#v0.2.
|
|
244
|
+
entry, for example from `#v0.2.2` to `#v0.2.3` for the Git package. To move a
|
|
178
245
|
Git installation to npm, replace that entry's Git specification with
|
|
179
|
-
`opencode-azure-devops-pr-review@0.2.
|
|
246
|
+
`opencode-azure-devops-pr-review@0.2.3`. Both use the same external settings.
|
|
180
247
|
Preserve any `options.settingsFile` and other options; keep one AZPR entry.
|
|
181
248
|
Restart the OpenCode service to load the new version. External settings, the
|
|
182
249
|
PAT file and review records stay in place. Exact versions stay pinned, so
|
|
183
250
|
`opencode plugin update` leaves them unchanged. See the
|
|
184
|
-
[0.2.
|
|
251
|
+
[0.2.3 release notes](docs/releases/v0.2.3.md) for upgrade details and the
|
|
185
252
|
[0.2.0 release notes](docs/releases/v0.2.0.md) for automatic comments, which
|
|
186
253
|
remain disabled unless you configure `afterReview` or request them with a
|
|
187
254
|
review command flag.
|
|
188
255
|
|
|
189
256
|
### Source archive or checkout
|
|
190
257
|
|
|
191
|
-
|
|
192
|
-
|
|
258
|
+
<details>
|
|
259
|
+
<summary>Source installation and replacement</summary>
|
|
260
|
+
|
|
261
|
+
Download the [v0.2.3 source archive](https://github.com/WTLAIB/opencode-azure-devops-pr-review-v2/archive/refs/tags/v0.2.3.tar.gz)
|
|
262
|
+
and extract it, or check out tag `v0.2.3`. The installer needs POSIX `sh` and
|
|
193
263
|
Python 3's standard library. From that source directory:
|
|
194
264
|
|
|
195
265
|
```sh
|
|
@@ -199,22 +269,27 @@ sh install.sh --config-dir /absolute/path/to/v2-opencode-config
|
|
|
199
269
|
The installer creates `plugins/azpr-v2/` with a generated ESM `package.json`
|
|
200
270
|
and a `server.js` entry that re-exports `plugin.js`. It never edits the main
|
|
201
271
|
OpenCode configuration, provider choices or MCP connections, and it refuses
|
|
202
|
-
conflicting
|
|
272
|
+
conflicting legacy files, reserved command names and unowned packages. Run
|
|
203
273
|
`/pr-setup ... --replace` to configure the generated starter settings, or edit
|
|
204
274
|
them yourself before restarting OpenCode.
|
|
205
275
|
|
|
206
|
-
To replace an existing
|
|
276
|
+
To replace an existing source installation (current settings are kept, new defaults
|
|
207
277
|
are added, and a retired `mcp` section is moved into `azure`):
|
|
208
278
|
|
|
209
279
|
```sh
|
|
210
280
|
sh install.sh --config-dir /absolute/path/to/v2-opencode-config --replace
|
|
211
281
|
```
|
|
212
282
|
|
|
283
|
+
</details>
|
|
284
|
+
|
|
213
285
|
### Manual copying without Git
|
|
214
286
|
|
|
215
287
|
Keep these relative paths under one source directory, then run its installer.
|
|
216
288
|
These **31 files** include the runtime and its license:
|
|
217
289
|
|
|
290
|
+
<details>
|
|
291
|
+
<summary>Show the required files</summary>
|
|
292
|
+
|
|
218
293
|
```text
|
|
219
294
|
install.sh
|
|
220
295
|
LICENSE
|
|
@@ -252,6 +327,8 @@ src/prompts/comment-plan.md
|
|
|
252
327
|
README, `docs/`, the changelog, the settings schema and `uninstall.sh` are optional.
|
|
253
328
|
Keep `LICENSE` with copied or redistributed packages.
|
|
254
329
|
|
|
330
|
+
</details>
|
|
331
|
+
|
|
255
332
|
## Configuration
|
|
256
333
|
|
|
257
334
|
Run `/pr-setup` to see the active settings path. Native packages use the
|
|
@@ -311,6 +388,11 @@ never blocks `/pr-review`. Comment planning uses the review's risk model
|
|
|
311
388
|
A role's focus orders its attention and is not a filter: every reviewer files
|
|
312
389
|
every concrete defect it finds, in any area, as a finding.
|
|
313
390
|
|
|
391
|
+
### All settings and defaults
|
|
392
|
+
|
|
393
|
+
<details>
|
|
394
|
+
<summary>Show the settings reference</summary>
|
|
395
|
+
|
|
314
396
|
| Setting | Default and meaning |
|
|
315
397
|
| --- | --- |
|
|
316
398
|
| `enabled` | `true`; `false` registers nothing. |
|
|
@@ -346,6 +428,8 @@ into `azure`). There is deliberately no per-stage step cap; see the
|
|
|
346
428
|
(`workflow.stageIdleSeconds`) is not one: it stops only a stage that stopped
|
|
347
429
|
working.
|
|
348
430
|
|
|
431
|
+
</details>
|
|
432
|
+
|
|
349
433
|
### Azure DevOps access
|
|
350
434
|
|
|
351
435
|
AZPR talks to the Azure DevOps Services REST API itself (api-version 7.1). Create
|
|
@@ -544,6 +628,7 @@ node tests/host-v2-smoke.mjs /absolute/path/to/opencode
|
|
|
544
628
|
node tests/host-v2-smoke.mjs /absolute/path/to/opencode --replace
|
|
545
629
|
node tests/host-v2-smoke.mjs /absolute/path/to/opencode --native
|
|
546
630
|
node tests/host-v2-comment-scale.mjs /absolute/path/to/opencode
|
|
631
|
+
node tests/host-v2-background-compaction.mjs /absolute/path/to/opencode
|
|
547
632
|
sh uninstall.sh --config-dir /absolute/path/to/v2-opencode-config
|
|
548
633
|
sh uninstall.sh --config-dir /absolute/path/to/v2-opencode-config --apply
|
|
549
634
|
```
|
|
@@ -554,8 +639,8 @@ and a loopback fake Azure DevOps REST service in disposable directories under
|
|
|
554
639
|
Uninstall without `--apply` previews; `--apply` archives only this package under
|
|
555
640
|
`azpr-v2-backups` and leaves the private state directory for you to delete.
|
|
556
641
|
For a native installation, remove the entry you added, for example
|
|
557
|
-
`opencode plugin remove opencode-azure-devops-pr-review@0.2.
|
|
558
|
-
`opencode plugin remove 'github:WTLAIB/opencode-azure-devops-pr-review-v2#v0.2.
|
|
642
|
+
`opencode plugin remove opencode-azure-devops-pr-review@0.2.3` or
|
|
643
|
+
`opencode plugin remove 'github:WTLAIB/opencode-azure-devops-pr-review-v2#v0.2.3'`;
|
|
559
644
|
the external settings, PAT file and private review state remain available.
|
|
560
645
|
|
|
561
646
|
[Architecture](docs/ARCHITECTURE.md), [commenting](docs/COMMENTING.md),
|
|
@@ -568,7 +653,7 @@ or personal model selections.
|
|
|
568
653
|
## License and releases
|
|
569
654
|
|
|
570
655
|
[MIT](LICENSE), copyright 2026 WTLAIB. See the [changelog](CHANGELOG.md) for the
|
|
571
|
-
release scope, [v0.2.
|
|
656
|
+
release scope, [v0.2.3](https://github.com/WTLAIB/opencode-azure-devops-pr-review-v2/releases/tag/v0.2.3)
|
|
572
657
|
for downloads, the [npm package](https://www.npmjs.com/package/opencode-azure-devops-pr-review),
|
|
573
658
|
[v0.2.0](https://github.com/WTLAIB/opencode-azure-devops-pr-review-v2/releases/tag/v0.2.0)
|
|
574
659
|
for the recorded demonstration, and [releasing](docs/RELEASING.md) for the
|
package/docs/ARCHITECTURE.md
CHANGED
|
@@ -113,9 +113,14 @@ After preflight, hooks never re-read settings or catalogs.
|
|
|
113
113
|
reviewer files every concrete defect it finds as a finding: a role's focus
|
|
114
114
|
orders its attention and is not a filter, and `report` carries exclusions,
|
|
115
115
|
advice and limitations only.
|
|
116
|
-
3. **Overflow** — private sessions may not compact. A compaction
|
|
117
|
-
|
|
118
|
-
|
|
116
|
+
3. **Overflow** — private sessions may not compact. A compaction the host
|
|
117
|
+
attempts in a reviewer's turn opens its message first and is refused, which
|
|
118
|
+
ends the turn; that message (or a 413) marks the stage as `overflow`, and the
|
|
119
|
+
runtime splits that shard in half and runs both halves (labels
|
|
120
|
+
`shard 1/5a`, `1/5b`). OpenCode's opt-in `experimental.background_compaction`
|
|
121
|
+
(2.1.4) asks for a summary through the same request before the context is
|
|
122
|
+
full and publishes nothing; it is refused before anything is sent and the
|
|
123
|
+
turn goes on, so a later failure is classified by its own cause.
|
|
119
124
|
4. **Verification** — findings are grouped by file into shards of at most
|
|
120
125
|
`workflow.shardFindings`; shards end only between files, so every finding on
|
|
121
126
|
a file reaches the same verifier (a file is split only when it alone has
|
|
@@ -321,7 +326,8 @@ private session gets a grant with the run, role, model and a pending prompt
|
|
|
321
326
|
removed. Ordinary sessions lose only AZPR's tools. Comment pages that read too
|
|
322
327
|
much get their tools removed to force a checkpoint.
|
|
323
328
|
- `model.request`: only primary requests after an authorized context; compaction,
|
|
324
|
-
generation and title requests are refused (compaction
|
|
329
|
+
generation and title requests are refused (a compaction the host attempts
|
|
330
|
+
in the turn ends it as overflow).
|
|
325
331
|
- `retry`: host retries continue only while the grant is active; the announced
|
|
326
332
|
wait does not count as inactivity. OpenCode prepares the resend again
|
|
327
333
|
(`context`, then `model.request`), so it passes the primary-request check.
|
|
@@ -372,6 +378,6 @@ Without `permission.hook` the project boundary for native read tools is left to
|
|
|
372
378
|
the host's own permission rules; `/pr-check` shows a WARNING row and reviews
|
|
373
379
|
still run.
|
|
374
380
|
Receipts note when the detected OpenCode version differs from the tested one
|
|
375
|
-
(`TESTED_HOST_VERSION`, 2.1.
|
|
381
|
+
(`TESTED_HOST_VERSION`, 2.1.4).
|
|
376
382
|
REST paths and the pinned api-version live only in `azure.mjs`; see
|
|
377
383
|
[Azure DevOps access](AZURE_DEVOPS.md) for the API list and version policy.
|
package/docs/AZURE_DEVOPS.md
CHANGED
|
@@ -148,8 +148,10 @@ but AZPR accepts only Azure DevOps Services URLs (`dev.azure.com/<org>` and
|
|
|
148
148
|
(at most `azure.archiveMegabytes`, 100 MB by default) and searches it in memory; files over 2 MB, binary files
|
|
149
149
|
and anything beyond 256 MB of text are not searched, and ZIP64 or
|
|
150
150
|
encrypted archives make the tool answer that search is unavailable. Azure
|
|
151
|
-
DevOps Code Search is not used: it
|
|
152
|
-
|
|
151
|
+
DevOps Code Search is not used: it searches
|
|
152
|
+
[indexed branches](https://learn.microsoft.com/en-us/azure/devops/project/search/functional-code-search?view=azure-devops)
|
|
153
|
+
rather than an arbitrary commit; AZPR searches the repository snapshot at
|
|
154
|
+
the selected commit;
|
|
153
155
|
- `azpr_find_files` — repository paths by name or glob, from one recursive
|
|
154
156
|
listing per commit and folder (read once per run); names only;
|
|
155
157
|
- `azpr_list_files` — one folder's entries (optionally recursive), at most
|
|
@@ -174,6 +176,9 @@ but AZPR accepts only Azure DevOps Services URLs (`dev.azure.com/<org>` and
|
|
|
174
176
|
|
|
175
177
|
- All calls share one queue (`azure.concurrency`) with a per-call timeout
|
|
176
178
|
(`azure.callTimeoutSeconds`) that aborts the HTTP request and frees the slot.
|
|
179
|
+
AZPR switches off the runtime's own idle limit for these requests (Bun's
|
|
180
|
+
fetch would end a call that receives nothing for five to six minutes), so a
|
|
181
|
+
longer timeout takes effect.
|
|
177
182
|
- Reads retry network errors, timeouts, throttling (429, honouring
|
|
178
183
|
`Retry-After` up to 60 seconds) and 5xx responses twice with backoff.
|
|
179
184
|
- Writes are never retried. A write whose outcome is unknown (timeout, a lost
|
package/docs/DEBUGGING.md
CHANGED
|
@@ -6,12 +6,13 @@ acceptance, Azure source validity or report quality.
|
|
|
6
6
|
|
|
7
7
|
## A startup slash command becomes an ordinary prompt
|
|
8
8
|
|
|
9
|
-
On OpenCode 2.1.2, `opencode --prompt "/pr-review ..."` can
|
|
10
|
-
native Git package's command catalog has loaded. The host then
|
|
11
|
-
as an ordinary model prompt; AZPR has not received the command.
|
|
12
|
-
in local native-package TUI acceptance failures
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
On OpenCode 2.1.2 through 2.1.4, `opencode --prompt "/pr-review ..."` can
|
|
10
|
+
submit before a native Git package's command catalog has loaded. The host then
|
|
11
|
+
treats the text as an ordinary model prompt; AZPR has not received the command.
|
|
12
|
+
This was observed in local native-package TUI acceptance failures on 2.1.2 and
|
|
13
|
+
matches the host's
|
|
14
|
+
[startup submission](https://github.com/anomalyco/opencode/blob/v2.1.4/packages/tui/src/routes/home.tsx#L62)
|
|
15
|
+
and [command classification](https://github.com/anomalyco/opencode/blob/v2.1.4/packages/tui/src/component/prompt/index.tsx#L1153).
|
|
15
16
|
|
|
16
17
|
Start the TUI normally and wait for `/pr-review` to appear in slash-command
|
|
17
18
|
completion before submitting it. A command admitted by AZPR emits its own
|
package/docs/ENTERPRISE.md
CHANGED
|
@@ -6,7 +6,7 @@ MCP dependency. Start with the [quickstart](QUICKSTART.md), then use
|
|
|
6
6
|
this page to understand access, data flow and local retention before reviewing
|
|
7
7
|
your team's repositories.
|
|
8
8
|
|
|
9
|
-
The tested environment is **OpenCode V2 `@opencode/cli` 2.1.
|
|
9
|
+
The tested environment is **OpenCode V2 `@opencode/cli` 2.1.4 on Ubuntu
|
|
10
10
|
22.04**. Azure DevOps Server URLs are not supported. See
|
|
11
11
|
[current validation](VALIDATION.md) for the distinction between isolated tests
|
|
12
12
|
with fake services and runs against real Azure DevOps and model providers.
|