opencode-azure-devops-pr-review 0.3.0 → 0.3.2

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.
Files changed (53) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/README.md +189 -109
  3. package/package.json +2 -11
  4. package/src/attribution.mjs +2 -2
  5. package/src/azure.mjs +18 -3
  6. package/src/config.mjs +5 -0
  7. package/src/host.mjs +44 -0
  8. package/src/plugin.js +2 -1
  9. package/src/runtime.mjs +27 -5
  10. package/src/setup.mjs +49 -21
  11. package/AGENTS.md +0 -164
  12. package/CODE_OF_CONDUCT.md +0 -83
  13. package/CONTRIBUTING.md +0 -84
  14. package/SECURITY.md +0 -38
  15. package/config/settings.example.json +0 -55
  16. package/config/settings.schema.json +0 -316
  17. package/docs/ARCHITECTURE.md +0 -408
  18. package/docs/AZURE_DEVOPS.md +0 -214
  19. package/docs/COMMENTING.md +0 -399
  20. package/docs/DEBUGGING.md +0 -144
  21. package/docs/DEMO.md +0 -195
  22. package/docs/ENTERPRISE.md +0 -205
  23. package/docs/QUICKSTART.md +0 -219
  24. package/docs/RELEASING.md +0 -95
  25. package/docs/ROADMAP.md +0 -241
  26. package/docs/VALIDATION.md +0 -2066
  27. package/docs/VALIDATION_HISTORY.md +0 -1845
  28. package/docs/VERIFICATION.md +0 -42
  29. package/docs/assets/RECORDING.md +0 -131
  30. package/docs/assets/adjust-findings-teaser.gif +0 -0
  31. package/docs/assets/adjust-preview.png +0 -0
  32. package/docs/assets/adjust-publication.png +0 -0
  33. package/docs/assets/example-comments.md +0 -38
  34. package/docs/assets/generate-demo-gif.py +0 -25
  35. package/docs/assets/generate-demo.mjs +0 -141
  36. package/docs/assets/live-azure-readback.png +0 -0
  37. package/docs/assets/live-preview.png +0 -0
  38. package/docs/assets/live-review-teaser.gif +0 -0
  39. package/docs/assets/live-review.png +0 -0
  40. package/docs/assets/quick-review-demo.gif +0 -0
  41. package/docs/assets/record-terminal.py +0 -124
  42. package/docs/assets/render-terminal-demo.py +0 -168
  43. package/docs/assets/review-example.svg +0 -1
  44. package/docs/assets/walkthrough.svg +0 -1
  45. package/docs/releases/v0.1.0.md +0 -74
  46. package/docs/releases/v0.2.0.md +0 -107
  47. package/docs/releases/v0.2.1.md +0 -65
  48. package/docs/releases/v0.2.2.md +0 -76
  49. package/docs/releases/v0.2.3.md +0 -93
  50. package/docs/releases/v0.3.0.md +0 -125
  51. package/install.sh +0 -171
  52. package/scripts/merge-settings.py +0 -120
  53. package/uninstall.sh +0 -50
@@ -1,2066 +0,0 @@
1
- # Validation
2
-
3
- This page records validation of the Azure DevOps REST implementation and the
4
- 0.1.0, 0.2.0, 0.2.1, 0.2.2 and 0.2.3 distributions, and the 0.3.0 release
5
- candidate. Host integration, provider
6
- admission, source fidelity, model quality and publication are separate claims; a
7
- passing fixture establishes only the first. Earlier revisions and their live
8
- acceptance runs, including the MCP-based runs, are preserved in
9
- [validation history](VALIDATION_HISTORY.md).
10
-
11
- ## Summary
12
-
13
- - **Every change, in CI.** `npm run check` and the offline test suite, then
14
- five runs on the real OpenCode 2.1.4 host with isolated profiles and fake
15
- model and Azure DevOps services: fresh, replacement and native installation
16
- (including an authenticating proxy and a custom CA certificate), a 120-file
17
- review in shards with a context-overflow split and idempotent publication,
18
- and a refused background summary followed by a permanent failure.
19
- - **Live, with real models on Azure DevOps Services.** Reviews, comment
20
- previews and publication on three test PRs with 1, 35 and 316 changed
21
- files. On OpenCode 2.1.4 with gpt-6-luna, all six quick and review runs
22
- completed without a retry or a failed stage; both modes found all 24 seeded
23
- policy defects of the 316-file PR and the 3 known defects of the 1-file PR.
24
- Live automatic publication on the 35-file PR (OpenCode 2.1.2) posted and
25
- read back its comments, and a second run on the unchanged PR wrote nothing.
26
- - **Every release.** Following the [releasing guide](RELEASING.md), the
27
- candidate is installed from a clean source archive and from its public Git
28
- commit before it is tagged, and the published npm package is installed from
29
- the registry; its integrity must match the package built from the tag.
30
-
31
- These checks show that the workflow works and what it found on these test
32
- PRs. Findings vary between models and runs, so they are not a general
33
- accuracy score; see [known limitations](#known-limitations).
34
-
35
- ## 0.3.0 release candidate acceptance (2026-10-26)
36
-
37
- Environment: Ubuntu 22.04.5 under WSL2, Node 22.23.3, npm 10.9.9 and OpenCode
38
- CLI 2.1.4. The candidate contains the finding-adjustment workflow merged in
39
- PR #29, including the final fixes in `d4fd8dd`. Release preparation changes
40
- the package version, description, documentation and recording tool, and adds
41
- the code of conduct and a recorded demonstration to the npm package; the
42
- runtime, prompts, settings and installers are unchanged from that reviewed
43
- revision.
44
-
45
- - `npm run check` and **417 offline tests** passed, including the adjustment
46
- save failure, the final summary's excluded-ID check, and an earlier comment
47
- read back after a refused write without a local publication record.
48
- - All five real-host fixtures passed with isolated profiles and fake model
49
- and Azure services: fresh source installation, replacement installation,
50
- native packed package installation, comment scale and background compaction.
51
- Fresh and native runs cover the authenticating proxy, custom CA, external
52
- settings, restart and idempotent publication. The scale fixture reviewed
53
- 120 files with one overflow split and eight planning sessions, at most two
54
- in flight; its largest provider request was 33,419 characters. The
55
- background-compaction fixture classified the failure as permanent and ran
56
- one functional session.
57
- - `npm pack --dry-run --json` lists **75 files**, including the entry, runtime,
58
- prompts, configuration example and schema, license, code of conduct, 0.3.0
59
- release notes and the new demonstration media. Tests, private settings and
60
- `.local/` records are excluded.
61
- - These release fixtures make no paid-model request or real Azure publication.
62
- The live adjustment runs below used the earlier `cbbed6b` implementation;
63
- the subsequent persistence, read-back and final-summary fixes have offline
64
- regression tests. Host fixtures exercise the surrounding workflow.
65
- - A live run on the candidate's runtime was recorded for the
66
- [demonstration](DEMO.md): OpenCode 2.1.4 with `openai/gpt-6-luna`, the plugin
67
- installed from public Git commit `dfba561`, on the 1-file test PR. The review
68
- completed in 66 seconds with three confirmed findings and two merged
69
- duplicates, and its automatic preview took 14 seconds. `--exclude F-3
70
- --severity F-2=low` planned a new preview in 8 seconds with one inline
71
- comment and F-2 in the summary only. Publication posted the summary and that
72
- comment, both read back as `VERIFIED`, and a repeated publication reported
73
- `ALREADY_PRESENT=2`. This run took the normal adjustment and publication
74
- path; the failure paths of the later fixes are covered by the offline tests.
75
-
76
- This is a pre-publication record. Public Git installation and clean-source
77
- archive acceptance are checked on the release candidate; registry integrity
78
- and installation from npm are checked only after publication, following the
79
- [releasing guide](RELEASING.md). This record does not claim a published 0.3.0
80
- package has been tested.
81
-
82
- ## Adjusting findings after a preview (2026-10-25)
83
-
84
- Commit `cbbed6b` (branch `comment-adjustments`) was installed through
85
- OpenCode's plugin manager as `github:WTLAIB/opencode-azure-devops-pr-review-v2#cbbed6b…`
86
- on the OpenCode 2.1.4 service (its 29 installed files equal the commit), with
87
- gpt-6-luna for every review and quick role, gpt-6.1-sol for every deep role,
88
- output in zh-TW and `afterReview` none for every mode; the service was restored to the published 0.2.3 package
89
- afterwards. Every command ran in the conversation of its review unless noted.
90
- Before the runs that publish, the earlier AZPR comments of the 1-file PR were
91
- deleted and the local publication records of the 1-file and 316-file PRs were
92
- moved aside, so that comments on the same lines were posted again instead of
93
- being reported as `DELETED`.
94
-
95
- **Preview only, with the earlier comments still on the 1-file PR.** Its four
96
- AZPR threads made the planner skip all three findings as already discussed, so
97
- these previews had no inline comment.
98
-
99
- | Command | Planner input | Result | Planning |
100
- | --- | --- | --- | --- |
101
- | `/pr-review <URL>` | — | COMPLETE in 89 s: 6 candidates, 3 confirmed medium findings F-1, F-2, F-3 (the 3 known defects) | — |
102
- | `/pr-comment` | F-1, F-2, F-3; no `adjustments` field | Index medium 3; the review note named the snapshot, reservation and ordering contracts | 1 request, 9 s |
103
- | `/pr-comment <id> --show` | — | The saved preview; no model or Azure DevOps request | — |
104
- | `/pr-comment <id> --exclude f1` | F-2, F-3; `adjustments.excludedFindings` F-1 | Index medium 2; F-1 named nowhere, and the note no longer mentioned the snapshot contract | 1 request, 12 s |
105
- | `/pr-comment <id> --severity F-2=low,F-3=high` | F-2 low, F-3 high; F-1 still excluded; `severityChanges` | Index high 1, low 1; F-2 skipped as low severity | 1 request, 5 s |
106
- | The same adjustments again | — | "already has these adjustments; nothing was planned"; no model | — |
107
- | `/pr-comment <id> --reset` | F-1, F-2, F-3; no `adjustments` field | Index medium 3, as before the adjustments | 1 request, 8 s |
108
-
109
- **The 1-file PR without earlier comments** (three reviews, each COMPLETE in
110
- 86–93 s):
111
-
112
- - Review A: excluding all three findings answered `NOTHING_TO_POST` in 3 s
113
- without a model, and `--publish` posted nothing. `--exclude none` stopped
114
- with `/pr-stop` while it was planned ended `CANCELLED` with the adjustment
115
- saved and no preview: `--publish` was refused ("was adjusted and has no
116
- preview planned since") and `--show` reported no saved preview. Setting all
117
- three to low then planned a summary without inline comments, which was posted.
118
- - Review B, of the same commit: excluding one finding and setting the other two
119
- to low gave a summary with the marker of review A's summary. Publication
120
- skipped it as `ALREADY_PRESENT`, and the receipt said that the PR keeps its
121
- earlier text, which may still list findings you excluded. Afterwards
122
- `--exclude none` and a plain `/pr-comment <id>` were refused, `--show` said
123
- that publication had started, and `--publish` again changed nothing.
124
- - Review C confirmed five medium findings, two pairs of them the same defects
125
- from both reviewers (F-1 and R-1, F-2 and R-3). `--exclude R-1,R-3 --severity
126
- R-2=high,F-2=low` planned 2 inline comments (R-2 high, F-1 medium) and a
127
- summary with high 1, medium 1, low 1; all three were posted and read back,
128
- and no posted text names R-1 or R-3. They were deleted again before the deep
129
- run below.
130
- - `/pr-deep` COMPLETE in 116 s: 6 candidates, 3 confirmed medium findings
131
- (the verifier merged the duplicates). `--exclude F-3 --severity F-1=high`,
132
- planned by gpt-6.1-sol in 19 s (1 request, no correction turn), gave 2 inline
133
- comments (F-1 high, F-2 medium) and a summary with high 1, medium 1; all
134
- three were posted and read back with the gpt-6.1-sol disclosure, and no
135
- posted text names F-3. Afterwards an adjustment was refused and `--publish`
136
- again reported `ALREADY_PRESENT` for all three. These comments are kept on
137
- the PR.
138
-
139
- **The 316-file PR** (no comments before):
140
-
141
- - `/pr-quick` COMPLETE in 186 s (48 findings reported), preview with 25 inline
142
- comments, 13 of them combining findings of two shards. `--exclude Q-11001
143
- --severity Q-12014=medium,Q-1013=low` (preview only, 102 s): Q-1001, combined
144
- with Q-11001 before, got a comment of its own; Q-12014, raised from low, was
145
- combined with Q-1022 on the same line; Q-1013 stayed in the summary only; the
146
- disclosure still says the review was not independently verified, and the
147
- preview names Q-11001 nowhere.
148
- - `/pr-review` COMPLETE in 333 s: 27 confirmed (37 merged), preview with 26
149
- inline comments and 1 low finding in the summary. R-1009, R-1010 and R-1011
150
- repeat F-1009, F-1010 and F-1011 from the other reviewer.
151
- - Refused without a change: the same command from another conversation ("No
152
- completed review is available for this conversation"), `--exclude F-9999`
153
- ("not a finding of review …", listing the IDs that can be adjusted) and
154
- `--exclude R-1001` ("was merged into F-1001; adjust F-1001 instead").
155
- - `--exclude R-1009` with the OpenCode service restarted while it was planned:
156
- the service reloaded in 7 s; `--show` reported no saved preview and
157
- `--publish` was refused. A plain `/pr-comment <id>` then planned the preview
158
- with R-1009 still excluded (85 s).
159
- - `--exclude R-1009,R-1010,R-1011 --severity F-1013=high,F-1016=low,F-1022=medium`
160
- (63 s) planned 23 inline comments and a summary with high 5, medium 18, low 1:
161
- F-1013 titled high, F-1022 (raised from low) with an inline comment, F-1016
162
- in the summary only. All 24 items were posted and read back; the three
163
- repeated defects have one comment each, and no posted text names R-1009,
164
- R-1010 or R-1011. After publication, adjustments and a plain re-plan were
165
- refused and `--publish` again reported `ALREADY_PRESENT` for all 24 items.
166
- These comments are kept on the PR.
167
-
168
- No planning stage of these runs needed a correction turn, and the runtime's
169
- check for published text that names an excluded finding never had to act: the
170
- model left excluded findings out of its text. That check, and the receipt line
171
- that counts other AZPR comments of the PR, are covered by the offline tests
172
- only.
173
-
174
- ## 0.2.3 release acceptance (2026-10-24)
175
-
176
- Environment: Ubuntu 22.04.5 under WSL2, Node 22.23.3 and OpenCode CLI 2.1.4.
177
- This release carries the OpenCode 2.1.4 changes recorded
178
- [below](#opencode-214-the-tested-host-2026-10-24): the refused-tunnel mapping,
179
- the Azure DevOps call timeout and the overflow classification after a refused
180
- background summary. Prompts, settings and installers are unchanged from 0.2.2.
181
-
182
- - `npm run check` and **394 offline tests** passed.
183
- - All five real-host fixture runs passed with isolated profiles and fake model
184
- and Azure services: fresh source installation, replacement installation,
185
- native packed package installation, comment scale, and background
186
- compaction followed by a permanent failure. The fresh and native runs
187
- include the authenticating proxy, the untrusted certificate and the 407. The
188
- scale fixture split the overflowing shard and used eight planning sessions
189
- with at most two in flight; its largest provider request was 33,419
190
- characters. The background-compaction fixture ran one functional session,
191
- classified permanent.
192
- - `npm pack --dry-run --json` lists **70 files** (about 882 KB), including the
193
- entry, runtime, prompts, configuration example and schema, license and the
194
- new release notes. It excludes tests, private settings and `.local/` records.
195
- - The release notes use absolute HTTPS links; the relative links and anchors
196
- of the README, quickstart, changelog and the changed guides resolve.
197
- - These fixtures make no paid-model request or real Azure publication. The
198
- live reviews on 2.1.4 preceded the call-timeout and background-summary
199
- changes. Public Git installation, archive acceptance, and post-publication
200
- registry integrity and native installation are checked on the pushed commit
201
- and the published package as the [releasing guide](RELEASING.md) describes.
202
-
203
- ## 0.2.2 release acceptance (2026-10-23)
204
-
205
- Environment: Ubuntu 22.04.5 under WSL2, Node 22.23.3 and OpenCode CLI 2.1.2.
206
- This release updates documentation and package metadata. The runtime, prompts,
207
- settings and installers are unchanged from 0.2.1.
208
-
209
- - `npm run check` and **392 offline tests** passed.
210
- - All four real-host fixtures passed with isolated profiles and fake model
211
- and Azure services: fresh source installation, replacement installation,
212
- native packed package installation and comment scale. The native fixture
213
- covers first-run setup, default external settings and `options.settingsFile`.
214
- The scale fixture used eight planning sessions with at most two in flight;
215
- its largest provider request was 33,479 characters.
216
- - `npm pack --dry-run --json` lists **69 files**, including the entry, runtime,
217
- prompts, configuration example and schema, license and the new release notes.
218
- It excludes tests, private settings and `.local/` records.
219
- - The release notes use absolute HTTPS links. Current installation commands,
220
- local documentation links and anchors were checked, and the existing
221
- demonstration remains linked to its original v0.2.0 release.
222
- - These fixtures make no paid-model request or real Azure publication. Public
223
- Git installation, archive acceptance, and post-publication registry integrity
224
- and native installation results are not included in this pre-publication
225
- record; they are recorded separately under the [releasing guide](RELEASING.md).
226
-
227
- ## 0.2.1 release acceptance (2026-10-23)
228
-
229
- Environment: Ubuntu 22.04.5 under WSL2, Node 22.23.3 and OpenCode CLI 2.1.2.
230
- The release publishes the 0.2.0 runtime to the npm registry as
231
- `opencode-azure-devops-pr-review`; it changes package metadata, documentation
232
- and test tooling only.
233
-
234
- - `npm run check` and **392 offline tests** passed. New tests check that the
235
- package is publishable (no private flag, dependencies or install scripts),
236
- that the changelog, release notes, README and quickstart name its version,
237
- and that release notes, which become the GitHub Release body, link only
238
- absolute URLs.
239
- - All four real-host fixtures passed with isolated profiles and fake model
240
- and Azure services: fresh source installation, replacement installation,
241
- native packed package installation and comment scale (eight planning
242
- sessions with at most two in flight; largest provider request 33,419
243
- characters). The native fixture now also checks that the copy OpenCode
244
- installed in its package cache holds no settings.
245
- - `--native --package` installed the public v0.2.0 Git tag through the plugin
246
- manager and passed the same native workflow; this is the option used to
247
- check the published npm package.
248
- - `npm pack --dry-run --json` for `opencode-azure-devops-pr-review@0.2.1`
249
- lists 68 files (about 874 KB): the entry, runtime, eight prompts,
250
- configuration example and schema, license and release notes. No private
251
- settings, tests or `.local/` files are included.
252
- - Relative links and anchors in the changed documentation resolve.
253
- - Publication to npm and the checks after it (registry integrity, the native
254
- fixture against the registry package) follow the [releasing guide](RELEASING.md)
255
- once the tag exists; they are not part of this record. No live model request
256
- or Azure publication was made.
257
-
258
- ## 0.2.0 release acceptance (2026-10-23)
259
-
260
- Environment: Ubuntu 22.04.5 under WSL2, Node 22.23.3 and OpenCode CLI 2.1.2.
261
- The release packages the automatic-comment implementation merged in PR #18;
262
- release preparation changes version metadata and documentation only.
263
-
264
- - `npm run check` and **389 offline tests** passed.
265
- - All four real-host fixtures passed with isolated profiles and fake model
266
- and Azure services: fresh source installation, replacement installation,
267
- native packed package installation and comment scale. They exercise
268
- automatic preview/publication, held items, no-findings and repeated-summary
269
- handling, cancellation, restart, overflow splitting and idempotent writes.
270
- The scale fixture used eight planning sessions with at most two in flight;
271
- its largest provider request was 33,470 characters.
272
- - `npm pack --dry-run --json` includes the entry, runtime, eight prompts,
273
- configuration example/schema, license and release notes. No private settings
274
- or `.local/` files are included.
275
- - A clean Git archive passed fresh and replacement source installation,
276
- runtime/entry, license and prompt checks. An actual v0.1.0 source installation
277
- upgraded with `--replace`, preserving its settings and adding `afterReview`
278
- as `none` for every mode. Unrelated files and owner-only settings permissions
279
- were preserved. Archive-relative documentation and image links were checked;
280
- two obsolete MCP links in the historical record now point to the original
281
- version of that document.
282
- - The release reuses the inspected v0.1.0 demonstration video unchanged. Its
283
- recording date, source commit and manual workflow remain explicit in the
284
- demo guide. No live model request or Azure publication was made for this
285
- release acceptance; the development evidence below records earlier live runs.
286
-
287
- ## Automatic comments after a review (0.2.0 development, 2026-10-22 and 23)
288
-
289
- Environment as below (Ubuntu 22.04.5 under WSL2, Node 22.23.3, OpenCode CLI
290
- 2.1.2). `afterReview`, the review commands' `--preview`, `--publish` and
291
- `--no-comment` flags, the safeguards of automatic publication and the setup
292
- problem messages were added on top of 0.1.0; review prompts were unchanged.
293
-
294
- - `npm run check` and **387 offline tests** passed. The new tests cover the
295
- setting (defaults, partial objects, values never echoed), the flag parser
296
- (one flag right after the URL, refused typos, dashes and second flags,
297
- `/pr-check` taking none, context starting after the flag), the hand-off
298
- (a COMPLETE review previews or publishes in a run of its own; STALE and
299
- cancelled reviews hand on nothing; a review without findings gets one
300
- notice and no model request; a flag overrides the setting both ways), the
301
- safeguards item by item (an `@<…>` mention, an image, HTML that embeds
302
- content or runs a script, or a `javascript:`, `vbscript:`, `data:` or
303
- `file://` link in the summary or an inline comment holds back that item
304
- while the others are posted and read back, and a typed `--publish` then
305
- posts it; mentions and script links also when written with backslash
306
- escapes or character references; when every item is held nothing is
307
- posted; when the PR changed before publication the run is STALE, posts
308
- nothing and does not offer the held items), what passes (ordinary links, also encoded, protocol-relative, in
309
- reference definitions inside block quotes and list items, `mailto:` and
310
- email autolinks; markup such as `<input name="id">` or `<a href>`;
311
- generics, decorators, AZPR's marker and its own `&lt;!--` escaping), a
312
- quick review whose high-severity finding or incomplete coverage is posted
313
- with the quick disclosure and an advisory hint, a plan that would only
314
- repeat the summary because every finding is already discussed on the PR
315
- (`NOTHING_TO_POST`, while a typed `--publish` still posts it), a
316
- `/pr-stop` that arrives while a finished review's report is delivered (the
317
- review stays COMPLETE and nothing follows), a PR held by another comment
318
- command, `/pr-stop` of the automatic step, the `/pr-check` row (information,
319
- no warning), the installer adding `afterReview` and setup naming the problem
320
- without values. Removing any one safeguard, the per-item filter, the
321
- nothing-new rule, the no-findings check, the busy-lock handling, the typo
322
- refusal or the setting itself makes a test fail; so does holding ordinary
323
- links or `<a>` again, or offering held items for publication after a STALE
324
- check (14 mutations of this revision's changes, all caught).
325
- - All four real-host fixtures passed on OpenCode 2.1.2 with fake model and
326
- Azure services: fresh, replacement and native installation, and comment
327
- scale. The smoke fixture additionally ran `/pr-review <URL> --preview`
328
- (COMPLETE, then a PREVIEW in a run of its own, nothing posted),
329
- `/pr-quick <URL> --publish` with a high-severity finding (POSTED, no item
330
- held; its markers were settled by an earlier step, so nothing new was
331
- created), `/pr-review <URL> --publish` with an image in its inline comment
332
- (the summary POSTED and read back, VERIFIED=1, that comment held back with
333
- the reason; a typed `/pr-comment <id> --publish` then posted it with the
334
- summary ALREADY_PRESENT and no model request), a quick review without
335
- findings (one notice and no further provider request), and, after a restart
336
- with `afterReview.review: publish`, a plain `/pr-review` whose automatic
337
- publication was POSTED and read back (VERIFIED=2), then the same review
338
- again with every finding planned as already discussed by that comment:
339
- `NOTHING_TO_POST`, no second summary.
340
- - The 15 comment previews saved from real reviews (76 items) contain none of
341
- the held constructs, so the item checks hold back nothing in them. The
342
- earlier quick-review rule would have held back one of them in full: a quick
343
- preview of the 316-file test PR with two high-severity findings (24 items),
344
- which is now posted with the quick disclosure.
345
- - **Live** with this revision installed in the user's OpenCode 2.1.2 service:
346
- gpt-6-luna for every role, `afterReview` none for every mode and `--preview`
347
- on the command, so nothing was posted. Times are from first stage start to
348
- last stage end.
349
- - The one-file test PR: `/pr-quick <URL> --preview` was COMPLETE in 36 s
350
- with two REPORTED findings (two of the three known defects), and its
351
- automatic preview took 6 s.
352
- `/pr-review <URL> --preview` was COMPLETE in 93 s with the three known
353
- defects confirmed, and its automatic preview took 24 s. Both previews
354
- proposed no inline comment: each finding was skipped as `existing-thread`,
355
- naming the demo threads that already discuss it.
356
- - The 35-file test PR: `/pr-quick <URL> --preview` was COMPLETE in 44 s
357
- with no finding (both seeds missed). It got the one notice (`Automatic preview skipped: the
358
- review has no findings to comment on …`) and no planning session.
359
- `/pr-review <URL> --preview` was COMPLETE in 88 s with the seeded
360
- millisecond-format regression confirmed; the other seed was missed, as
361
- in earlier gpt-6-luna runs. Its automatic preview took 10 s and proposed
362
- one inline comment.
363
- - Each automatic preview started less than a second after its review's
364
- last stage, as a run of its own. Its STARTED notice and receipt named the
365
- source (`--preview`), and its Azure DevOps calls were reads only.
366
- `/pr-check` was READY with the new `Automatic comments` row
367
- (`afterReview: review none, deep none, quick none (no automatic
368
- comments)`).
369
- - Earlier attempts that day failed before any model request
370
- (`provider.auth`: the OpenAI sign-in could not be refreshed until it was
371
- renewed). Those INCOMPLETE reviews started no comment step.
372
- - **Live automatic publication**, with the user's consent, on the 35-file test
373
- PR: gpt-6-luna, `/pr-review <URL> --publish`. Before the first run the PR's
374
- publication record was moved aside: it held seven comments from an earlier
375
- test that had been deleted on the PR, and with it AZPR would have reported
376
- matching items as `DELETED` instead of posting them.
377
- - The first review was COMPLETE in 92 s with the millisecond-format seed
378
- confirmed. Its automatic publication, a run of its own, planned the
379
- summary and one inline comment on `json_schema.py:874` and posted both in
380
- 10 s: VERIFIED=2, read back from Azure DevOps, and an independent thread
381
- listing went from 0 to 2 live AZPR comments. No safeguard applied:
382
- the findings were verified, and the text had no link, mention, image or
383
- HTML.
384
- - A second `/pr-review <URL> --publish` of the unchanged head confirmed the
385
- same finding (76 s). Its planner skipped the finding as `existing-thread`,
386
- naming the inline comment just posted, so no inline comment was repeated.
387
- The summary's marker depends on the set of inline comments, though, so
388
- the summary differed from the first one and was posted again (VERIFIED=1,
389
- 3 live AZPR comments).
390
- - That repeated summary led to the repeated-summary rule: automatic
391
- publication posts no summary for such a plan (no inline comment, every
392
- finding skipped as `existing-thread` with a live thread). It first kept
393
- the plan to a preview; it is now `NOTHING_TO_POST` (below).
394
- - **Live, with the review fixes** (the repeated-summary rule, links and
395
- mentions checked after decoding, and no hand-off after a stop during report
396
- delivery), on the same PR with those comments deleted and its record moved
397
- aside again, six more `/pr-review <URL> --publish` runs:
398
- - Two reviews confirmed the millisecond-format seed. The first was posted
399
- automatically in 9 s (summary and one inline comment,
400
- VERIFIED=2, two thread creations). The decoded checks found nothing in
401
- the real comment text.
402
- - The second, run while that inline comment was live, was held back to a
403
- preview in 4 s with "every finding is already discussed on the PR
404
- (thread …), so there is no new inline comment and only a repeated
405
- summary would be posted", and created no thread (the behavior of that
406
- revision; see below for `NOTHING_TO_POST`).
407
- - Four reviews confirmed no finding: three had no candidate and one had a
408
- candidate that verification did not confirm. Each got only the
409
- "Automatic publication skipped: the review has no findings to comment on"
410
- notice, with no planning session and no write.
411
- - A stop during report delivery and encoded links cannot be produced on
412
- demand with a real model; those cases are covered offline. The test
413
- comments were deleted afterwards.
414
- - **Live, with the per-item safeguards** (the revision before the literal-code
415
- rule below), on the same PR with those comments deleted and its record
416
- moved aside again, two `/pr-review <URL> --publish` runs with gpt-6-luna:
417
- - The first review was COMPLETE in 73 s with the millisecond-format seed
418
- confirmed. Its automatic publication posted the summary and one inline
419
- comment on `json_schema.py:874` in 9 s: VERIFIED=2, no item held, and an
420
- independent thread listing went from 0 to 2 live AZPR comments.
421
- - The second review of the unchanged head confirmed the same finding
422
- (84 s). Its automatic run took 7 s: the planner skipped the finding as
423
- already discussed in the inline comment just posted, and the run ended
424
- `NOTHING_TO_POST` with "Automatic publication found nothing new to post:
425
- every finding is already discussed on the PR (thread …). The plan is
426
- saved." It made two Azure DevOps reads and no write; the listing stayed
427
- at 2 live AZPR comments.
428
- - The real comment text again had none of the held constructs. The test
429
- comments were deleted afterwards.
430
- - **Literal code** (the revision before the closed gaps below, after an
431
- external review found that a code example such as `` `<img src="avatar.png">` ``
432
- or a fenced `<script>` example still held back its comment): the checks
433
- other than mentions now skip fenced code and code spans where every reading
434
- of the Markdown agrees.
435
- - `npm run check` and **388 offline tests** passed. The review's four
436
- examples are posted; texts whose backticks or fences could be read
437
- another way stay checked (an escaped backtick, a span across lines or a
438
- heading, a link destination, attribute value, math or bare address that
439
- takes a backtick, a backslash that a linked address takes along, a pipe
440
- in a table cell, an HTML block, a fence in a list or indented, a table
441
- header, a backtick in the info string, CRLF closers, UTF-16 offsets after
442
- emoji), and mentions stay checked in code. Removing any one of those
443
- rules, or blanking nothing, makes a test fail (18 mutations); the 13
444
- mutations of the previous revision are still caught. A 176,000-character
445
- summary is checked in 15 ms, and the check is linear (a 400,000-character
446
- line of code spans: 150 ms).
447
- - Differential fuzzing against commonmark.js 0.31.2 and markdown-it 14.1.0
448
- (`html` and `linkify` on), outside the repository: 1,000,000 generated
449
- texts, half random tokens and half templates that put a backtick-taking
450
- construct before code with markup, blanked about 240,000 code spans and
451
- 124,000 fenced lines; on its source line none of them was raw HTML, a
452
- link or image destination, or image text for either renderer. Copies
453
- with one rule removed were caught each time (from 24 to 2,191 hits per
454
- 100,000 texts); two such cases found this way, a backslash or escaped
455
- backtick taken into a linked address, are fixed and tested.
456
- - Rendering both renderers' HTML with parse5 7.1.2 over 300,000 texts:
457
- about 6,600 per 100,000 that the previous revision held are now posted,
458
- and all but 0 to 6 of them render no active markup. Those few contain
459
- `<!X…>` or `<?…>`, which browsers turn into comments and no rule checks;
460
- the previous revision held them only because of code elsewhere in the
461
- text. The same run found the gaps closed below.
462
- - All four real-host fixtures passed on OpenCode 2.1.2. The 15 previews
463
- saved from real reviews still have no held item. No live run: real
464
- comment text has not contained the held constructs, in code or not.
465
-
466
- - **Closed gaps of the literal HTML checks** (the revision before script links
467
- with a tab or line break, below): HTML that
468
- hides text (a comment, `<!…>`, `<?…>` or `</` without a tag name, which a
469
- browser turns into a comment) is a kind of its own; attributes are also read
470
- the way a browser reads a tag (a quoted value may hold `<` and `>`, a slash
471
- separates attributes, a tag name runs to a space, slash or `>`, and every
472
- `<` may start a tag, since a renderer may show an earlier one as text); and
473
- code in a paragraph that runs into the first line where blanking stops is
474
- checked as written.
475
- - That last rule closes a literal-code case the previous revision posted:
476
- once a link label's lookahead in markdown-it 14.1.0 reaches an unpaired
477
- backtick later in the paragraph, markdown-it reads every earlier backtick
478
- as text, so `` [`![a](b.png)` x `` followed by `<b>`` ` `` on the next line
479
- renders an image. Extended fuzz templates found it; a copy without the
480
- rule has 244 such cases per 100,000 texts.
481
- - `npm run check` and 388 offline tests passed. 11 mutations of these rules
482
- (each hidden-text form, the browser reading of attributes and its every-`<`
483
- start, attribute-name case, the shared attribute list, the paragraph at a
484
- stop) are caught, as are the 18 and 13 of the two revisions before.
485
- Reading attributes from every `<` stays linear: 100,000-character
486
- adversarial texts take 12 to 40 ms.
487
- - Gap statistics with parse5 over both renderers' HTML (100,000 texts each,
488
- random tokens and templates): the previous revision missed 2,235 hidden
489
- comments and 1,344 active attributes behind quotes or unusual tag names;
490
- this revision misses none of either. Against the previous revision, no
491
- text that it held is posted now (200,000 texts). The exact check of
492
- blanked code found nothing active in 1,000,000 texts.
493
- - All four real-host fixtures passed on OpenCode 2.1.2. No live run.
494
-
495
- - **Script links with a tab or line break** (the revision before linear
496
- attribute reading, below): a browser drops
497
- tabs and line breaks from a URL, so `<a href="java&#9;script:…">`, or one
498
- with a raw tab or line break inside the scheme, is a script link. The
499
- script-link check now also reads the text, as written and decoded, without
500
- them, and character references are decoded as a browser decodes them in
501
- raw HTML: numeric ones with any number of digits or without a semicolon,
502
- and `&Tab;` and `&NewLine;`.
503
- - `npm run check` and 388 offline tests passed. 7 mutations of these rules
504
- are caught, as are the 19, 10 and 13 of the revisions before.
505
- - The fuzz detector now reads a URL as a browser does (leading and trailing
506
- control characters and spaces trimmed, tabs and line breaks removed).
507
- With it, the previous revision missed 674 such links per 100,000 texts;
508
- this revision misses none, and over 500,000 texts the gap statistics
509
- found no active construct that the checks miss. No text the previous
510
- revision held is posted now (200,000 texts), and the exact check of
511
- blanked code found nothing active in 300,000.
512
- - All four real-host fixtures passed on OpenCode 2.1.2. The 15 previews
513
- saved from real reviews still have no held item. No live run.
514
-
515
- - **Linear attribute reading** (this revision, after an external review found
516
- that reading attributes from every `<` rescanned the rest of a tag name
517
- each time): a tag name runs to a space, slash or `>`, so a long run such as
518
- `<a<a<a…`, also inside a quoted value, took quadratic time and blocked the
519
- plugin while the check ran. The end of every tag name, attribute name and
520
- value is now looked up in tables built once per text, and each point
521
- between attributes is read once. Attributes are separated by ASCII
522
- whitespace only, as in a browser, since a no-break space ending a value
523
- could pair quotes differently and hide an `on…=`.
524
- - Measured on the same machine for `<a` repeated: 212, 854 and 3,439 ms for
525
- 32,000, 64,000 and 128,000 characters before; 20, 18, 32 and 62 ms for
526
- 32,000 to 256,000 characters now. The same inside a quoted value: 245 and
527
- 883 ms for 32,000 and 64,000 characters before; 65 and 136 ms for 64,000
528
- and 256,000 now. Other repeated tag-like units of 256,000 characters take
529
- 47 to 122 ms, and 40 random 100,000-character tag-like texts at most
530
- 56 ms.
531
- - `npm run check` and **389 offline tests** passed, among them a test that
532
- bounds the time for five long tag-like texts and one for the no-break
533
- space. 9 mutations of the reading (the tables, the quoted values, slashes,
534
- name case, every `<` as a start, ASCII whitespace, the read points, long
535
- event-handler names, a rescanned tag name) are caught, the slow ones by
536
- the time bound, as are the 19, 7 and 13 of the revisions before.
537
- - Fuzzing: no gap over 200,000 texts, the same holds as the previous
538
- revision on 200,000, and nothing active in blanked code on 100,000. All
539
- four real-host fixtures passed on OpenCode 2.1.2. No live run.
540
-
541
- ## 0.1.0 release acceptance (2026-10-22)
542
-
543
- Environment: Ubuntu 22.04.5 under WSL2, Node 22.23.3 and OpenCode CLI 2.1.2.
544
- The native package entry and first-run setup were added on top of the merged
545
- 2.1.2 compatibility revision (`e1597ca`); review prompts were unchanged.
546
-
547
- - `npm run check` and **367 offline tests** passed. The ten setup tests cover
548
- settings-path precedence, literal argument parsing, unavailable models and
549
- variants, private PAT-file validation, refusal to overwrite without
550
- `--replace`, preservation of advanced settings, atomic saves and blocked
551
- review commands before setup. They make no model or Azure requests.
552
- - All four real-host fixtures passed with isolated profiles and fake model
553
- and Azure services: fresh source installation, replacement installation,
554
- native package installation and comment scale. The native fixture packs the
555
- package, installs an isolated Git commit through `opencode plugin add`,
556
- configures it with `/pr-setup`, restarts the host and exercises the review
557
- and publication workflow. Both the default external settings path and
558
- explicit `options.settingsFile` work; the file remains mode 600 and is
559
- outside the package cache.
560
- - A separate clean profile installed public GitHub commit `f323aaa` with the
561
- documented `github:WTLAIB/opencode-azure-devops-pr-review-v2#COMMIT` syntax.
562
- The actual cached entry loaded, setup blocked reviews until configuration,
563
- and restart enabled the review and quick agents with the external settings
564
- unchanged. This acceptance made zero model or Azure requests. A clean source
565
- archive also passed fresh and replacement installation, entry loading,
566
- license and prompt checks, and preservation of settings and unrelated files.
567
- - The scale fixture reviewed 120 changed files, recovered one overflow split,
568
- used seven functional, five risk and two verifier sessions plus one duplicate
569
- check, and planned eight pages with at most two in flight. Its largest
570
- captured provider request was 33,488 characters. It created 20 fake Azure
571
- threads and re-published without duplicates. These are controlled fixture
572
- measurements, not a bound on arbitrary real PRs or model behavior.
573
- - A separate **live** run used `openai/gpt-6-luna` for all three review roles
574
- against the dedicated one-file Azure test PR #2, head `e8fc383` and base
575
- `406f5b2`. Review `268cc3f3` completed in 65.0 seconds: six initial candidates,
576
- three CONFIRMED findings and three MERGED duplicates. The findings matched
577
- the fixture's seeded atomicity, snapshot-isolation and timestamp-ordering
578
- regressions. The reviewers did not execute the fixture's tests.
579
- - Its comment preview completed in 15.6 seconds with three inline comments
580
- and no skipped finding. Explicit publication took 1.5 seconds and read back
581
- four VERIFIED threads (one summary and three inline comments). A repeated
582
- publish took 0.5 seconds and reported four ALREADY_PRESENT items. An
583
- independent Azure REST GET also found exactly those four active threads;
584
- they were retained on the test PR. No active comment existed before this
585
- run, and historical deleted comments were left alone.
586
-
587
- The [demo](DEMO.md) uses the actual terminal output and actual Azure comment
588
- read-back from this run. It shortens waits and navigation, as documented with
589
- the recording. It is evidence of this workflow on this test PR, not a claim of
590
- general model accuracy, and the Azure read-back is terminal output rather than
591
- an Azure web UI screenshot. The live run used an isolated source installation;
592
- native setup and package loading were tested separately by the host fixture.
593
-
594
- The first CI native-package run failed before the TUI admitted its startup
595
- command. Local failure traces and the OpenCode 2.1.2 source identified a startup
596
- race: `--prompt` can run before plugin commands reach the TUI catalog and become
597
- an ordinary model prompt. CI did not retain its raw terminal capture, so that
598
- run's cause cannot be established from its log alone. The fixture now waits for the actual native command in
599
- slash completion and submits it interactively, preserving both new/existing
600
- conversation and same-TUI cancellation checks. The runtime was unchanged;
601
- the [troubleshooting note](DEBUGGING.md#a-startup-slash-command-becomes-an-ordinary-prompt)
602
- records the host limitation.
603
-
604
- ## Onboarding and source distribution (2026-10-19)
605
-
606
- The `codex/project-launch` changes, based on `d7cd0ac`, add onboarding,
607
- synthetic demo assets, an MIT license and release preparation. The installer
608
- now includes the license in the installed package; the documented minimal
609
- source package contains 31 files (30 since `deep.md` was dropped, see
610
- [deep versus review](#deep-versus-review-2026-10-19)). Review and publication
611
- runtime code and prompts are unchanged.
612
-
613
- - `npm run check` and all **345 tests** passed, including the updated manual
614
- source-package list, directory loading and installed license contents.
615
- - Fresh and replacement installation passed with **OpenCode 2.0.32**. The
616
- comment-scale fixture passed with 120 changed files, eight planner sessions,
617
- at most two planning sessions in flight and 20 fake Azure threads.
618
- - These host tests use loopback fake Azure DevOps and model services in
619
- isolated directories. No live model or Azure publication was run for this
620
- documentation/distribution change.
621
- - Local guide links and anchors were checked. The demo's synthetic finding
622
- passes the actual comment-plan validator and renderer; the SVG and GIF were
623
- inspected visually. They demonstrate presentation, not model accuracy or
624
- real Azure UI rendering.
625
-
626
- At that point, the 0.1.0 release notes were still a draft. See the release
627
- acceptance above for the subsequent native package and recorded live run.
628
-
629
- ## Environment
630
-
631
- Ubuntu 22.04.5 LTS (WSL2, kernel 6.18), Node 22.23.3, OpenCode CLI 2.0.22,
632
- Azure DevOps Services REST api-version 7.1. Date: 2026-10-10. From
633
- 2026-10-17 the tested host was OpenCode CLI 2.0.32
634
- ([below](#opencode-2032-2026-10-17)), from 2026-10-22 2.1.2
635
- ([below](#opencode-212-2026-10-22)); since 2026-10-24 it is 2.1.4
636
- ([below](#opencode-214-the-tested-host-2026-10-24)).
637
-
638
- ## Offline tests
639
-
640
- `npm run check` and `npm test` pass: 384 tests across settings (including the
641
- `mcp` → `azure` migration, the proxy and TLS settings and `afterReview`), host helpers, session
642
- transport, the shared queue,
643
- the REST client (change paging, merge base, error classes, retries, timeouts
644
- that abort requests, binary and oversized files, the per-run cache, PAT never
645
- logged, commit messages, the repository zip with a streaming size limit, proxy
646
- and TLS options on every request, certificate, proxy-authentication, gateway and
647
- Bun connection errors, proxy credentials never logged),
648
- content search (zip reading, refused ZIP64, encrypted and damaged archives,
649
- literal, case and whole-word matching, path filters, result bounds, one archive
650
- per run and commit), line diffs (minimal edits checked against brute force on random
651
- inputs, context, enclosing blocks, folded repeats, and every changed line shown
652
- in a hunk or a folded repeat on random inputs), the reviewers' tools
653
- (diffs of edited, added, deleted and renamed files, paging, file and content
654
- search, optional arguments sent as null or blank text),
655
- output acceptance and correction prompts (including verifier rows judged by
656
- their own fields, confirmations that move a finding to another file and the
657
- same-file duplicate check), comment validation and markers (including skips
658
- that rely on another finding, and skip causes checked against the finding, the
659
- page's source excerpts and the live threads, and pages of a large PR carrying
660
- only their own files and dispositions), planning and publication, review sharding,
661
- persistence, rendering, installation (including an output pipe closed
662
- mid-install, which used to leave the lock and a staged copy of the previous
663
- settings) and the runtime integration (fake host plus a fake Azure DevOps REST
664
- service, including session deletion when the host never confirms one, a host
665
- retry that OpenCode prepares again, the stage inactivity watchdog stopping,
666
- naming and retrying a stalled stage while steady activity, streamed output, a
667
- slow AZPR tool and an announced retry wait are never stopped, a PR without changed files, a
668
- review without candidate findings that still gets its verifier, the token usage
669
- kept per request in stage records, the project boundary for private roles
670
- whatever the host's default for external directories, and the `/pr-check`
671
- warning on a host without the permission hook).
672
-
673
- The quick review (2026-10-18) adds tests for: one reviewer per shard and no
674
- verifier; REPORTED and NEEDS_INFO decided by the runtime's form and source
675
- checks (deleted, renamed, unchanged and binary files, line ranges, and reads
676
- counted only for the session that made them, never another shard's or the
677
- runtime's own, and only for versions whose source the answer showed, so a
678
- line, column or hunk past the end, an empty file or identical versions are no
679
- read; a diff showing only removed or only added rows, cut before the other
680
- version's rows or showing only folded repeats reads just what it showed, and
681
- an answer cut to the tool-output limit reads nothing);
682
- different defects on the same line kept apart while only
683
- records identical in every field are merged; a parsed answer without a usable
684
- review giving PARTIAL; zero findings with incomplete coverage (a failed shard,
685
- reviewer gaps, a partial change list); a usable PARTIAL answer that names
686
- unfinished work getting one follow-up turn in the same session (completed, a
687
- second PARTIAL that stands, none for COMPLETE answers, without turn budget or
688
- in the verified pipeline, and an unusable, failed or watchdog-stopped
689
- follow-up keeping the answer it followed while an overflow still splits the
690
- shard); the quick disclosure line, report and
691
- receipt; quick inline comments needing a changed HEAD file and an anchor found
692
- in the source; a saved quick review commented on after a restart, and saved
693
- records without a verification field trusted only for review and deep;
694
- quick-then-review publication where only an identical complete marker is
695
- ALREADY_PRESENT (the same anchor with a second defect posts ordinal 1); an
696
- unavailable quick model or a changed quick agent blocking only `/pr-quick`;
697
- the installer adding an empty `models.quick.reviewer`; and the review and deep
698
- system prompts byte-identical to the previous revision (SHA-256 per role).
699
- Combining cross-shard duplicates in comment planning adds tests for: candidate
700
- groups only across sessions, with one severity and overlapping lines (never
701
- within a session, across files, for summary-only or low findings, or beyond a
702
- page); groups kept on one page and oversized groups planned apart; the
703
- combination rules (a chain of overlaps with no common line or two members of
704
- one session refused, a missing reason, an anchor outside the shared lines,
705
- verified reviews never combining); a refused combination keeping valid single
706
- comments and accounting for every ID; separate comments on one line staying
707
- separate; summary rows and counts following accepted combinations only;
708
- `findingIds` in the ledger with older plans still readable; and, end to end,
709
- one comment for a duplicate pair that a refreshed preview and a second
710
- publish leave alone, a later `/pr-review` finding the combined comment by its
711
- ordinal-0 marker, and a combination that never meets the rules leaving both
712
- findings in the summary index.
713
- Planning two pages at a time (2026-10-19) adds tests for: a plan identical to
714
- planning one page at a time, finding by finding and marker by marker, when page
715
- 2 finishes first (including two pages quoting the same line, whose ordinals
716
- follow page order); at most `parallel` pages in flight and two lanes that do
717
- overlap; only the first page writing the summary note, a note from another page
718
- dropped without a correction turn while its details stay, and the first page's
719
- continuation still allowed to write it; a continuing page whose checkpoint and
720
- continuation evidence ignore another page's reads and details; after a failure
721
- no new page or continuation, a page still preparing its input starting no model
722
- work, the running page finishing before the failure is thrown, and the lower
723
- page's failure winning; anchor checks that see exactly the HEAD source of the
724
- page's own and earlier pages whichever fetch finishes first (review and quick);
725
- and, in the runtime, two planner sessions at once but one when
726
- `workflow.parallelSessions` is 1, session titles and evidence carrying the page,
727
- a failed page whose running neighbour finishes before INCOMPLETE, and `/pr-stop`
728
- cancelling both running pages and keeping no plan. Removing one rule at a time
729
- from a copy of the code (assembly in page order, the page's own observed
730
- source, page-scoped evidence, the check before a model call, the summary rule,
731
- waiting for running pages, two lanes, the `parallelSessions` cap, page labels,
732
- page-tagged evidence) made the matching tests fail; their waits are bounded, so
733
- a broken lane fails a test instead of hanging it.
734
- Dropping the deep-only prompt text (2026-10-19) changes the prompt test: every
735
- deep role must have the review role's system prompt and permissions with a
736
- different model, and the review roles keep their SHA-256 hashes; the installer
737
- and the manual copy list no longer carry `src/prompts/deep.md` (30 files with
738
- the license). New tests cover `/pr-check` saying that `/pr-deep` is off (no or
739
- only some deep models), would repeat `/pr-review` (the same models in all three
740
- roles, not when one differs) or lacks a model (a WARNING that leaves the check
741
- READY and `/pr-review` running), the command descriptions OpenCode lists and
742
- the error of an unconfigured `/pr-deep`.
743
- The PAT file (2026-10-21) adds tests for: `azure.patFile` as an absolute path in
744
- place of `azure.pat` and never both; a PAT read from an owner-only file that the
745
- fake service accepts, while neither the PAT nor the path appears in a receipt;
746
- a file that is missing, a symbolic link, a folder, readable by others, larger
747
- than 4 KB, empty, holding two tokens or a placeholder stopping the load with an
748
- error that never contains the content; a FIFO refused at once instead of
749
- waiting for a writer, which would hang loading and every later command; a replaced or newly shared file blocking
750
- new commands while the running review completes; and the installer adding an
751
- empty `azure.patFile` without printing the PAT. Removing each check from a copy
752
- of the code (mode, symbolic link, recheck before a command, the file's PAT
753
- used for requests, both settings at once, the content check, the non-blocking
754
- open) made its test fail.
755
- Comments deleted on the PR (2026-10-22) add tests for: a thread recognized as
756
- deleted when Azure DevOps lists it flagged deleted or with its first comment
757
- deleted and without content (a deleted reply leaves it live); a created item
758
- whose thread is deleted reported as `DELETED`, counted as settled and never
759
- posted again, by the same review or another one with the same marker, also
760
- when a run in between saw the comment and when the comment was found without
761
- a record of its own; a thread already deleted at read-back; and the receipt
762
- saying that `DELETED` items are not posted again and that `UNVERIFIED` items are
763
- never posted twice. The host fixture deletes the inline comment after the
764
- re-run and expects `DELETED` without a write. Reading back without the deleted
765
- check, or dropping the record of a comment once it is seen (the earlier
766
- behaviour, which posted it again after a deletion), made the matching tests
767
- fail.
768
- The move to OpenCode 2.1.2 (2026-10-22) adds tests for: a used-up provider
769
- quota (`provider.quota`) or OpenCode free-model limit (`provider.free-limit`)
770
- named in the stage error, with or without a valid HTTP status and without the
771
- provider's own text, classified as permanent, and, end to end, a 429 quota
772
- failure that starts no second session and says why in the receipt; and the
773
- tested host version. Removing the quota rule from a copy of the code made
774
- these tests fail.
775
- The move to OpenCode 2.1.4 (2026-10-24) adds tests for a proxy that refuses
776
- the CONNECT tunnel as Bun 1.4.4 reports it, a rejection with
777
- `ERR_PROXY_TUNNEL` and the proxy's status: 407, 403 and 502 keep the messages
778
- and retry rules of the answers Bun 1.4.2 returned, and a refused tunnel never
779
- makes a write uncertain. Removing the mapping, the not-sent code or the
780
- not-forwarded flag from a copy of the code made these tests fail. Every Azure
781
- DevOps request now also asks the runtime for no idle limit of its own
782
- (`timeout: false`), so `azure.callTimeoutSeconds` alone ends a silent call;
783
- removing the option made its test fail. A refused background summary no longer
784
- marks a stage as overflow: tests cover it followed by an HTTP 401 in the first
785
- turn and in a follow-up (permanent, no split, the earlier answer stands) and a
786
- failed turn with and without the host's compaction message. The previous code
787
- failed them.
788
-
789
- ## REST API version check
790
-
791
- Read-only requests against a live Azure DevOps Services organization: every
792
- resource AZPR uses reports a minimum version of 1.0 or 3.0, a released version
793
- of 7.1 and a maximum of 7.2. The PR, iterations, iteration changes, threads,
794
- item (raw and JSON) and folder requests returned identical fields on 5.0, 5.1,
795
- 6.0, 7.0, 7.1 and 7.2-preview. An invalid PAT or a missing credential returns
796
- HTTP 203 with an HTML sign-in page, an out-of-range version returns 400
797
- `VssVersionOutOfRangeException`, and a missing PR returns 404 `TF401180`. Thread
798
- creation with 7.1 was exercised in the live run below.
799
-
800
- ## Exact-host fixtures
801
-
802
- `tests/host-v2-smoke.mjs` (fresh install and `--replace`) runs the real OpenCode
803
- 2.0.22 binary with a loopback fake model provider, a loopback fake Azure DevOps
804
- REST service and one foreign stdio MCP server. Both passed:
805
-
806
- | Scenario | Observed |
807
- | --- | --- |
808
- | `/pr-check` | READY with zero model requests; REST reads only. |
809
- | `/pr-review` | COMPLETE; reviewers read HEAD through `azpr_read_file` and searched HEAD's file contents through `azpr_search_code` (one repository zip for the run); `shell`, `execute` and the foreign MCP tool were absent from every private model request; the verifier was corrected by one repair turn in the same session; the runtime read the change list and rechecked versions; PROGRESS notices reached the conversation; the review was persisted. |
810
- | `/pr-comment` | PREVIEW, then `--publish` POSTED one summary and one inline comment with markers and file context. |
811
- | Restart | After restarting the host, `/pr-comment --publish` returned POSTED with ALREADY_PRESENT, no new writes and no model request. |
812
- | Deleted comment (2026-10-22, OpenCode 2.0.32) | After the inline comment was deleted the way Azure DevOps deletes one (thread listed, flagged deleted, comment without content), `/pr-comment --publish` returned POSTED with that item `DELETED` and no new write. Fresh and `--replace` runs. |
813
- | Tool scopes | An ordinary conversation's model request carried the foreign MCP tool and no `azpr_*` tool. |
814
- | Unattended approvals | A reviewer's native `grep` on the repository path `/scale_lab` was refused with a pointer to the azpr tools (`permission.rejected`) instead of waiting; no approval request remained open. Since 2026-10-17 the fixture also greps `/etc`, an existing directory outside the project, which is refused with the same pointer on 2.0.22, 2.0.31 and 2.0.32 (see [OpenCode 2.0.32](#opencode-2032-2026-10-17)). |
815
- | `/pr-stop` | A review hanging at the provider was CANCELLED. |
816
- | Provider retry (2026-10-14) | The fake provider answered the risk reviewer's first request with HTTP 503. OpenCode retried it in the same session after its backoff (1.6–2.3 s in eleven runs, two of them in CI); AZPR's `retry` hook allowed it (attempt 2), the resend passed the primary-request check (4 authorized primary requests, none rejected) and the review was COMPLETE without a new session. Fresh and `--replace` runs. |
817
- | Stalled and long streams (fresh run, 2026-10-15) | With `workflow.stageIdleSeconds` 60, two reviews ran at once. In the first, the fake provider sent the functional reviewer's response headers and then nothing. After 60.0 s the watchdog stopped the stage: `failure=idle`, error `Stage inactivity watchdog stopped this stage: no activity for 60 s after model request 1 was sent (workflow.stageIdleSeconds).`, an inactivity notice and a PROGRESS retry notice naming it. AZPR interrupted the session, OpenCode closed the provider stream and confirmed settlement (no cancellation warning), and a new session completed the review. In the second, the functional answer streamed one chunk per second for 66.0 s, longer than the window, and ran on without a stop or a new session. Both were COMPLETE 66.3 s after the commands. |
818
- | Private sessions | Generate and compaction on a private session sent no provider request; ordinary generation still worked. |
819
- | TUI | New and existing TUI sessions kept their origin and cancelled from the same TUI. |
820
- | Proxy (fresh run, 2026-10-13) | The fake service served HTTPS with a certificate from a fixture CA, reachable through a CONNECT proxy that demands Basic credentials. With `azure.proxy` (credentials containing `@` and a space, percent-encoded) and `azure.caFile`, `/pr-check` was READY over one tunnel; the proxy saw the percent-decoded credentials and no `Authorization` header. Without the CA file: NOT_READY with the certificate message, no retry, no request reached the service. Without proxy credentials: NOT_READY explaining HTTP 407. `verifyTls: false`: READY with a WARNING row. The proxy password appeared nowhere in the fixture except the installed `settings.json`. |
821
-
822
- The first smoke attempt failed: AZPR's tools were registered without
823
- `codemode: false`, so OpenCode placed them behind CodeMode `execute`, which
824
- private reviewers may not use, and reviewers saw no AZPR tool. The tools are now
825
- registered with `codemode: false`, and the test tool registry applies the same
826
- rule so the offline runtime tests catch a regression.
827
-
828
- `tests/host-v2-comment-scale.mjs` passed on the same host:
829
-
830
- | Property | Observed |
831
- | --- | --- |
832
- | Changed files | 120, reviewed in 5 shards of 24 per role; functional reviewers read whole files, risk reviewers read diffs |
833
- | Context overflow | One functional shard reported a nearly full context; the host attempted compaction, AZPR refused it, and the shard was split into `1/5a` and `1/5b`, both COMPLETE |
834
- | Verification | 30 findings in 2 verification sessions; the second verifier moves one high finding into a file of the first |
835
- | Duplicate check | One `dedupe` session for that file, which merges the moved duplicate |
836
- | Planning | 8 pages of at most four findings (29 findings); since 2026-10-19 two at a time: the fake provider holds the first page until a second arrives, and at most two planning requests were in flight |
837
- | Publication | 20 threads (19 inline, 1 summary; 10 low findings in the summary); a second publish wrote nothing |
838
- | Largest provider request | 31,136 characters (27,185 before the duplicate rules and the diff and search tools) |
839
- | REST calls | 74 |
840
-
841
- ## OpenCode 2.1.4, the tested host (2026-10-24)
842
-
843
- Since 2026-10-24 the tested host is OpenCode CLI 2.1.4 (`TESTED_HOST_VERSION`;
844
- CI runs the exact-host fixtures with it). 2.1.3 was not tested on its own.
845
- Reviewing the 137 commits from `v2.1.2` to `v2.1.4` of the OpenCode source and
846
- running the fixtures found one change AZPR had to absorb, in the proxy
847
- behaviour of the embedded runtime:
848
-
849
- | Area | 2.1.2 → 2.1.4 |
850
- | --- | --- |
851
- | Plugin context | Every method AZPR calls is unchanged; the plugin package changed only its types. |
852
- | Hooks AZPR uses | `prompt`, `context`, `model.request` (kinds `primary`, `compaction`, `generate` and `title`), `retry`, `permission.evaluate` and the tool hooks keep their shapes, as do the token counts on assistant messages. |
853
- | Host constants | The continuation text, the streamed event names and the permission defaults are unchanged. |
854
- | Runtime | The embedded Bun moved from 1.4.2 to 1.4.4. When a proxy refuses the CONNECT tunnel, for example with HTTP 407, `fetch` now rejects with `ERR_PROXY_TUNNEL` and the proxy's status instead of returning the proxy's answer, and it resets the proxy connection. AZPR maps the rejection to the same proxy messages and retry rules as before, and a refused tunnel never makes a write uncertain. A refused connection is now `ECONNREFUSED` rather than `ConnectionRefused`; AZPR already recognized both. |
855
- | Compaction | `experimental.background_compaction` (off by default) prepares summaries through the same `compaction` request, which AZPR refuses for private reviewers before anything is sent; the turn goes on. A compaction the host attempts in the turn opens its message first and ends the turn, so overflow is now read from the failed turn's messages (see below). More provider context-overflow errors now reach AZPR as compaction attempts and therefore split the shard. |
856
- | Models | With a ChatGPT sign-in, the OpenAI context caps moved into a built-in plugin with the same input limits (272,000 tokens; 500,000 for gpt-6.1-sol). A session without its own model now uses its agent's model; AZPR always sets both. |
857
- | New tools | The experimental TUI terminal tools and client-hosted MCP tools are outside the private roles' allowlist, so reviewers neither see nor run them. |
858
-
859
- - Exact-host fixtures with 2.1.4 installed into a disposable prefix: with only
860
- the tested version changed, the fresh and native runs failed in the proxy
861
- step. The 407 check received `ERR_PROXY_TUNNEL`, AZPR retried it as a
862
- network error, and the fixture proxy stopped on the reset connection; the
863
- replacement and comment-scale runs passed. With the mapping and a fixture
864
- proxy that tolerates a reset, all four passed: fresh, replacement, native
865
- and comment scale.
866
- - An external review of this revision found that a refused background summary
867
- still marked its stage as overflow. On the exact host with background
868
- compaction on, a functional reviewer whose first response passed the
869
- background threshold and whose next request failed with HTTP 401 was split
870
- into new sessions that failed the same way: 7 functional sessions for 4
871
- files. Overflow is now read from the failed turn's messages. The new
872
- `host-v2-background-compaction.mjs` fixture passes with one functional
873
- session classified permanent and fails with the previous code; the other
874
- four fixtures still pass, including the refused foreground compaction and
875
- split at scale, whose failed turn holds the host's compaction message (still
876
- `running` when the turn ended).
877
- - A probe in each runtime (`BUN_BE_BUN=1 opencode`) showed the difference: for
878
- 407, 403 and 502 answers to CONNECT, Bun 1.4.2 resolves with that status and
879
- Bun 1.4.4 rejects with `ERR_PROXY_TUNNEL` carrying it; a proxy that closes
880
- without an answer gives ECONNRESET in both.
881
- - The same probe found that `fetch` in both runtimes ends a request that
882
- receives nothing after about 370 seconds unless it passes `timeout: false`.
883
- `azure.callTimeoutSeconds` accepts up to 1,800 seconds, so a longer setting
884
- used to end at that point with a retried network error. AZPR now passes
885
- `timeout: false`, and its own per-call timeout decides. In 2.1.4's runtime,
886
- AZPR's client sent one comment write to a silent server with a 400-second
887
- timeout: without the option it ended at 372 seconds with `network error (23)`,
888
- with it through AZPR's per-call timeout (413 seconds by the wall clock).
889
- - Upgrade: `npm install -g @opencode/cli@2.1.4`; the background service,
890
- still running 2.1.2, was then stopped and its database copied before 2.1.4
891
- first opened it, and the service was started on 2.1.4. With this revision
892
- `/pr-check` on the 1-file PR was READY without a host notice.
893
-
894
- Live on the upgraded background service with this revision (gpt-6-luna for
895
- quick and review, `workflow.parallelSessions` 8, each review followed by a
896
- comment preview; nothing was posted):
897
-
898
- | PR | Mode | Review | Sessions / requests | Input (cached) | Findings | Preview (inline) |
899
- | --- | --- | --- | --- | --- | --- | --- |
900
- | PR #2, 1 file | quick | COMPLETE, 48 s | 1 / 6 | 39 K (60 %) | the 3 known defects | 7 s (0; the PR's threads already discuss all 3) |
901
- | | review | COMPLETE, 75 s | 3 / 12 | 84 K (52 %) | the 3 known defects | 7 s (0; already discussed) |
902
- | PR #4, 35 files | quick | COMPLETE, 36 s | 2 / 7 | 167 K (52 %) | no candidate for either seeded regression | 3 s (0) |
903
- | | review | COMPLETE, 75 s | 5 / 15 | 309 K (55 %) | the seeded regression in the diff | 10 s (1) |
904
- | PR #3, 316 files | quick | COMPLETE, 136 s | 13 / 51 | 1.81 M (66 %) | all 24 seeded policy defects | 74 s (23) |
905
- | | review | COMPLETE, 297 s | 30 / 128, 1 correction | 4.45 M (72 %) | all 24 seeded policy defects, no other finding | 98 s (30) |
906
-
907
- All six reviews and previews completed with no AZPR retry, failed stage,
908
- inactivity stop, tool timeout, blocked tool, host retry, rejected model request
909
- or Azure DevOps retry; one reviewer once called a diff tool without its path
910
- and got the host's argument error. The results stay within gpt-6-luna's range
911
- on 2.1.2: which of the two seeded regressions in the 35-file PR a run finds
912
- still varies between runs. These live runs preceded the `timeout: false`
913
- change, which the fixtures and the probe above cover.
914
-
915
- ## OpenCode 2.1.2 (2026-10-22)
916
-
917
- From 2026-10-22 to 2026-10-24 the tested host was OpenCode CLI 2.1.2, which
918
- the user's company ran then (`TESTED_HOST_VERSION`; CI ran the exact-host
919
- fixtures with it).
920
- 2.1.0 and 2.1.1 were not tested. Reviewing the 146 commits from `v2.0.32` to
921
- `v2.1.2` of the OpenCode source found nothing AZPR depends on changed:
922
-
923
- | Area | 2.0.32 → 2.1.2 |
924
- | --- | --- |
925
- | Plugin context | `session.list` was added (paged, 50 per page); every method AZPR calls is unchanged. Session archiving exists only in the HTTP API. |
926
- | Hooks AZPR uses | `prompt`, `context`, `model.request` (its `kind`), `retry` (`attempt`, `decision`), `permission.evaluate` and the tool hooks keep their shapes; the retry schedule moved into a shared module with the same event. |
927
- | v2.1 breaking changes | Provider replay data renamed to `native`, compactions referencing kept messages, `session.compacted` removed, credential form answers in `metadata`: AZPR reads none of them. A session that 2.1 compacts cannot be loaded by 2.0.x, so a downgrade needs the database backup taken before the upgrade. |
928
- | Host constants | The continuation text, the streamed event names and the embedded Bun 1.4.2 are unchanged; permission defaults are unchanged. A built-in `todowrite` tool exists behind an experimental flag; private roles see only their allowlist. |
929
- | Errors | Provider session errors may carry `retryAfterMs`, and OpenCode's free models report `provider.free-limit`. AZPR now treats it and `provider.quota` as permanent (see offline tests); before, a 429 status made them look transient and a new session repeated the failure. |
930
- | Idle locations | 2.0.32 interrupted the sessions of a location without session events for 60 minutes; 2.1.2 keeps a location with running sessions or background jobs (`experimental.location_idle_timeout` changes the period). A review's sessions emit events throughout, and AZPR's stage inactivity watchdog stops a silent stage after 600 s by default, long before either host would. |
931
-
932
- - Exact-host fixtures: `host-v2-smoke.mjs` fresh and `--replace` and
933
- `host-v2-comment-scale.mjs` passed on 2.1.2 twice: first with the previous
934
- revision changed only in its tested version (2.1.2 installed into a
935
- disposable prefix), then with this revision on the upgraded system
936
- install. Every scenario passed, including the provider 503 retried in place
937
- (4 authorized primary requests, none rejected), the inactivity watchdog, the
938
- refused compaction and shard split, publication with a deleted comment, and
939
- the proxy.
940
- - Upgrade: with the background service stopped, its database was copied
941
- first; then `npm install -g @opencode/cli@2.1.2` and a start. The previous
942
- revision's `/pr-check` on the 1-file PR was READY on 2.1.2 with a host
943
- notice; with this revision it was READY without one.
944
-
945
- Live on the upgraded background service with this revision (gpt-6-luna for
946
- quick and review, `workflow.parallelSessions` 8, each review followed by a
947
- comment preview; nothing was posted):
948
-
949
- | PR | Mode | Review | Sessions / requests | Input (cached) | Findings | Preview (inline) |
950
- | --- | --- | --- | --- | --- | --- | --- |
951
- | PR #2, 1 file | quick | COMPLETE, 35 s | 1 / 4 | 26 K (63 %) | the 3 known defects | 20 s (3) |
952
- | | review | COMPLETE, 79 s | 3 / 14, 1 correction | 100 K (72 %) | the 3 known defects | 19 s (3) |
953
- | PR #4, 35 files | quick | COMPLETE, 52 s | 2 / 7 | 176 K (61 %) | the seeded regression in the diff | 8 s (1) |
954
- | | review | COMPLETE, 86 s | 5 / 25 | 684 K (72 %) | no candidate for either seeded regression; the verifier rightly rejected the one other candidate | 3 s (0) |
955
- | PR #3, 316 files | quick | COMPLETE, 134 s | 13 / 56 | 2.07 M (71 %) | policies 23 of 24 (not `queue_priority`), not the configuration defect | 65 s (23, 3 combined) |
956
- | | review | COMPLETE, 370 s | 39 / 151, 2 corrections | 4.68 M (71 %) | policies 24 of 24, not the configuration defect, one false low finding on a test file (summary index only) | 87 s (25; 3 low skipped) |
957
-
958
- - The 12 runs had no AZPR retry, failed stage, inactivity stop, tool timeout,
959
- blocked native tool, host retry, Azure DevOps retry or warning, and every
960
- session was confirmed stopped; one reviewer tool call on PR #3 returned an
961
- error. `/pr-check` was READY before each review, without a host notice.
962
- - The results stay within gpt-6-luna's earlier runs on 2.0.32: the PR #4
963
- regression outside the diff is still missed, and the quick miss of one
964
- policy and the false test-file finding occurred before. PR #3's review took
965
- longer than earlier runs (226–300 s); it ran eight duplicate checks, for
966
- verified findings that ended up in the same files.
967
-
968
- ## OpenCode 2.0.32 (2026-10-17)
969
-
970
- From 2026-10-17 to 2026-10-21 the tested host was OpenCode CLI 2.0.32, the release the
971
- user's company ran (`TESTED_HOST_VERSION` in `src/host.mjs`; CI runs the
972
- exact-host fixtures with it), and receipts add a host notice for any other
973
- version. Other results on this page used 2.0.22 unless noted; 2.0.31 was
974
- checked on the way. The published 2.0.31 and 2.0.32 binaries embed Bun 1.4.2
975
- like 2.0.22:
976
-
977
- | Check | Observed |
978
- | --- | --- |
979
- | Exact-host fixtures | `host-v2-smoke.mjs` fresh and `--replace` and `host-v2-comment-scale.mjs` passed on 2.0.32 (and on 2.0.31 and 2.0.22 with the same checks): every scenario of the tables above, plus token usage in the debug stage records for every model request of the review. Since 2026-10-18 the smoke fixture also runs `/pr-quick` (one quick session, no verifier, the session's reads recorded) and its comment preview with the zh-TW quick disclosure line; fresh, `--replace` and the scale fixture passed on 2.0.32. Since the quick follow-up, two more `/pr-quick` runs have a fake reviewer that answers PARTIAL first: its one follow-up prompt reaches the same session and completes the review, or gives no usable answer and the earlier answer with its finding stands (receipt `follow-up=completed` / `unusable`); fresh, `--replace` and the scale fixture passed on 2.0.32. With planning two pages at a time (2026-10-19) fresh, `--replace` and the scale fixture passed on 2.0.32, the scale fixture with two planning requests in flight at once (8 planner sessions, 20 threads, a second publish writing nothing). |
980
- | Project boundary | 2.0.31 dropped the `external_directory: ask` rule that 2.0.22 put in every new agent's default permissions, and 2.0.32 keeps it out, so external paths fall under `*: allow`. AZPR's permission hook only turned `ask` into `deny`, and on 2.0.31 a private reviewer's native `grep` on `/etc` ran and returned file contents. The hook now decides `external_directory` for private roles itself: allowed only when every resource is in AZPR's private data directory, otherwise refused with the pointer to the azpr tools. No live run used a native read tool outside the project; the one live review on 2.0.31 before the fix used only AZPR's tools. |
981
- | Missing local paths | 2.0.31 and 2.0.32 answer a native `grep` on a path that does not exist locally, such as the repository path `/scale_lab`, at once with `Search path does not exist`, before any permission request; 2.0.22 asked, and AZPR refused with the pointer. Neither waits. |
982
- | Host constants | The continuation text, foreign message types and streaming event names in `host.mjs` are unchanged in 2.0.31 and 2.0.32; both send `session-id`, `thread-id` and `x-client-request-id` on the ChatGPT token-sharing route (below). |
983
- | Live, after upgrading the user's background service from 2.0.22 to 2.0.31 | `/pr-check` of the 1-file PR was READY; a review-only `/pr-review` was COMPLETE in 75 s with the same three confirmed findings as on 2.0.22. With the boundary fix installed, `/pr-check` was READY again. |
984
- | Live on 2.0.32 (the service upgraded again, this revision installed) | `/pr-check` was READY without a host notice; a review-only `/pr-review` of the 1-file PR was COMPLETE in 75 s with the same three confirmed findings. The debug stage records held one token row per model request (4, 5 and 4 requests), and 54.4% of the run's input was read from the cache. |
985
-
986
- ## Prompt cache with a ChatGPT subscription (2026-10-16/17)
987
-
988
- OpenCode reports for each assistant message `input` (without cached input),
989
- `cache.read` and `cache.write`; stage records keep these numbers as `tokens`
990
- ([debugging](DEBUGGING.md)), and the cached share is
991
- `cache.read / (input + cache.read + cache.write)`. Measured with real models
992
- through the user's OpenCode service, with OpenAI signed in through "Sign in with
993
- ChatGPT" (token sharing: `api.openai.com/v1` over HTTP), gpt-6-luna unless
994
- noted:
995
-
996
- | Host and workload | Cache |
997
- | --- | --- |
998
- | 2.0.22, the same 2.8K-token prompt sent four times (`/generate`), on two days | 0 of 3 repeats each time |
999
- | 2.0.22, one ordinary session with 8 growing turns (gpt-6-luna, gpt-5.6-luna, gpt-6.1-sol) | 1, 0 and 1 of 7 follow-up requests read the previous prompt |
1000
- | 2.0.22, review-only `/pr-review` of the 1-file PR, two runs | 4.4% and 4.6% of input |
1001
- | 2.0.22 with a test build of AZPR that set `session_id` and `session-id` to each private session's ID | 51.9% and 61.4%; 17 of 20 follow-ups read 75–99% of the previous prompt |
1002
- | 2.0.31, the same prompt four times | 2 of 3 repeats |
1003
- | 2.0.31, one ordinary session with 8 turns | 7 of 7 follow-ups, 92–98% each |
1004
- | 2.0.31, the same 1-file PR review with AZPR unchanged | 47.6% of input; 7 of 10 follow-ups |
1005
- | 2.0.32, the same prompt four times | 2 of 3 repeats |
1006
- | 2.0.32, one ordinary session with 8 turns | 7 of 7 follow-ups, 92–99% each |
1007
- | 2.0.32, the same 1-file PR review (this revision, from the debug token records) | 54.4% of input; 7 of 10 follow-ups |
1008
-
1009
- AZPR's requests keep a stable prefix: with a loopback fake Responses provider,
1010
- every follow-up's input extended the previous one, and instructions and tools
1011
- did not change between requests. The low share came from the host: on 2.0.22
1012
- the token-sharing route sent no session headers
1013
- ([anomalyco/opencode#53765](https://github.com/anomalyco/opencode/issues/53765)),
1014
- which [anomalyco/opencode#53767](https://github.com/anomalyco/opencode/pull/53767)
1015
- fixed with `session-id`, `thread-id` and `x-client-request-id` before 2.0.31.
1016
- The Codex sign-in route (device code, in an isolated environment) already cached
1017
- on 2.0.22: 3 of 3 repeats and 50% over 8 turns. Before 2026-10-10 the reviewers
1018
- used MCP tools whose definitions formed a long prefix shared by all sessions,
1019
- which most likely explains why the earliest live runs read 31–45% from the
1020
- cache (their sessions no longer exist, so this was not checked per request).
1021
-
1022
- ## Proxy and TLS behaviour of OpenCode's runtime
1023
-
1024
- Measured on 2026-10-13 with the Bun runtime embedded in OpenCode 2.0.22 (Bun
1025
- 1.4.2, run as `BUN_BE_BUN=1 opencode`), a local CONNECT proxy and a fixture CA;
1026
- `azure.proxy`, `azure.caFile` and `azure.verifyTls` are built on these results:
1027
-
1028
- | Behaviour | Observed |
1029
- | --- | --- |
1030
- | `fetch(url, { proxy })` | HTTPS through a `CONNECT` tunnel and HTTP in absolute form, for loopback targets too; an `https://` proxy works as well. Credentials in the proxy URL are percent-decoded into `Proxy-Authorization: Basic`. |
1031
- | `tls: { ca }` | Replaces the built-in roots: with only the fixture CA, dev.azure.com failed with `UNABLE_TO_GET_ISSUER_CERT_LOCALLY`. AZPR therefore appends to `tls.rootCertificates` (121 roots); a two-certificate bundle works. Host names are still verified (`ERR_TLS_CERT_ALTNAME_INVALID`). |
1032
- | `tls: { rejectUnauthorized: false }` | Skips verification, also through a proxy. |
1033
- | Proxy refusals | A 407 or a refused `CONNECT` (403) comes back as a `Response` with that status, not as an exception; it carries the proxy's headers only. |
1034
- | Errors | Thrown with `error.code`: `ConnectionRefused` (also for an unreachable proxy), `ENOTFOUND`, `UNABLE_TO_VERIFY_LEAF_SIGNATURE` and other certificate codes. |
1035
- | Environment | `HTTPS_PROXY` and `NO_PROXY` are honoured without the `proxy` option; `NODE_EXTRA_CA_CERTS` and `NODE_TLS_REJECT_UNAUTHORIZED=0` work process-wide. |
1036
- | Azure DevOps answers | A 302 sign-in redirect and a 404 for an unknown organization both carried `X-TFS-ProcessId` (and `ActivityId`, `X-VSS-E2EID`); the fixture proxy's answers did not. |
1037
-
1038
- The first symptom that led to this work came from a corporate network: `/pr-check`
1039
- reported `Azure DevOps PR failed: network error (ConnectionRefused) after 3
1040
- attempts.` because dev.azure.com is reachable there only through a proxy.
1041
- On 2026-10-14 `/pr-check` passed on that network with `azure.proxy` set to the
1042
- company's HTTP proxy and `azure.verifyTls` false (shown as a WARNING row); no
1043
- `azure.caFile` was set.
1044
-
1045
- ## Live run (Azure DevOps Services, real model)
1046
-
1047
- PR kevin888y/OpenCode #2 (one changed file), `openai/gpt-5.6-luna` for all three
1048
- roles, `zh-TW`, through the user's OpenCode service with the installed package,
1049
- `azure.organization` and an existing PAT in AZPR's settings. The AZPR comments
1050
- of earlier runs were deleted first.
1051
-
1052
- | Step | Result |
1053
- | --- | --- |
1054
- | `/pr-check` | READY, 5 s; 6 REST calls; head, merge base, 1 changed file, HEAD and BASE reads, 156 threads. |
1055
- | `/pr-review` | COMPLETE, 75 s; three medium findings confirmed; reviewers made 20 tool calls (file reads and root listings at exact commits) served by 9 REST requests thanks to the run cache; no correction turn, retry or tool error. |
1056
- | `/pr-comment --publish` | POSTED 4 items (summary and three inline), 25 s; planning took 1 model request and no tools. |
1057
- | Second publish | POSTED, all 4 ALREADY_PRESENT, no write. |
1058
-
1059
- Independent REST read-back found the inline threads on `/fulfillment.py` at
1060
- right-side lines 19–24, 29 and 37, each with its marker; Azure DevOps attached
1061
- `pullRequestThreadContext` (iteration 1/1, change tracking ID 1) itself. The
1062
- four private sessions used about 54,500 input tokens (the two MCP-based runs used
1063
- about 241,000 and 80,000). All 34 REST calls of the four commands succeeded on
1064
- the first attempt. The test comments were deleted after the read-back.
1065
-
1066
- `/pr-check` of PR #3 (316 changed files) returned READY with all 316 files as a
1067
- complete list and the merge base; through MCP 2.9.0 the runtime saw 100.
1068
-
1069
- ## Live run: large PR (Azure DevOps Services, real model)
1070
-
1071
- PR kevin888y/OpenCode #3 (316 changed files), the same models, language and
1072
- service; `/pr-review` only, nothing was posted.
1073
-
1074
- The first attempt stalled 45 seconds in: in four reviewer sessions the model ran
1075
- native `grep` on the repository path `/scale_lab`, OpenCode asked for
1076
- `external_directory` approval, and the unattended private sessions waited for
1077
- 30 minutes until the run was stopped (about 950,000 input tokens were spent).
1078
- Private sessions now refuse at once any request that would wait for an approval
1079
- (shell excepted when the `shell` setting allows it) and point the model to the
1080
- azpr tools; the exact-host smoke test reproduces the `grep` and passes.
1081
-
1082
- The second attempt was COMPLETE:
1083
-
1084
- | Property | Observed |
1085
- | --- | --- |
1086
- | Duration | 626 s: initial review 541 s, verification 80 s |
1087
- | Initial review | 26 sessions (2 roles × 13 shards of up to 25 files), all COMPLETE; no correction turn, stage retry, overflow, tool failure or blocked tool; about 1,550 tool calls |
1088
- | Verification | 4 sessions, all COMPLETE without a correction turn; 48 candidates → 25 confirmed (7 high, 17 medium, 1 low), 23 merged duplicates, none rejected |
1089
- | Azure DevOps | 593 REST calls: 587 file versions each fetched once (the run cache served every other read), one 404 for a path the model guessed, no retry needed; median 259 ms, p95 1.0 s |
1090
- | Approval prompts | None |
1091
- | Tokens | About 7.44 million input tokens (about 280,000 per initial session, 32,000 per verification session) and 79,000 output tokens |
1092
-
1093
- One duplicate remained in the report (`F-2001` and `R-2001`, the same cause in
1094
- `worker_capacity.py`): count-based verification shards had put that file's two
1095
- findings into different verifiers. Verification shards now end only between
1096
- files; a unit test reproduces the 48-finding distribution.
1097
-
1098
- ## Live run: large PR with publication (commit 68c1f7e)
1099
-
1100
- PR kevin888y/OpenCode #3 again, at the same head, with the same models, language
1101
- and service, running the installed package of commit `68c1f7e` (the revision
1102
- before the verifier and planner corrections below). The 24 AZPR comments of an
1103
- earlier run were deleted first; the comments of this run were kept on the PR.
1104
-
1105
- | Step | Result |
1106
- | --- | --- |
1107
- | `/pr-check` | READY, 9 s |
1108
- | `/pr-review` | COMPLETE, 719 s: initial review 589 s (26 sessions), verification 129 s (5 sessions); 66 candidates → 26 confirmed (6 high, 19 medium, 1 low), 40 merged duplicates, none rejected; one correction turn |
1109
- | `/pr-comment --publish` | POSTED, 157 s: 7 planning pages of one model request each and no tools (147 s), then 25 items (summary and 24 inline) created in about 5 s and all read back as VERIFIED |
1110
- | Second publish | POSTED, all 25 ALREADY_PRESENT, no write |
1111
-
1112
- - 681 REST calls over the four commands, none retried; four 404s for paths that
1113
- models guessed.
1114
- - About 7.60 million input and 88,000 output tokens; initial review sessions
1115
- used 95 % of the input.
1116
- - Independent read-back: 23 of the 24 inline threads sit on changed right-side
1117
- lines; the 24th reports a removed check and sits on the line after the
1118
- removal, where HEAD has no line for it.
1119
- - The two `worker_capacity.py` findings that stayed separate in the previous run
1120
- were merged, as file-grouped verification shards intend.
1121
- - Initial sessions used on average 3.71 of the 4 `workflow.parallelSessions`
1122
- slots; the 26 sessions ran in about seven waves.
1123
-
1124
- Two observations led to corrections in the current revision:
1125
-
1126
- 1. One verifier wrote four merges into `confirmed` (`{"id", "mergedInto",
1127
- "reason"}`). They were treated as incomplete confirmations and cost one
1128
- correction turn. A decision row is now judged by its own fields: an explicit
1129
- status, or a merge target on a row without a finding.
1130
- 2. A verifier moved R-12001, a test that asserts the wrong result, from the test
1131
- file onto the implementation lines of F-1009 without saying so. The planner
1132
- then skipped R-12001 as covered by F-1009's comment, so the test got no
1133
- comment and the summary index showed the implementation file. A move to
1134
- another file must now be declared with `movedFrom` (otherwise the verifier is
1135
- asked to confirm or undo it, and an unconfirmed move is kept with a warning),
1136
- the report shows the initial location, and the planner may not skip a
1137
- finding because another finding of the review is commented (a prompt rule,
1138
- plus a correction turn when a skip names another finding). Moves stay
1139
- allowed: of the 60 confirmations in the live runs so far, 2 moved to another
1140
- file, and the other one (R-4001, from a region JSON file to the code that
1141
- drops its fields) was correct.
1142
-
1143
- ## Live runs: parallelism and the corrections (review only)
1144
-
1145
- Two more `/pr-review` runs of PR #3 at the same head, same models, language and
1146
- service, nothing posted (the 25 comments above were unchanged afterwards). The
1147
- first used commit `628a78d` with `workflow.parallelSessions` 8 and
1148
- `azure.concurrency` 3; the second used this revision with 8 and 6.
1149
-
1150
- | Property | 68c1f7e, 4 / 3 (above) | 628a78d, 8 / 3 | This revision, 8 / 6 |
1151
- | --- | --- | --- | --- |
1152
- | Review duration | 719 s | 460 s | 393 s |
1153
- | Initial review | 589 s; 3.71 sessions on average, peak 4 | 380 s; 6.07, peak 8 | 319 s; 6.71, peak 8 |
1154
- | Sum of initial session time | 2,187 s | 2,308 s | 2,143 s |
1155
- | Verification | 129 s, 5 sessions in two waves | 79 s, 4 sessions | 72 s, 5 sessions in one wave |
1156
- | Candidates → confirmed | 66 → 26 | 53 → 26 | 60 → 26 |
1157
- | Correction turns | 1 | 0 | 0 |
1158
- | Provider retries, stage retries | 0, 0 | 0, 0 | 0, 0 |
1159
- | REST calls (median, p95) | 616 (168 ms, 433 ms) | 646 (432 ms, 2.7 s) | 587 (90 ms, 244 ms) |
1160
- | Most REST calls issued in one second | 36 | 86 | 38 |
1161
- | Input tokens | 7.60 M | 9.17 M | 7.87 M |
1162
-
1163
- - A call's duration includes waiting for a queue slot. Calls that started with
1164
- fewer than three other calls in flight, so without waiting, took a median of
1165
- 73–75 ms in every run, so Azure DevOps did not slow down: with 8 sessions and
1166
- a queue of 3, the queue was the bottleneck, and a queue of 6 removed it. No
1167
- request was throttled.
1168
- - Token use varies between runs of the same commit (7.4 M to 9.2 M input so
1169
- far) with the number of model requests and tool calls; it did not follow the
1170
- parallelism.
1171
- - In the 628a78d run, a verifier declared two moves to another file with
1172
- `movedFrom` in its first answer (from region JSON files to the normalization
1173
- code that drops their fields); the report showed both initial locations.
1174
- - In the second run, a verifier again wrote merges into `confirmed` (nine
1175
- `{"id", "mergedInto", "reason"}` rows and no `merged` list). They were
1176
- classified as merges without a correction turn.
1177
- - No file held findings that different verifiers confirmed, so the duplicate
1178
- check did not run; it is validated offline and with the exact-host scale
1179
- fixture.
1180
-
1181
- ## Live A/B: reading diffs instead of whole files (review only)
1182
-
1183
- Seven `/pr-review` runs of PR #3 at the same head, with the same models,
1184
- language and service; nothing was posted. Baselines A–C read whole files
1185
- (commits `68c1f7e`, `628a78d`, `fe0ee7b`; `parallelSessions`/`azure.concurrency`
1186
- 4/3, 8/3 and 8/6). The variants used `azpr_read_diff`, `azpr_find_files` and the
1187
- reading rules, all with 8/6:
1188
-
1189
- - V2 sent the diffs of all assigned files with the assignment;
1190
- - V1 let reviewers read diffs themselves, without folding;
1191
- - V3 (this revision) folds repeated changes and asks for few reading rounds.
1192
-
1193
- | Run | Review | Input tokens | Requests per initial session | Candidates → confirmed | Policy defects found | Configuration defect |
1194
- | --- | --- | --- | --- | --- | --- | --- |
1195
- | Baseline A | 719 s | 7.52 M | 5.08 | 66 → 26 | 24/24 | found |
1196
- | Baseline B | 460 s | 9.17 M | 5.42 | 53 → 26 | 24/24 | found |
1197
- | Baseline C | 393 s | 7.87 M | 5.35 | 60 → 26 | 24/24 | found |
1198
- | V2 | 419 s | 15.13 M | 5.31 | 107 → 25 | 24/24 | found |
1199
- | V1 | 451 s | 11.73 M | 5.58 | 74 → 27 | 24/24 | found |
1200
- | V3 | 381 s | 5.53 M | 5.54 | 84 → 25 | 24/24 | found |
1201
- | V3 | 429 s | 5.46 M | 5.54 | 69 → 25 | 24/24 | found |
1202
-
1203
- - Reviewers made about 5.5 model requests per session in every variant; cost
1204
- follows how much each request carries.
1205
- - 240 of the 316 files are 300-line JSON region profiles with the same
1206
- migration on every route, so their plain diffs are 80 % of HEAD plus BASE.
1207
- V2 put 25 such diffs into every request of a shard, and reviewers still read
1208
- whole files: tokens roughly doubled, so sending diffs upfront was removed.
1209
- V1's plain diffs and the new reading rules cost 49 % more than baseline C.
1210
- - Folding repeated changes brings PR #3's diff volume to 29 % of whole-file
1211
- reads (measured offline over all 316 files). V3 used 27–41 % fewer input
1212
- tokens than the baselines in two runs, with all 24 policy defects and the
1213
- configuration defect found each time. These runs used a diff renderer that
1214
- dropped the middle of long change blocks (see "Diff defect" below); the
1215
- offline ratios here are measured with the corrected renderer.
1216
- - Offline over the latest 182 pydantic commits that modified source files (618
1217
- files), diffs are 5.3 % of whole-file HEAD and BASE reads (median per commit 4
1218
- %, 90th percentile 11 %), so code-centric PRs should save more.
1219
- - The duplicate check ran on a real model: in V1 it merged five duplicates that
1220
- different verifiers had confirmed in one file and kept two different
1221
- configuration findings apart.
1222
- - Severity varies between runs of every variant (high findings: 4 to 12).
1223
- `azpr_find_files` was used 19–28 times per run, but guessed-path 404s did not
1224
- drop (1–5 per run).
1225
-
1226
- ## Live run: real code (review only)
1227
-
1228
- PR kevin888y/OpenCode #4 was created for this test from pydantic (MIT): a
1229
- snapshot at `125921fdc9` as the base and the changes of the next 20 upstream
1230
- commits as the source (35 files, +1,074/−293 lines, Python and Rust; 13 changed
1231
- source files have more than 1,000 lines). Two regressions were seeded: one in a
1232
- changed hunk (`json_schema.py` declares millisecond temporal values as strings
1233
- although they serialize as numbers) and one outside the diff (a bare
1234
- `MutableSequence` still uses the sequence schema while the PR's new test expects
1235
- a list; the test and the implementation fell into different shards). Offline,
1236
- its diffs are 7.4 % of whole-file HEAD and BASE reads. Both revisions ran with
1237
- `parallelSessions` 8 and `azure.concurrency` 6; nothing was posted.
1238
-
1239
- | Property | Whole-file reading (`fe0ee7b`) | This revision (`c1de65c`) |
1240
- | --- | --- | --- |
1241
- | Review | 331 s | 115 s |
1242
- | Initial sessions | 10: three sessions filled their model context and their shards were split | 4 |
1243
- | Input tokens | 6.15 M | 0.79 M (−87 %) |
1244
- | Seeded regression in a changed hunk | found and confirmed | found and confirmed |
1245
- | Seeded regression outside the diff, test and code in different shards | missed | missed |
1246
- | Other confirmed findings | none | none |
1247
-
1248
- Diff-based reading kept the result of whole-file reading on real code at an
1249
- eighth of the input tokens and without context overflow. Neither revision
1250
- connects a new test with unchanged code in another shard.
1251
-
1252
- ## Live run: content search and commit messages (PR #4, review only)
1253
-
1254
- `azpr_search_code` (literal search over the repository zip of HEAD or BASE) and
1255
- the PR's commit messages were added for the seeded regression outside the diff.
1256
- PR #4 has one commit with a generic message, so the messages carried no
1257
- evidence here. Two runs, same models and settings, nothing posted:
1258
-
1259
- | Property | Run 1 | Run 2 (diff and argument fixes below) |
1260
- | --- | --- | --- |
1261
- | Review | 135 s | 135 s |
1262
- | Input tokens | 0.64 M | 0.55 M |
1263
- | Requests per initial session | 5.25 | 4.25 |
1264
- | Tool calls (diff / file / search) | 70 / 52 / 31 | 70 / 29 / 28 |
1265
- | Failed tool calls | 5 (4 searches with `path: ""`, one 404) | 0 |
1266
- | Repository zips (HEAD, BASE) | 4.10 MB in 1.5 s, 4.09 MB in 1.7 s | same |
1267
- | Seeded regression in a changed hunk | found and confirmed | found and confirmed |
1268
- | Seeded regression outside the diff | missed | missed |
1269
-
1270
- Reviewers used content search for callers, definitions and the code behind
1271
- changed tests (for example `ser_json_temporal`, `as_ser_schema`, `SecretStr`),
1272
- but in both runs the reviewers of the test shard read the new
1273
- `test_bare_mutable_sequence` and never searched for `MutableSequence`; in run 1
1274
- a search for the test's name failed on the blank path. Searching is available
1275
- but not applied to every new test. Offline, a lexical cross-reference from the
1276
- identifiers on added test lines to the non-test files that use them (identifiers
1277
- found in at most three files) points at the seeded line
1278
- (`_generate_schema.py:375`, `MutableSequence` mapped to the sequence schema) and
1279
- adds about 15,600 characters for the whole PR, along with noise from comments.
1280
-
1281
- ## Live run: models and reasoning effort (PR #4, review only)
1282
-
1283
- All three review roles on one model, same revision and settings, nothing
1284
- posted. "default" is the model's default variant, which AZPR always used before
1285
- `provider/model#variant` was supported; `#high` asks for high reasoning effort.
1286
-
1287
- | Model | Seeded regression outside the diff | In the diff | Other confirmed | Review | Input tokens | Reasoning tokens | Searches |
1288
- | --- | --- | --- | --- | --- | --- | --- | --- |
1289
- | gpt-5.6-luna (default) | 0 of 2 | 2 of 2 | 0 | 130 s | 0.55–0.64 M | 3.9–5.4 K | 28–31 |
1290
- | gpt-6-luna (default) | 0 of 2 | 2 of 2 | 0 | 65–75 s | 0.24–0.27 M | 0.2–0.4 K | 5 |
1291
- | gpt-6-luna#high | 0 of 2 | 2 of 2 | 0 | 125–150 s | 0.58–0.79 M | 4.7–4.9 K | 25–27 |
1292
- | gpt-6.1-sol (default) | 2 of 2 | 2 of 2 | 3, the same in both runs | 261–306 s | 1.47–1.53 M | 2.1–2.3 K | 49–60 |
1293
-
1294
- - gpt-6.1-sol searched for `MutableSequence` in both runs and explained the
1295
- defect: the bare type is mapped to the sequence schema while the
1296
- parameterized one uses the list schema the new test expects. Its suggested
1297
- fix is the upstream fix.
1298
- - Its three other confirmed findings: validation JSON Schemas take the
1299
- serialization temporal format (fixed upstream later in pydantic #13711);
1300
- chained length constraints in the experimental pipeline now overwrite each
1301
- other (the PR dropped the extra length check); and JSON Schema generation
1302
- ignores the core schemas that the PR allows as serialization schemas (still
1303
- so upstream). None is a false positive; the last two are debatable in
1304
- severity.
1305
- - gpt-6-luna#high also searched for `MutableSequence` in one run and received
1306
- the defective line next to the parameterized one, then reported no defect.
1307
- A runtime hint would have added exactly that evidence, so the hint was not
1308
- built: the miss is a limit of the model, and a stronger model finds the
1309
- defect with the general tools.
1310
- - The default variant reasons little for some models (gpt-6-luna: 193 and 445
1311
- reasoning tokens per review); `#high` raised that tenfold without finding
1312
- the defect.
1313
- - Verification does not find what the initial reviews miss: over 21 live runs,
1314
- 59 verifier sessions decided 616 candidates and added 1 new finding.
1315
-
1316
- ### Diff defect
1317
-
1318
- Run 1 showed `test_list.py` with HEAD lines 297–298 missing. Hunks were built
1319
- from the first and the last line of each change block, so a block longer than
1320
- the context before and after it (9 lines by default) lost its middle, and a
1321
- repeated block that reached into a hunk was cut instead of folded. In PR #4's 32
1322
- edited files, 451 of 1,111 changed lines (41 %) were not shown; reviewers
1323
- partly compensated with whole-file reads. Every changed block is now shown
1324
- whole (long hunks are still cut at 60,000 characters with a pointer to
1325
- `azpr_read_file`), a repeat that reaches into a hunk is shown in it, and a test
1326
- checks on random inputs that every changed line appears in a hunk or a folded
1327
- repeat. The corrected diffs of PR #4 are 23 % larger; run 2 still used fewer
1328
- tokens because reviewers made fewer whole-file reads. Tool arguments sent as
1329
- `null` or blank text now count as not given.
1330
-
1331
- ## Live A/B: filing rules in the reviewer prompts (PR #3 and PR #4, review only)
1332
-
1333
- 2026-10-11, OpenCode 2.0.22, api-version 7.1, `parallelSessions` 8,
1334
- `azure.concurrency` 6, `outputLanguage` zh-TW, all three review roles on one
1335
- model, nothing posted. Baselines are the runs of the sections above (prompts
1336
- of commit 56bc5d7).
1337
-
1338
- Cause found before the change: with gpt-6-luna, both roles read all 25 diffs of
1339
- PR #3's shard 2 (22 policy modules), but the risk reviewer filed 4 findings and
1340
- described five more defects in `report` "because they are outside this
1341
- review's focus", and the functional reviewer filed 6 and listed 16 in `report`.
1342
- Only `findings` reach verification, so 9 of 24 defects survived; the 15 → 9
1343
- step in verification was six functional/risk duplicates merged correctly.
1344
-
1345
- Prompt variants:
1346
-
1347
- - v1: every concrete defect is its own finding (no maximum, one per defect and
1348
- location); a role's focus orders attention and is not a filter; `report`
1349
- never describes a defect; COMPLETE requires following the reading leads;
1350
- "plan reads in few rounds" replaced by "never skip a read to save a round";
1351
- the first verification shard checks defects described only in prose.
1352
- - v2: v1 plus "one entry per root cause" (code that is wrong once and affects
1353
- many files or records is one finding at that code; separately wrong modules
1354
- are separate findings).
1355
- - v3: v2 with "plan reads in few rounds" restored and the tool prohibition
1356
- that the runtime enforces anyway removed from the prompt.
1357
- - v4: v3 without "followed the leads it raised" in the COMPLETE definition of
1358
- the initial roles.
1359
- - v5: v4 with the scope rule "every changed file has its own reviewer: follow
1360
- your assigned files' leads wherever they go; a defect you reach in unchanged
1361
- code is yours to file; other changed files are context only", and "in any
1362
- area" replaced by "of any kind".
1363
- - final (this revision): v5 without the verifier's prose check (removed after
1364
- review, see below). gpt-6-luna and gpt-5.6-terra ran v5, gpt-5.6-luna ran
1365
- the final revision four times (the last three with the merge-target
1366
- checks), gpt-6.1-sol last ran v3.
1367
-
1368
- PR #3 (316 files, 24 policy defects and one configuration defect):
1369
-
1370
- | Model | Prompts | Policy defects | Config defect | Candidates → confirmed | Duplicate confirmations | Review | Input tokens |
1371
- | --- | --- | --- | --- | --- | --- | --- | --- |
1372
- | gpt-6-luna | old | 9 of 24 | no | 15 → 9 | 0 | 250 s | 2.85 M |
1373
- | gpt-6-luna | v1 | 24 of 24 | no | 76 → 24 | 0 | 316 s | 3.90 M |
1374
- | gpt-6-luna | v2 | 24 of 24 | no | 60 → 25 | 0 | 286 s | 3.85 M |
1375
- | gpt-6-luna | v3 (2 runs) | 24 of 24 both | 1 of 2 | 65 → 25; 64 → 42 | 0; 17 | 271–296 s | 3.49–3.68 M |
1376
- | gpt-6-luna | v4 | 24 of 24 | no | 54 → 24 | 0 | 366 s | 3.94 M |
1377
- | gpt-6-luna | v5 | 24 of 24 | no | 56 → 24 | 0 | 321 s | 3.87 M |
1378
- | gpt-5.6-luna | old (2 runs) | 24 of 24 both | yes | 69–84 → 25 | 0 | 386–431 s | 5.46–5.53 M |
1379
- | gpt-5.6-luna | v1 | 24 of 24 | yes | 200 → 48 | 23 (the config defect once per region file) | 606 s | 7.73 M |
1380
- | gpt-5.6-luna | v2 | 24 of 24 | yes | 62 → 26 | 0 | 366 s | 6.30 M |
1381
- | gpt-5.6-luna | v3 | 24 of 24 | yes | 104 → 25 | 0 | 446 s | 7.43 M |
1382
- | gpt-5.6-luna | final (4 runs) | 22 of 24 (see below); then 24 of 24 three times | yes | 53 → 23; 58 → 26; 65 → 26; 59 → 25 | 0 | 351–406 s | 5.35–6.35 M |
1383
- | gpt-5.6-terra | old | 24 of 24 | no | 101 → 24 | 0 | 566 s | 4.59 M |
1384
- | gpt-5.6-terra | v2 | 24 of 24 | no | 126 → 24 | 0 | 581 s | 6.18 M |
1385
- | gpt-5.6-terra | v3 | 24 of 24 | no | 117 → 24 | 0 | 621 s | 4.92 M |
1386
- | gpt-5.6-terra | v5 | 24 of 24 | no | 76 → 24 | 0 | 496 s | 5.33 M |
1387
-
1388
- PR #4 (35 files, two seeded regressions):
1389
-
1390
- | Model | Prompts | In the diff | Outside the diff | Other confirmed | Review | Input tokens |
1391
- | --- | --- | --- | --- | --- | --- | --- |
1392
- | gpt-6-luna | old (4 runs) | 3 of 4 | 0 | 0 | 65–75 s | 0.22–0.29 M |
1393
- | gpt-6-luna | v1, v2 | 0 of 2 | 0 | 0 | 65–70 s | 0.42–0.57 M |
1394
- | gpt-6-luna | v3 (2 runs) | 2 of 2 | 0 | 0 | 80 s | 0.39–0.62 M |
1395
- | gpt-6-luna | v4 | 1 of 1 | 0 | 0 | 80 s | 0.33 M |
1396
- | gpt-5.6-luna | old (2 runs) | 2 of 2 | 0 | 0 | 130 s | 0.55–0.64 M |
1397
- | gpt-5.6-luna | v1 / v2 / v3 | 1 / 0 / 1 of 1 | 0 | 0 / 1 / 0 | 120–145 s | 0.76 / 0.92 / 0.86 M |
1398
- | gpt-5.6-terra | old (2 runs) | 2 of 2 | 0 | 0 | 180–196 s | 0.69–0.82 M |
1399
- | gpt-5.6-terra | v2, v3 (3 runs) | 3 of 3 | 0 | 0 | 170–185 s | 1.01–1.05 M |
1400
- | gpt-5.6-terra | v4 (2 runs) | 2 of 2 | 0 | 0 | 186–211 s | 0.96–1.04 M |
1401
- | gpt-5.6-terra | v5 (2 runs) | 2 of 2 | 0 | 0 | 180–181 s | 0.69–0.85 M |
1402
- | gpt-6.1-sol | old (2 runs) | 2 of 2 | 2 of 2 | 2 | 261–306 s | 1.47–1.53 M |
1403
- | gpt-6.1-sol | v2 / v3 | 1 / 1 of 1 | 1 / 1 of 1 | 3 / 5 | 406 / 351 s | 3.50 / 2.14 M |
1404
-
1405
- - The filing rules are what helped. gpt-6-luna's functional reviewer on PR #3's
1406
- shard 2 filed 22 findings in two model requests after the same 25 diff reads
1407
- that had produced 6 findings and 16 sentences of prose; all five new-prompt
1408
- runs of gpt-6-luna on PR #3 found 24 of 24.
1409
- - "One per defect and location" made gpt-5.6-luna file the configuration
1410
- defect once per affected region file; "one per root cause" removed those 23
1411
- duplicates and kept the defect at `configuration.py`.
1412
- - "Never skip a read to save a round" cost tokens without a measurable gain:
1413
- gpt-6.1-sol 1.5 → 3.5 M on PR #4 (2.1 M after the revert), gpt-5.6-terra
1414
- 6.2 → 4.9 M on PR #3 after the revert. No variant made gpt-5.6-luna or
1415
- gpt-6-luna find the regression outside the diff.
1416
- - The prose check by the first verification shard added one finding in
1417
- fourteen runs (v5, gpt-6-luna: a pagination defect another candidate
1418
- already covered; the same-file duplicate check merged it). Once reviewers
1419
- file their defects, nothing is left in prose. It was removed after review:
1420
- its work grows with the number of initial reports, not with the shard's
1421
- candidates, and every overflow split of the first shard (labels `1/N`,
1422
- `1/Na`, ...) repeats the same sweep, so an overflow during it would leave
1423
- that shard's candidates UNREVIEWED, and a shard without candidates cannot
1424
- split at all.
1425
- - gpt-5.6-terra had no filing problem with the old prompts (both roles filed
1426
- all 22 defects of shard 2) and gains nothing measurable: 24 of 24 and the
1427
- regression inside the diff with every prompt set, the configuration defect
1428
- and the regression outside the diff with none. v3 cost it 7 % more input on
1429
- PR #3 and about 35 % more on PR #4: the sessions assigned the test files
1430
- read and reviewed the implementation of other shards ("in any area"). v4
1431
- changed nothing for it; the scope rule of v5 brought PR #4 back to the old
1432
- 0.69–0.85 M and PR #3 candidates from 117 to 76 (verification shards 9 → 6,
1433
- 496 s), with input inside the run-to-run spread of the old prompts
1434
- (4.6–5.3 M).
1435
- - For gpt-6-luna, "followed the leads it raised" was what made its PR #4
1436
- sessions read more (0.39–0.62 M → 0.33 M without it); PR #3 stayed at
1437
- 24 of 24 in v4 and v5. Its PR #3 reviews cost about 35 % more than with the
1438
- old prompts (3.9 M) because they now file 24 defects instead of 9 and
1439
- verification runs in 4–5 shards instead of 1.
1440
- - Under the scope rule a defect reaches verification two or three times
1441
- (gpt-6-luna v5: 16 policy files with 2 candidates, 8 with 3; gpt-5.6-luna
1442
- final: exactly 2 for all 24) instead of four, so the verifier has fewer
1443
- same-line duplicates to merge.
1444
- - gpt-5.6-luna's final-revision run lost two defects in verification, not in
1445
- review: both roles filed `worker_capacity` and `write_permissions`, and the
1446
- verifier of that shard answered in 2,132 characters, merging R-2001 and
1447
- R-2002 into F-2001 and F-2002 while listing those two under `rejected` with
1448
- the reason "the candidate itself is a valid issue; see the F-2001
1449
- confirmation", which it never wrote. Every assigned ID had one decision
1450
- with a valid status and a reason, so no correction turn ran. It occurred in
1451
- 1 of 181 verification shards across all live runs; the runtime now treats a
1452
- merge into a finding the same answer rejected as a contract problem (repair
1453
- turn for the pair, UNREVIEWED if unresolved); a follow-up review showed the
1454
- same gap across shards (a crowded or overflow-split file can put the pair
1455
- in two verifiers), so the combined decisions are settled the same way with
1456
- a warning; a verifier-added finding that survives counts as a confirmed
1457
- target there, since the duplicate check may merge into it. Three repeat
1458
- runs with the checks in place confirmed 24 of 24 and the configuration
1459
- defect with no merge correction needed (58 → 26, 65 → 26 and 59 → 25;
1460
- 351–406 s; 5.4–6.1 M; the last one with a duplicate check and no false
1461
- warning). The third run also saw the first provider
1462
- stream interruption in these runs: the host's continuation message after a
1463
- turn that had made tool calls is not accepted as the authorized answer, the
1464
- shard was retried in a new session (`workflow.stageRetries`) and completed.
1465
- - Cross-shard discovery did not move with any variant: the regression outside
1466
- PR #4's diff was found by gpt-6.1-sol with the old prompts and with v2/v3
1467
- (4 of 4, filed from the test shard) and by no other model in any run.
1468
-
1469
- ### Live publication with this revision (gpt-5.6-terra)
1470
-
1471
- After the earlier 25 comments on PR #3 were deleted, `/pr-review` and
1472
- `/pr-comment --publish` ran once per PR with gpt-5.6-terra on all three roles.
1473
- PR #3: 24 of 24 policy defects confirmed (57 candidates, 461 s, 4.3 M input);
1474
- 24 items published, all VERIFIED on read-back (one summary, 23 inline; the
1475
- low-severity finding appears in the summary index only); a second
1476
- `--publish` reported ALREADY_PRESENT for all 24. PR #4: the regression inside
1477
- the diff confirmed (195 s, 0.6 M); 2 items VERIFIED (summary and
1478
- `json_schema.py:874`), the second `--publish` ALREADY_PRESENT for both. No
1479
- skip relied on another finding. On 2026-10-17 the maintainer inspected these
1480
- comments in the Azure DevOps web UI (the summary and 23 inline comments on
1481
- PR #3, the summary and the inline comment on PR #4) and found no problems with
1482
- their rendering or anchors.
1483
- - Risk: those same-line duplicates must be merged by the verifier.
1484
- gpt-5.6-luna and gpt-5.6-terra merged them in every run; gpt-6-luna did in
1485
- three of four runs and in the fourth confirmed 17 duplicates on the same
1486
- lines (two of five verification shards merged nothing). Publishing that
1487
- review would post two to four identical comments per line. A deterministic
1488
- runtime merge of candidates with the same path and lines is the proposed
1489
- fix; it is not part of this revision.
1490
- - The regression inside PR #4's diff was missed by gpt-6-luna in three
1491
- consecutive runs around the prompt change (one of them with the old
1492
- prompts) and found in both v3 runs, although every session had read the
1493
- defective lines and the test asserting the opposite: model variance, not a
1494
- prompt effect.
1495
- - The configuration defect of PR #3: gpt-5.6-luna 4 of 4 new-prompt runs,
1496
- gpt-6-luna 1 of 4, gpt-5.6-terra 0 of 2.
1497
-
1498
- ## Live runs: `/pr-quick` versus `/pr-review` (2026-10-18, review only)
1499
-
1500
- OpenCode 2.0.32, every review role and `models.quick.reviewer` on
1501
- `openai/gpt-6-luna` (default variant), `parallelSessions` 8,
1502
- `azure.concurrency` 6, debug on. Both modes ran twice on each PR at the same
1503
- heads, alternating quick and review, review only; nothing was posted. Time is
1504
- from the command to its receipt; requests count model requests of the review
1505
- stages; input is uncached plus cached prompt tokens from the debug stage
1506
- records.
1507
-
1508
- | PR | Mode | Time | Sessions | Requests | Input (uncached + cached) | Output | Findings |
1509
- | --- | --- | --- | --- | --- | --- | --- | --- |
1510
- | PR #2, 1 file | quick | 45 s / 30 s | 1 / 1 | 5 / 4 | 32 K / 25 K (8 K uncached each) | 1.5 K / 1.0 K | 3 / 2 of the 3 known defects |
1511
- | PR #2 | review | 60 s / 60 s | 3 / 3 | 13 / 12 | 87 K / 82 K (41 K / 30 K) | 2.7 K / 3.0 K | 2 / 2 of the 3 |
1512
- | PR #4, 35 files | quick | 45 s / 40 s | 2 / 2 | 8 / 5 | 206 K / 114 K (70 K / 66 K) | 2.4 K / 1.8 K | seeded regression in the diff 1 of 2; outside the diff 0 of 2 |
1513
- | PR #4 | review | 70 s / 40 s | 5 / 5 | 15 / 11 | 268 K / 203 K (133 K / 125 K) | 4.4 K / 3.1 K | in the diff 1 of 2; outside 0 of 2 |
1514
- | PR #3, 316 files | quick | 115 s / 110 s | 13 / 13 | 60 / 42 | 1.79 M / 1.38 M (0.54 M / 0.56 M) | 23 K / 22 K | 24 of 24 policy defects both times; configuration defect 0 of 2 |
1515
- | PR #3 | review | 266 s / 230 s | 31 / 30 | 135 / 106 | 4.25 M / 3.38 M (1.25 M / 1.21 M) | 60 K / 50 K | 24 of 24 both times; configuration defect 1 of 2 |
1516
-
1517
- - Cost: a quick review needed 36–50 % of the review's model requests and
1518
- 34–68 % of its input (42 % on the 316-file PR, 24–53 % of the uncached
1519
- input). Time fell to 45–63 % on the 1-file and 316-file PRs; on PR #4 one
1520
- review without candidates verified nothing and took 40 s, like the quick runs.
1521
- - Findings: no quick or review run reported a defect outside the known ones.
1522
- Every quick finding passed the runtime's checks (no NEEDS_INFO, no correction
1523
- turn); the location and read checks refused nothing in these runs. Severity
1524
- agreed across all four PR #3 runs for 23 of the 24 policy files (one review
1525
- rated `reservation_atomicity` high, the other runs medium).
1526
- - Duplicates across shards: on PR #3 the reviewer of the shard with eight
1527
- policy tests followed them into the policy implementations (changed files of
1528
- another shard) and filed the same defects there, so 7 and 8 of the 32 quick
1529
- findings repeat another finding on the same lines. Restricting where a quick
1530
- reviewer may file is not an option: the same path finds a defect whose test
1531
- and code are in different shards (PR #4's seeded regression outside the
1532
- diff). One review run also kept 13 same-line duplicates that its verifiers
1533
- did not merge (38 confirmed findings for 25 defects); the other merged all
1534
- of them. Single-shard PRs cannot produce cross-shard duplicates.
1535
- - Comment preview of a quick PR #4 review: the summary's disclosure line read
1536
- "AI 審查,非人工審查或核准。審查方式:快速審查,未經獨立驗證。模型:" followed by
1537
- the model ID, with the usual index and marker; the planner skipped the inline
1538
- comment because thread 235 (the earlier publication) already covers the
1539
- issue. Nothing was posted.
1540
- - Two runs per mode show how much both vary (the 1-file PR: 2 or 3 of 3; PR
1541
- #4's seeded regression in the diff: 1 of 2 in each mode); they do not
1542
- establish a quality difference.
1543
-
1544
- After combining cross-shard duplicates in comment planning was added, two
1545
- more quick runs of PR #3 with a comment preview (nothing posted):
1546
-
1547
- | Run | Review | Candidate pairs | Planning | Inline comments | Skipped |
1548
- | --- | --- | --- | --- | --- | --- |
1549
- | 1 | 160 s, 73 requests | 7 | 9 sessions, 12 requests (two correction turns on one page) | 1 | 31 |
1550
- | 2 | 120 s, 51 requests | 0 | 8 sessions, 9 requests | 2 | 30 |
1551
-
1552
- - No combination was made, for two reasons outside the combination rules.
1553
- PR #3 still carries the 24 comments published on 2026-10-11 (threads
1554
- 211–233, kept on purpose), and the planner skipped both members of every
1555
- candidate pair because one of those threads already discusses the defect.
1556
- In run 2 the reviewer of the shard with the policy tests located its eight
1557
- findings on the line of a region file that enables each policy instead of
1558
- the policy implementation, so they were in another file than their
1559
- repeats and no candidate. The combination path is therefore covered by
1560
- the offline and host fixtures only; a live check needs a multi-shard PR
1561
- without earlier comments.
1562
- - Run 2's eight misplaced findings passed the runtime's checks (the file
1563
- exists, the lines are in range, the session read it): the checks cannot
1564
- tell that a location is the wrong place for a defect. The planner refused
1565
- to anchor four of them on a region file, and the other four duplicate
1566
- existing threads; in a summary index they would show the region file as
1567
- their location. A verifier corrects such locations; a quick review does not.
1568
- - Run 1 reported one finding outside the known defects (a region route's
1569
- fallback that differs from its destination), which is unverified. Its
1570
- inline comment was refused after two correction turns because the planner
1571
- quoted lines that are not in the file, so it would appear only in the
1572
- summary index.
1573
-
1574
- Two changes followed: the quick prompts now say to file a defect the
1575
- reviewer's files lead it to at that other changed file's defective lines (a
1576
- configuration entry, test or caller that only uses the code is evidence, not
1577
- the location), and the 24 earlier comments on PR #3 were deleted so that
1578
- existing threads no longer cover its defects. Three more quick runs with a
1579
- comment preview, nothing posted:
1580
-
1581
- | Run | Review | Findings | Candidate pairs | Combined | Inline comments | Planning |
1582
- | --- | --- | --- | --- | --- | --- | --- |
1583
- | 1 | 130 s, 53 requests | 33: 24 of 24 policy defects and one unconfirmed region-fallback claim | 8 | 6 | 27 | 9 sessions, 10 requests, one correction turn |
1584
- | 2 | 120 s, 50 requests | 35: 24 of 24 | 9 | 9 | 25 | 9 sessions, 9 requests |
1585
- | 3 | 110 s, 63 requests | 32: 24 of 24 | 8 | 8 | 23 | 8 sessions, 9 requests, one correction turn |
1586
-
1587
- - No finding sat on a line that only uses the defective code.
1588
- - 23 of 25 candidate pairs became one comment. In run 1 the planner kept two
1589
- pairs apart, which the prompt allows when it is unsure, so those defects
1590
- would each get two comments. The correction turns added a missing
1591
- `mergeReason`. A combined comment keeps the usual layout and disclosure;
1592
- the summary index lists its IDs in one row, and the counts follow the rows
1593
- (run 3: 32 findings, 24 rows).
1594
- - Planning used one request per page of four findings, as without
1595
- candidates: 8–9 sessions and 9–10 requests for 32–35 findings.
1596
- - The region-fallback claim (one of these three runs, and one run before) is
1597
- not a planted defect, and neither review run reported it; it is
1598
- unconfirmed.
1599
-
1600
- ## Live runs: three modes on main and the quick follow-up (2026-10-18, review only)
1601
-
1602
- OpenCode 2.0.32, every role on `openai/gpt-6-luna`, `parallelSessions` 8,
1603
- debug on, nothing posted. Time is from the run's start to its end in the debug
1604
- records (without `/pr-check`); input is uncached plus cached prompt tokens.
1605
-
1606
- Main at `33fb851` (the merged `/pr-quick`): quick and review twice per PR (the
1607
- first run of each followed by a comment preview), deep once.
1608
-
1609
- | PR | Quick | Review | Deep |
1610
- | --- | --- | --- | --- |
1611
- | PR #2, 1 file | 34–36 s, 4 requests, 26–27 K input | 64–71 s, 12–13, 82–88 K | 68 s, 11, 77 K |
1612
- | PR #4, 35 files | 26–47 s, 4–7, 68–178 K | 60–62 s, 13, 203–212 K | 79 s, 18, 383 K |
1613
- | PR #3, 316 files | 119–151 s, 57–58, 2.07–2.18 M | 241–274 s, 127–147, 3.90–4.82 M | 245 s, 142, 4.44 M |
1614
-
1615
- - Comment planning on PR #3: after quick 169 s, 10 sessions, 136 K input, 24
1616
- inline comments (15 of them combined); after review 161 s, 8 sessions,
1617
- 162 K, 26 inline comments. On PR #2 and PR #4 existing threads already
1618
- covered every finding (5–8 s).
1619
- - Planted defects: PR #3 policies quick 24 and 23, review 24 and 24, deep 24;
1620
- its configuration defect quick 0 of 2, review 1 of 2, deep 0 of 1; PR #4's
1621
- seeded regression in the diff quick 1 of 2, review 2 of 2, deep 1 of 1, the
1622
- one outside the diff in no run.
1623
- - In the second PR #4 quick run the reviewer of the 25-file shard read the 25
1624
- diffs in one request and answered PARTIAL in the next ("callers, related
1625
- tests and function context not read") without a tool error, truncation or
1626
- limit; the run reported incomplete coverage and no finding. In all recorded
1627
- PR #4 initial sessions since 2026-10-11, those that answered after two
1628
- requests found the seeded regression in 2 of 24, the others in 85 of 144. On
1629
- PR #3, whose planted defects are visible in the diff, two-request sessions
1630
- found all of theirs.
1631
-
1632
- This revision adds the quick follow-up (a usable PARTIAL answer that names
1633
- unfinished work gets one more turn in the same session). The two AZPR comments
1634
- on PR #4 were deleted first (one described the seeded regression; earlier
1635
- quick runs had not read threads). Ten PR #4 and two PR #3 quick runs each: A
1636
- is this revision, B adds one sentence to `quick.md` ("If a check you need is
1637
- unfinished and the source it needs is readable with AZPR's tools, continue it
1638
- before you answer; if a limit remains, keep PARTIAL and state it in
1639
- coverage.gaps.").
1640
-
1641
- | | PR #4 A | PR #4 B | PR #3 A | PR #3 B |
1642
- | --- | --- | --- | --- | --- |
1643
- | Time (mean) | 40 s | 45 s | 156 s | 116 s |
1644
- | Requests (mean) | 5.3 | 6.5 | 73 | 61 |
1645
- | Input (mean, uncached) | 124 K (55 K) | 170 K (64 K) | 2.22 M (0.62 M) | 2.27 M (0.58 M) |
1646
- | Sessions with at most two requests | 11 of 20 | 7 of 20 | 0 of 26 | 3 of 26 |
1647
- | Planted defects | regression 7 of 10 | 8 of 10 | policies 24, 22; configuration 0 of 2 | 24, 24; 0 of 2 |
1648
- | PARTIAL answers and follow-ups | 0 | 0 | 0 | 0 |
1649
-
1650
- - No reviewer answered PARTIAL in these 24 runs, so the follow-up never ran
1651
- live; its behaviour rests on the offline and exact-host tests.
1652
- - With B the reviewer of PR #4's first shard read past the diffs in every run
1653
- (A: two runs answered after two requests), for 37% more input on PR #4 and
1654
- about the same on PR #3, where B had more two-request sessions. One more
1655
- regression hit in ten runs is within run-to-run variation (one A run on PR
1656
- #3 spent 30 requests in one shard). B is not part of this revision.
1657
-
1658
- ## Live runs: skip causes and page-scoped planning input (2026-10-18, preview only)
1659
-
1660
- Same setup. The AZPR comments on PR #2 and PR #4 were deleted first (PR #3 had
1661
- none), so every PR's planning writes real comments; nothing was posted. One
1662
- quick and one review run per PR with a comment preview, compared with the
1663
- preview runs on `33fb851` above (PR #2 and PR #4 skipped every finding there
1664
- because earlier threads covered them).
1665
-
1666
- | PR #3 planning | `33fb851` quick | this revision quick | `33fb851` review | this revision review |
1667
- | --- | --- | --- | --- | --- |
1668
- | Payload per page (mean) | 27.8 K characters | 11.0 K | 27.8 K | 11.1 K |
1669
- | Input (uncached + cached) | 136 K (93 K + 43 K) | 67 K (44 K + 23 K) | 162 K (86 K + 76 K) | 80 K (38 K + 42 K) |
1670
- | Time | 169 s | 140 s | 161 s | 163 s |
1671
- | Sessions, requests, correction turns | 10, 12, 3 | 9, 9, 0 | 8, 13, 1 | 9, 11, 0 |
1672
- | Inline comments | 24 (15 combined, 15 candidate pairs) | 24 (10 combined, 10 pairs) | 26 of 30 findings | 33 of 34 |
1673
- | Skips | none | 1 `low-severity` | 2 low, 2 "no source passage" with the file in the page | 1 `low-severity` |
1674
-
1675
- - The page-scoped lists halved planning input on the 316-file PR; time did not
1676
- follow the input, since a page's time goes to writing its answer.
1677
- - Every planner skip named a valid cause and none needed a correction turn. No
1678
- planner claimed missing source this time, so the cause check did not trigger
1679
- live; the offline tests and the planning test cover it.
1680
- - Every candidate pair of the quick runs became one comment, as before.
1681
- - PR #2 now gets its three comments in either mode (18 s of planning); PR #4's
1682
- review gets one, and its quick run had no finding to plan.
1683
-
1684
- ## Live runs: gpt-6.1-sol on the old and new revision (2026-10-18, preview only)
1685
-
1686
- OpenCode 2.0.32, every role on `openai/gpt-6.1-sol` (default variant), the
1687
- same settings, no AZPR comments on the three PRs, nothing posted. Each PR ran
1688
- `/pr-quick`, `/pr-review` and `/pr-deep` once on `33fb851` (old) and once on
1689
- this revision (new), each followed by a comment preview; old and new were
1690
- installed alternately per PR. Cost is the API equivalent at OpenAI's Standard
1691
- prices (gpt-6.1-sol $2.00 input, $0.10 cached input, $10.00 output per million
1692
- tokens; gpt-6-luna $0.10, $0.01, $0.50; reasoning counted as output); the
1693
- ChatGPT sign-in the runs used reports no cost. Every reported finding outside
1694
- the planted defects was checked against the source at both commits.
1695
-
1696
- | PR | Mode | Review time (old / new) | Review input | Review cost | Planning (old / new) | Findings |
1697
- | --- | --- | --- | --- | --- | --- | --- |
1698
- | PR #2 | quick / review / deep | 42 / 43 s, 99 / 100 s, 93 / 93 s | 25 K, 85 K, 87 K | $0.04, $0.13, $0.11–0.13 | 23–24 s, 6 K input | the 3 known defects in every run |
1699
- | PR #4 | quick | 132 / 155 s | 0.61 / 1.11 M | $0.41 / $0.52 | 45 s, 15–16 K | both seeded regressions in every run, plus 1–2 confirmed and 1 debatable defect |
1700
- | PR #4 | review | 260 / 310 s | 1.74 / 1.87 M | $1.09 / $1.11 | 50 / 54 s | both seeds, plus 3 confirmed and 1–2 debatable |
1701
- | PR #4 | deep | 270 / 332 s | 1.82 / 2.25 M | $1.12 / $1.21 | 48 / 57 s | both seeds, plus 1–3 confirmed and 1–2 debatable |
1702
- | PR #3 | quick | 191 / 198 s | 2.06 / 2.12 M | $1.75 / $1.79 | 219 / 218 s, 153 / 97 K | 24 of 24 policies (50 findings, planned as 24 comments); configuration 0 |
1703
- | PR #3 | review | 355 / 382 s | 4.22 / 4.51 M | $3.81 / $3.84 | 156 / 150 s, 76 / 47 K | 24 of 24 (24 findings); configuration 0 |
1704
- | PR #3 | deep | 390 / 371 s | 4.58 / 4.62 M | $4.05 / $3.91 | 154 / 153 s, 82 / 47 K | 24 of 24 (24 findings); configuration 0 |
1705
-
1706
- - Accuracy: none of the 250 reported findings was false. On PR #4 the model
1707
- also found five real regressions of the PR besides the seeds (chained
1708
- pipeline constraints overwrite each other, a case transform exceeds
1709
- max_length, nested serialization schemas disagree with the JSON schema, a
1710
- PEP 585 generic alias skips `__get_pydantic_core_schema__`, a resolved `Self`
1711
- keeps a stale origin) and two real but debatable changes (validation-mode
1712
- schemas follow `ser_json_temporal`, model ser schemas use the prebuilt
1713
- serializer). No verifier rejected a planted or known defect. gpt-6-luna on
1714
- the same day never found PR #4's second seed, reported two false PR #3
1715
- findings on test files (in review and deep) and had one review reject a
1716
- known PR #2 defect.
1717
- - Cost and time: each version's nine runs cost about $13.4 with planning
1718
- (luna: under $0.6), a PR #3 review about $3.8 (luna $0.17–0.19). The input
1719
- volume was close to luna's; time was 1.3–1.6 times luna's on PR #2 and PR #3
1720
- and 3–5 times on PR #4, where the model read more (13–41 requests against
1721
- 4–18).
1722
- - Old against new: the review stages did not differ beyond run-to-run
1723
- variation and no PARTIAL answer occurred, so no follow-up ran. Planning input
1724
- fell by 37–43 % on PR #3 (planning time unchanged), every skip of the new
1725
- revision named a cause (`low-severity`) and none needed a correction turn.
1726
-
1727
- ## Live runs: planning two pages at a time (2026-10-19, preview only)
1728
-
1729
- OpenCode 2.0.32, every role on `openai/gpt-6-luna`, nothing posted. Three
1730
- saved reviews were planned again with `/pr-comment <review-id>`, which gives
1731
- every run the same findings, report and source: two of PR #3 (a quick review
1732
- with 35 findings and a review with 34, nine pages each) and one of PR #4 (a
1733
- review with 7 findings, two pages). `03fcf8a` (pages one at a time, with
1734
- `priorPages`) planned each once; this revision planned each once with
1735
- `workflow.parallelSessions` 1 (one page at a time, no `priorPages`) and twice
1736
- with the usual 8 (two pages at a time).
1737
-
1738
- | Planning time | `03fcf8a` | this revision, one at a time | this revision, two at a time |
1739
- | --- | --- | --- | --- |
1740
- | PR #3 quick, 9 pages | 141 s (140 s on 2026-10-18) | 157 s | 76 s, 71 s |
1741
- | PR #3 review, 9 pages | 175 s (163 s on 2026-10-18) | 161 s | 90 s, 86 s |
1742
- | PR #4 review, 2 pages | 48 s | 47 s | 28 s, 27 s |
1743
-
1744
- - Two pages at a time halved planning on the nine-page plans and cut the
1745
- two-page plan by 42 %. Every two-lane run had two planner sessions in flight
1746
- and never more; with `parallelSessions` 1 the pages ran one at a time, and
1747
- removing `priorPages` alone did not change the time.
1748
- - Every two-lane run finished pages out of order (page 2 before page 1, page 4
1749
- before page 3, page 8 before page 7). Rebuilding each plan offline from its
1750
- pages in page order reproduced the saved plan exactly (every finding's
1751
- marker, the comment texts and the summary) for all 14 plans compared,
1752
- including the earlier ones.
1753
- - Every finding got the same decision (comment or skip, with the same cause)
1754
- in all plans of a review. Anchor lines agreed on 34 of 34 PR #3 quick
1755
- comments in every pair of plans and on 31–33 of 33 review comments; on PR #4
1756
- the planner chose different lines for 1–5 of 7 comments between any two
1757
- plans, including the two two-lane runs (4 of 7 equal), so this is the
1758
- planner's own variation. The quick plans combined the same 10 candidate
1759
- pairs in the two runs of `03fcf8a` and both two-lane runs; the one-lane run
1760
- combined 6: it left apart the two pairs of page 4 and those of page 1, whose
1761
- input carries nothing from other pages in either version.
1762
- - The first page wrote the summary note in every plan; no other page wrote one,
1763
- so the runtime never had to drop one. One correction turn occurred, in the
1764
- one-lane quick run (a page left a finding unaccounted).
1765
- - Input and output stayed at 63–80 K and 6–8 K tokens per PR #3 plan. The
1766
- cached share of the input rose from 29–34 % in the first runs to 84–100 % in
1767
- the two-lane runs because the same pages had just been planned, not because
1768
- of the lanes.
1769
- - End to end on this revision, a new `/pr-quick` of PR #3 was COMPLETE in
1770
- 255 s and its preview planned 8 pages in 62 s (24 inline comments, 6 of them
1771
- combined pairs); a new `/pr-review` was COMPLETE in 223 s and its preview
1772
- planned 8 pages in 80 s (29 inline comments; one correction turn for a skip
1773
- that relied on another finding, after which the planner commented on it).
1774
- Both finished pages out of order and rebuilt exactly. On 2026-10-18 the same
1775
- PR's previews had planned 9 pages in 140 s (quick) and 163 s (review).
1776
-
1777
- ## Deep versus review (2026-10-19)
1778
-
1779
- No new runs: this compares the 2026-10-18 runs above. Until this revision a
1780
- deep agent's system prompt was the review agent's plus `deep.md` (854
1781
- characters, the same text for all four roles) asking for more scrutiny; most of
1782
- it restated `common.md`, `functional.md`, `risk.md` and `final.md`. Stages,
1783
- inputs, tools, shards and correction turns were already the same. gpt-6-luna
1784
- ran `/pr-review` five times per PR (twice on the `/pr-quick` branch, twice on
1785
- `33fb851`, once on the following revision) and `/pr-deep` once on `33fb851`;
1786
- gpt-6.1-sol ran each twice.
1787
-
1788
- | PR | gpt-6-luna review | gpt-6-luna deep | gpt-6.1-sol review | gpt-6.1-sol deep |
1789
- | --- | --- | --- | --- | --- |
1790
- | PR #2, 1 file | 57–75 s, 82–93 K input; the 3 known defects in 2 runs, 2 of them in 3 (one rejected by the verifier) | 68 s, 77 K; all 3 | 99–100 s, 85–86 K; all 3 | 93 s, 87–88 K; all 3 |
1791
- | PR #4, 35 files | 37–68 s, 203–278 K; seeded regression in the diff 4 of 5, outside the diff 0 of 5 | 79 s, 383 K; in the diff only | 260–310 s, 1.74–1.87 M; both, plus 3 other real regressions in each run | 270–332 s, 1.82–2.25 M; both, plus 1 and 3 |
1792
- | PR #3, 316 files | 226–289 s, 3.38–4.82 M; policies 24 of 24, configuration 2 of 5, one false finding in five runs | 245 s, 4.44 M; 24 of 24, no configuration, one false finding | 355–382 s, 4.22–4.51 M; 24 of 24 | 371–390 s, 4.58–4.62 M; 24 of 24 |
1793
-
1794
- - The deep text changed what gpt-6-luna read on PR #4, not what it found: the
1795
- review's functional and risk sessions read the 35 diffs with 0–5 whole files
1796
- and 0–3 searches, while deep's functional reviewer searched 10 times and its
1797
- risk reviewer read 7 files and searched 8 times (8 requests against 4–5).
1798
- That cost 38–89 % more input, and the regression outside the diff stayed
1799
- missed. On PR #2 and PR #3 deep stayed within the review's run-to-run range.
1800
- - gpt-6.1-sol already reads past the diffs in a review, and deep made no
1801
- difference beyond run-to-run variation (on PR #3 about 5 % more input).
1802
- - What changed results was the model: on 2026-10-18 gpt-6.1-sol found both
1803
- seeded regressions in all six of its runs (quick, review and deep), while
1804
- gpt-6-luna never found the one outside the diff, nor did it with high
1805
- reasoning effort earlier (see the model runs above).
1806
-
1807
- This revision drops `deep.md`: `/pr-deep` runs exactly the review's system
1808
- prompts with the models of `models.deep`, so the gpt-6.1-sol review runs above
1809
- describe a deep review with that model. Since the models are the only
1810
- difference, `models.deep` is for stronger models than `models.review`; with the
1811
- same models `/pr-deep` repeats `/pr-review`.
1812
-
1813
- Live check of this revision (2026-10-19, `models.deep` on gpt-6.1-sol, review
1814
- and quick on gpt-6-luna, previews only): `/pr-check` was READY and listed the
1815
- deep models as checked; every deep stage's system prompt was the review
1816
- prompt byte for byte.
1817
-
1818
- | PR | Review | Input (cached) | API cost | Findings | Preview |
1819
- | --- | --- | --- | --- | --- | --- |
1820
- | PR #2, 1 file | COMPLETE, 86 s, 12 requests | 86 K (58 %) | $0.12 | the 3 known defects | 3 inline comments, 22 s |
1821
- | PR #4, 35 files | COMPLETE, 351 s, 41 requests | 2.29 M (83 %) | $1.22 | both seeded regressions, two findings on another real one (chained pipeline constraints) and two debatable ones; none false | 1 inline comment; 5 findings skipped because threads of an earlier publication covered them, 21 s |
1822
-
1823
- No stage was retried, failed, stopped idle or hit a tool error; one PR #4
1824
- reviewer answer repeated a JSON key and was fixed in its correction turn.
1825
-
1826
- ## Live runs: the three modes after the deep change (2026-10-19, preview only)
1827
-
1828
- Two batches on OpenCode 2.0.32 with `workflow.parallelSessions` 8 and
1829
- `azure.concurrency` 6, each review followed by a comment preview; nothing was
1830
- posted. `d7cd0ac` ran `/pr-quick` and `/pr-review` with every role on
1831
- `openai/gpt-6-luna`; `e673889` ran all three modes, `/pr-deep` with
1832
- `openai/gpt-6.1-sol` in `models.deep`. Later revisions changed only how the PAT
1833
- is read. The `e673889` batch:
1834
-
1835
- | PR | Mode (model) | Review | Sessions / requests | Input (cached) | API cost | Findings | Preview (inline) |
1836
- | --- | --- | --- | --- | --- | --- | --- | --- |
1837
- | PR #2, 1 file | quick (luna) | COMPLETE, 37 s | 1 / 5 | 32 K (70 %) | < $0.01 | the 3 known defects | 18 s (3) |
1838
- | | review (luna) | COMPLETE, 84 s | 3 / 15, 2 corrections | 115 K (66 %) | $0.01 | 2 of the 3; the verifier rejected the partial reservation with a reason that confirms it | 22 s (3) |
1839
- | | deep (sol) | COMPLETE, 100 s | 3 / 12 | 86 K (64 %) | $0.11 | the 3 known defects | 22 s (3) |
1840
- | PR #4, 35 files | quick (luna) | COMPLETE, 47 s | 2 / 9 | 240 K (70 %) | $0.01 | the seeded regression in the diff only | 10 s (1) |
1841
- | | review (luna) | COMPLETE, 58 s | 5 / 14 | 342 K (64 %) | $0.02 | no candidate for either seeded regression | 3 s (0) |
1842
- | | deep (sol) | COMPLETE, 249 s | 5 / 36 | 1.61 M (78 %) | $1.07 | both seeded regressions, 2 other real ones, 1 debatable, none false | 32 s (5) |
1843
- | PR #3, 316 files | quick (luna) | COMPLETE, 107 s | 13 / 53 | 1.91 M (67 %) | $0.09 | policies 24 of 24, not the configuration defect, nothing else | 56 s (25) |
1844
- | | review (luna) | COMPLETE, 239 s | 31 / 143 | 4.60 M (71 %) | $0.19 | 24 of 24 (one rejected candidate was covered by another), not the configuration defect, nothing else | 51 s (23; 1 low skipped) |
1845
- | | deep (sol) | COMPLETE, 394 s | 32 / 145 | 4.51 M (70 %) | $3.80 | 24 of 24, not the configuration defect, nothing else | 75 s (24) |
1846
-
1847
- - Execution: the 18 runs of this batch (nine reviews, nine previews) had no
1848
- AZPR retry, failed stage, inactivity stop, PARTIAL answer (so no quick
1849
- follow-up), tool error or timeout, blocked native tool, Azure DevOps retry or
1850
- warning, and every session was confirmed stopped. The only correction turns
1851
- were two for the PR #2 luna verifier: it merged a duplicate into a finding it
1852
- had rejected, then confirmed that finding without its fields. When the eight
1853
- gpt-6.1-sol functional shards of PR #3 started together, OpenCode resent each
1854
- first request once after about 2 s; no stage needed a second attempt.
1855
- - All nine plans rebuilt exactly from their pages in page order; four had
1856
- finished pages out of order.
1857
- - The `d7cd0ac` batch (12 runs) was as clean, without a correction turn. PR #2
1858
- had the 3 known defects and PR #3 24 of 24 in both modes. On PR #4 quick
1859
- found the seeded regression in the diff; in the review the risk reviewer
1860
- found it too, but the verifier rejected it with a reason ending "so the
1861
- candidate's claim does in fact hold". PR #3's 8–9 planning pages took
1862
- 71–72 s (140–175 s one page at a time on 2026-10-18).
1863
- - The `e673889` batch took 12.2 minutes and $0.33 API-equivalent for the six
1864
- luna runs (reviews and previews), and 14.5 minutes and $5.19 for the three
1865
- sol runs, $0.20 of it planning.
1866
- - Prompt cache: the 316-file PR read 67–71 % of its input from the cache in
1867
- all three modes (11–21 % on OpenCode 2.0.22).
1868
-
1869
- ## PAT scopes and `azure.patFile` (2026-10-21)
1870
-
1871
- A new PAT for the test organization, organization-scoped with an expiry and only
1872
- **Code (Read)** and **Pull Request Threads (Read & write)**, replaced the earlier
1873
- token on OpenCode 2.0.32 with `e673889` installed.
1874
-
1875
- - Reads: `/pr-check` was READY on PR #2 (PR metadata, changed files, HEAD and
1876
- BASE reads, 164 threads), and `/pr-quick` with a comment preview was COMPLETE
1877
- (PR, iterations, changes, commits, files and a folder listing). The repository
1878
- archive that content search downloads answered HTTP 200 with a zip.
1879
- - Write: thread creation, the only Azure DevOps write AZPR makes, answered
1880
- HTTP 200 on the same PR; the comment read back and was then deleted, which
1881
- the same scope allows. `/pr-comment --publish` could not show the write on
1882
- that PR: AZPR records each thread it created by marker and never sends that
1883
- marker again, and the PR's earlier AZPR comments had been deleted by hand, so
1884
- all four items stayed UNVERIFIED without a request.
1885
- - `azure.patFile`: with this revision installed, `settings.json` set `pat` to
1886
- empty and `patFile` to the PAT file (mode 600). `/pr-check` was READY and
1887
- showed "PAT from azure.patFile" without the path, `/pr-quick` with a preview
1888
- was COMPLETE, and a scan of the configuration, state and OpenCode data
1889
- directories found the PAT only in that file.
1890
- - An external review found that a FIFO named by `azure.patFile` made opening it
1891
- wait for a writer, so loading hung (even process exit waited for the blocked
1892
- thread). Opened without blocking, a FIFO is now refused in 5 ms under
1893
- OpenCode's Bun 1.4.2 and 7 ms under Node 22, and `/pr-check` with the PAT
1894
- file stayed READY on OpenCode 2.0.32.
1895
-
1896
- ## Verifier decisions on known defects (debug records, 2026-10-10 to 2026-10-19)
1897
-
1898
- The saved results and debug records of the 108 review and deep reviews of the
1899
- three test PRs, earlier revisions included, were checked offline: for every
1900
- functional or risk candidate that matches a known defect, the verifier's
1901
- decision, and whether the defect was still among the publishable findings
1902
- afterwards.
1903
-
1904
- | Verifier | Reviews | Known defects among the candidates | Lost at verification |
1905
- | --- | --- | --- | --- |
1906
- | gpt-6-luna | 48 | 423 | 3, in 3 reviews |
1907
- | gpt-6.1-sol | 21 | 158 | none |
1908
- | gpt-5.6-luna | 22 | 373 | 2, in 1 review |
1909
- | gpt-5.6-terra | 15 | 135 | 5, in 5 reviews |
1910
-
1911
- - gpt-6-luna lost PR #2's partial reservation in 2 of 14 reviews and PR #4's
1912
- regression in the diff in 1 of 18, and none of 371 on PR #3. In two of the
1913
- three the rejection's own reason establishes the defect ("so the candidate's
1914
- claim does in fact hold"; "contradicts the README's contract that a rejected
1915
- batch leaves stock and history unchanged"): the answer filed a defect it had
1916
- checked under `rejected`. In the third the verifier described the base's
1917
- validate-then-deduct order as the head's. All three came from the first
1918
- answer, not from a correction turn. Two reviews with gpt-6-luna#high lost
1919
- none.
1920
- - gpt-5.6-luna lost two policies in one review: it rejected two candidates as
1921
- "a valid issue; see the confirmed item with the same root cause" and merged
1922
- their duplicates into them. A merge into a rejected finding now gets a
1923
- correction turn.
1924
- - gpt-5.6-terra rejected the configuration defect in all five reviews whose
1925
- reviewers found it, each time because no code reads the routing settings the
1926
- change drops, so no failure is reachable: a stricter bar for evidence, not a
1927
- contradiction.
1928
-
1929
- ### A stronger verifier behind gpt-6-luna reviewers (2026-10-22, review only)
1930
-
1931
- OpenCode 2.0.32 with this revision; `models.deep` held gpt-6-luna functional
1932
- and risk reviewers and a gpt-6.1-sol verifier, so `/pr-deep` ran the review
1933
- with only the verifier changed, alternating with `/pr-review` on gpt-6-luna.
1934
- All 28 reviews were COMPLETE; nothing was posted.
1935
-
1936
- | PR | Verifier | Reviews | Review | API cost per review (verifier) | Known defects kept | Correction turns |
1937
- | --- | --- | --- | --- | --- | --- | --- |
1938
- | PR #2, 1 file | gpt-6-luna | 8 | 58–82 s | $0.006 ($0.002) | all 3 in 7 runs; in the 8th no reviewer proposed the partial reservation | 1 |
1939
- | | gpt-6.1-sol | 8 | 75–88 s | $0.049 ($0.046) | all 3 in all 8 | none |
1940
- | PR #4, 35 files | gpt-6-luna | 4 | 41–69 s | $0.016 ($0.002) | the regression in the diff in 2 | none |
1941
- | | gpt-6.1-sol | 4 | 39–95 s | $0.065 ($0.050) | the regression in the diff in 3 | none |
1942
- | PR #3, 316 files | gpt-6-luna | 2 | 245–300 s | $0.19 ($0.02) | policies 24 of 24 | 3 |
1943
- | | gpt-6.1-sol | 2 | 266–335 s | $0.66 ($0.41) | policies 24 of 24 | none |
1944
-
1945
- - Neither verifier lost a known defect this time. The gpt-6-luna verifier once
1946
- more rejected PR #2's partial reservation with a reason saying that it should
1947
- not be rejected; a duplicate candidate that it confirmed kept the defect. The
1948
- gpt-6.1-sol verifier rejected no known defect; on PR #3 it rightly rejected a
1949
- luna candidate claiming that schema-1 routes lose their retry fields.
1950
- - The PR #4 difference came from the reviewers: in the other runs no candidate
1951
- named the regression in the diff. Neither combination found the one outside
1952
- the diff.
1953
- - The gpt-6.1-sol verifier cost 8, 4 and 3.4 times the luna review on the
1954
- three PRs and added 9–29 s; a gpt-6.1-sol deep review costs $0.11, $1.07 and
1955
- $3.80 there.
1956
-
1957
- With the debug records above, the gpt-6-luna verifier lost 3 known defects in
1958
- 62 reviews and the gpt-6.1-sol verifier none in 35. A stronger model in
1959
- `models.review.verifier` keeps more of what the reviewers find at a few times
1960
- the luna cost; it does not change what they find.
1961
-
1962
- ## Live publication with this revision (2026-10-22)
1963
-
1964
- OpenCode 2.0.32 with this revision, gpt-6-luna for review and quick.
1965
-
1966
- - PR #3, 316 files: `/pr-review` was COMPLETE in 271 s (policies 24 of 24;
1967
- 66 candidates, 24 publishable; $0.18 API-equivalent). `/pr-comment
1968
- --publish` planned 6 pages in 67 s without a correction turn and posted the
1969
- summary and 23 inline comments, all VERIFIED; the one low finding went to
1970
- the summary index. No skip relied on another finding (the correction turn
1971
- for one was seen live in a preview on 2026-10-19). A second publish found
1972
- all 24 ALREADY_PRESENT.
1973
- - Deleting three of those inline comments in Azure DevOps left their threads
1974
- listed, flagged deleted, with the comments flagged deleted and without
1975
- content. The next publish was POSTED with 21 ALREADY_PRESENT and 3 DELETED,
1976
- using four GET requests and no write.
1977
- - PR #2, 1 file: a `/pr-quick` (35 s) planned exactly the four items that AZPR
1978
- had posted there on 2026-10-11 and that were later deleted by hand; on
1979
- 2026-10-21 publishing them had given four UNVERIFIED items and FAILED. This
1980
- revision reported four DELETED items, the receipt POSTED, with four GET
1981
- requests and no write. With that PR's publication record moved aside, the
1982
- same quick review then posted its summary and three inline comments, all
1983
- VERIFIED and each naming the quick method in its disclosure line; a second
1984
- publish found all four ALREADY_PRESENT.
1985
- - PR #4: two quick reviews (25 and 34 s) reported no finding, so nothing was
1986
- posted there.
1987
-
1988
- ## Reviewer rounds and session cleanup (debug records, offline tests)
1989
-
1990
- A stability review proposed batch parameters for `azpr_read_diff` and
1991
- `azpr_read_file`, because one gpt-6-luna session under the earlier prompts had
1992
- made 28 model requests with about one tool call each. The debug records of all
1993
- 133 live runs above show that this was an outlier: reviewers already batch by
1994
- making several tool calls in one response. With the final prompts:
1995
-
1996
- | Model | Sessions | Model requests per session (most) | Tool calls per round |
1997
- | --- | ---: | ---: | ---: |
1998
- | gpt-5.6-luna | 123 | 5.4 (10) | 10.5 |
1999
- | gpt-5.6-terra | 78 | 4.4 (6) | 12.2 |
2000
- | gpt-6-luna | 30 | 4.4 (9) | 9.3 |
2001
-
2002
- The first round reads every assigned diff at once (25 in a full shard); later
2003
- rounds follow leads that depend on what was read. gpt-6-luna makes 29 of its 71
2004
- later rounds with a single call, so a batch parameter could save it about one
2005
- request per session at most. Batch parameters were not added. The comment
2006
- planner's forced final answer (tools removed and an instruction added after 12
2007
- requests) never triggered in 21 live planning sessions (18 needed one request,
2008
- the most was 9), so its effect on prompt caching was left as is. Only 1 of
2009
- those 21 sessions returned CONTINUE (an early revision that made the planner
2010
- read the PR threads; a second session finished the page). A page now gets at
2011
- most three continuation sessions, so a planner that keeps reading without
2012
- finishing cannot open sessions without end; an offline test shows the fourth
2013
- session ending the page while the next page is planned as usual. Cache reads
2014
- stay at 11–21 % of input in these runs; see the roadmap.
2015
-
2016
- Reviewer sessions of an evicted review or an unfinished run are now deleted
2017
- eight at a time, each deletion still limited to five seconds. A host that
2018
- stalls on deletion delays the receipt by one limit per eight sessions instead
2019
- of one per session: about 20 s instead of 2.5 minutes for the 30 sessions of a
2020
- PR #3 review. An offline test uses a host that never confirms a deletion.
2021
-
2022
- ## Host retries and stage inactivity (OpenCode 2.0.22, debug records)
2023
-
2024
- A stability review asked whether OpenCode's own retry of a failed provider
2025
- request is refused by AZPR's `model.request` hook, which accepts a primary
2026
- request only after an authorized `context` hook, and noted that a stage could
2027
- wait without limit. Checked on 2026-10-14 in the OpenCode 2.0.22 binary, the
2028
- debug records of the live runs above and the exact-host fixture:
2029
-
2030
- | Question | Observed |
2031
- | --- | --- |
2032
- | How OpenCode retries | `SessionRunner.runStep` handles a retry before any output, a continuation after partial output and a WebSocket recovery the same way: it waits, then prepares the request again, and `SessionModelRequest.prepare` triggers `context` and then `model.request`. A resend therefore always follows an authorized context. Backoff starts at 2 s and is capped at 10 s, at most 10 retries; `Retry-After` of rate-limit and provider-internal errors is honoured up to 15 minutes; transport timeouts are retried at most 3 times. |
2033
- | Host retries in live runs | 1,101 stage records of 71 live runs (2026-10-10 to 10-14): 10 stages saw a host retry (attempt 2, allowed by the `retry` hook). In each, the authorized primary requests equalled the observed ones and none was rejected; 9 completed and 1 failed for an unrelated reason (a continuation after a turn with tool calls, which is refused by design and retried in a new session). The only rejected requests, in 3 stages, were compaction requests. The stability review had counted no host retry. |
2034
- | How long OpenCode waits for a provider | An HTTP (SSE) response is aborted after 5 minutes without headers or data (`headerTimeout` and `chunkTimeout` default to 300,000 ms). OpenCode's OpenAI integration uses the WebSocket session transport by default, whose wait for data defaults to 30 minutes, and a timed-out read can be retried. |
2035
- | Normal quiet time | In the 1,097 live stages that ended normally, the longest stretch without a prompt admission, model request, tool start or end or host retry was 151 s, while a final answer was written; the 99th percentile was 120 s and the median 23 s. These stretches include answers being streamed, which count as activity too (next row), so the quiet time the watchdog sees is shorter. The 4 other stages are the 2026-10-10 run in which native `grep` calls waited for an approval for 1,688–1,813 s (such requests are refused at once since). |
2036
- | What a plugin sees while a model streams | A probe plugin on OpenCode 2.0.22, while a fixture provider streamed one chunk per second: the projected session context kept the answer text empty until the step ended and `session.get` did not change, but `event.subscribe()` delivered one `session.text.delta` event per chunk, carrying the session ID. The feed also has reasoning and tool-input deltas, tool progress and step events, and `return()` on its iterator ends the subscription at once. An external review of this revision showed why it matters: before streamed output counted as activity, an answer streaming one chunk per second through a 60 s window was stopped at 60.9 s, 0.9 s after its last chunk. AZPR now follows these events while a stage is watched. |
2037
- | Reviews without candidates | 3 of 71 runs (PR #4, gpt-6-luna) produced no candidate finding. Their verifier sessions took 6–14 s with 1–3 requests and added no finding, but they condensed the four initial reports into the report's checks and limitations; one checked and relayed a narrowed test assertion, the same advice that comment planning turned into the published PR #4 summary. Without the verifier that section would be empty or four unedited reports, so it still runs. No PR without changed files occurred; such a PR now stops before any session. |
2038
-
2039
- So host retries needed no change. The watchdog's default of 600 s is four
2040
- times the longest quiet stretch observed; a stopped stage is retried like a
2041
- transient failure, and its error names the last activity.
2042
-
2043
- ## Known limitations
2044
-
2045
- - **Tested environment.** OpenCode CLI 2.1.4 (V2 plugin API) on Ubuntu 22.04
2046
- under WSL2. Other OpenCode 2.x versions add a host notice to receipts and
2047
- are not validated; OpenCode 1.x is not supported. Other operating systems
2048
- are not validated yet.
2049
- - **Azure DevOps Services only.** Azure DevOps Server (on-premises) is not
2050
- supported by the current URL handling.
2051
- - **File encoding and size.** Files are read as UTF-8, so text in another
2052
- encoding, such as Big5 or Shift_JIS, reaches the reviewers with replacement
2053
- characters. Binary files and files over 10 MB are reported but not shown,
2054
- and content search covers a commit archive of at most
2055
- `azure.archiveMegabytes` (100 MB by default).
2056
- - **Corporate proxies.** AZPR has run live through a company HTTP proxy with
2057
- `azure.verifyTls: false`. Trusting an inspecting proxy's root CA with
2058
- `azure.caFile` is verified with a test proxy only, and proxies that require
2059
- NTLM or Kerberos authentication are not supported directly.
2060
- - **Quick reviews are not independently verified.** `/pr-quick` reports what
2061
- one reviewer per shard found and says so in its report and comments; use
2062
- `/pr-review` when findings need a second check.
2063
- - **Findings depend on the model.** Results vary between models and between
2064
- runs of the same model. On the 35-file test PR, gpt-6.1-sol found a defect
2065
- whose evidence spans a test and unchanged code in another shard, which
2066
- gpt-6-luna missed; `/pr-deep` runs the same review with stronger models.