opencode-azure-devops-pr-review 0.2.2 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +18 -3
- package/CHANGELOG.md +49 -0
- package/CODE_OF_CONDUCT.md +83 -0
- package/CONTRIBUTING.md +4 -3
- package/README.md +79 -31
- package/docs/ARCHITECTURE.md +37 -6
- package/docs/AZURE_DEVOPS.md +3 -0
- package/docs/COMMENTING.md +79 -0
- package/docs/DEBUGGING.md +7 -6
- package/docs/DEMO.md +45 -1
- package/docs/ENTERPRISE.md +1 -1
- package/docs/QUICKSTART.md +35 -9
- package/docs/RELEASING.md +2 -2
- package/docs/ROADMAP.md +13 -3
- package/docs/VALIDATION.md +313 -42
- package/docs/VALIDATION_HISTORY.md +40 -0
- package/docs/assets/RECORDING.md +9 -2
- package/docs/assets/adjust-findings-teaser.gif +0 -0
- package/docs/assets/adjust-preview.png +0 -0
- package/docs/assets/adjust-publication.png +0 -0
- package/docs/assets/render-terminal-demo.py +1 -1
- package/docs/releases/v0.2.3.md +93 -0
- package/docs/releases/v0.3.0.md +125 -0
- package/install.sh +1 -1
- package/package.json +3 -2
- package/src/attribution.mjs +1 -1
- package/src/azure.mjs +30 -6
- package/src/comment-work.mjs +30 -9
- package/src/comments.mjs +184 -4
- package/src/host.mjs +9 -8
- package/src/output.mjs +71 -0
- package/src/runtime.mjs +108 -26
- package/src/session.mjs +10 -3
package/src/session.mjs
CHANGED
|
@@ -165,15 +165,18 @@ export function restartIndex(texts) {
|
|
|
165
165
|
|
|
166
166
|
/**
|
|
167
167
|
* Classify a failed stage for the runtime's retry policy.
|
|
168
|
-
* - overflow: the host
|
|
168
|
+
* - overflow: the host attempted compaction in the failed turn (context full) or
|
|
169
|
+
* the provider rejected size. A refused background summary
|
|
170
|
+
* (`experimental.background_compaction`) is not evidence: the turn went on, so
|
|
171
|
+
* its own failure decides.
|
|
169
172
|
* - transient: interrupted streams, provider 408/409/425/429/5xx, missing idle,
|
|
170
173
|
* unexpected host messages.
|
|
171
174
|
* - permanent: everything else (authentication, bad request, a used-up quota or
|
|
172
175
|
* free-model limit, whatever its HTTP status, cancellation).
|
|
173
176
|
*/
|
|
174
|
-
export function classifyFailure(error
|
|
175
|
-
if (compactionRequested) return 'overflow';
|
|
177
|
+
export function classifyFailure(error) {
|
|
176
178
|
const execution = error?.execution;
|
|
179
|
+
if (execution?.compaction) return 'overflow';
|
|
177
180
|
if (execution?.interrupted || execution?.provider?.exhausted) return 'permanent';
|
|
178
181
|
const status = execution?.provider?.status;
|
|
179
182
|
if (status === 413) return 'overflow';
|
|
@@ -231,6 +234,10 @@ export async function requestReview(context, { sessionID, text, role, model, met
|
|
|
231
234
|
terminalOutcome: terminal?.type === 'idle' ? outcome(terminal.outcome) : 'missing-idle',
|
|
232
235
|
assistantResponses: assistants.length, lastFinish: finish,
|
|
233
236
|
interrupted: session.outcome === 'interrupted' || terminal?.outcome === 'interrupted' || final?.error?.type === 'aborted' };
|
|
237
|
+
// OpenCode opens a compaction's message before it asks for the summary, so a compaction it attempted in this
|
|
238
|
+
// turn, which AZPR refuses, shows here. A background summary (OpenCode 2.1.4) publishes nothing.
|
|
239
|
+
const compaction = turn.filter(message => message?.type === 'compaction').at(-1);
|
|
240
|
+
if (compaction) execution.compaction = ['running', 'completed', 'failed'].includes(compaction.status) ? compaction.status : 'unknown';
|
|
234
241
|
const provider = !execution.interrupted && providerFailure(final, assistants);
|
|
235
242
|
if (provider) execution.provider = provider;
|
|
236
243
|
const hint = provider?.exhausted
|