@jphutchins/code-review 0.1.0-alpha.36 → 0.1.0-alpha.37
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/dist/index.js +256 -151
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/schema/VERSIONING.md +2 -1
- package/schema/findings.schema.json +2 -2
- package/templates/comment.eta +6 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jphutchins/code-review",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.37",
|
|
4
4
|
"description": "Deterministic commenter for agentic PR review — gather, render, inline, post, adapt, extract, cost, validate, print-schema",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
package/schema/VERSIONING.md
CHANGED
|
@@ -67,7 +67,8 @@ ignored); a version outside the supported set degrades to a §5.5 sticky notice.
|
|
|
67
67
|
| `v0.1.0` | superseded | Initial schema. Matches the proven camas reference implementation. |
|
|
68
68
|
| `v0.2.0` | superseded | Adds required `schema_version`; optional `code`/`code_url` finding fields; normative `suggestion` `""`/`null` semantics; abstract vendor-neutral envelope (see SPEC §6.1). |
|
|
69
69
|
| `v0.3.0` | superseded | Adds optional `reasoning` finding field. |
|
|
70
|
-
| `v0.4.0` |
|
|
70
|
+
| `v0.4.0` | superseded | Breaking: renames finding `body` → `description`; makes `reasoning` and `confidence` **required**; adds optional `recommendation` (prose fix); removes the free-text `suggestion` field (a `patch`, now `string \| null`, is the sole mechanical fix, projected into a suggestion by the commenter). |
|
|
71
|
+
| `v0.5.0` | **current** | Widens the `verdict` enum with a pipeline-reserved `error` value: a run that produced no verdict about the diff (operational failure or security refusal) now carries `verdict: "error"` with `findings: []`, so its machine-readable blob is no longer byte-identical to a clean pass. Backwards-compatible (a `0.4` document is a valid `0.5` document); the CLI keeps resolving `0.4` via an identity upcast, so a sticky embedded by a `0.4` CLI still seeds a re-review. |
|
|
71
72
|
|
|
72
73
|
### Price-map schema
|
|
73
74
|
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
},
|
|
19
19
|
"verdict": {
|
|
20
20
|
"type": "string",
|
|
21
|
-
"enum": ["approve", "comment", "changes"],
|
|
22
|
-
"description": "Overall stance."
|
|
21
|
+
"enum": ["approve", "comment", "changes", "error"],
|
|
22
|
+
"description": "Overall stance. The review agent emits one of `approve`/`comment`/`changes`. `error` is reserved for the pipeline: it marks a run that produced no verdict about the diff (an operational failure, a security refusal, or an empty diff with nothing to review — always with `findings: []`), so a consumer switching on `verdict` gets a case it does not recognise rather than a false clean pass."
|
|
23
23
|
},
|
|
24
24
|
"findings": {
|
|
25
25
|
"type": "array",
|
package/templates/comment.eta
CHANGED
|
@@ -6,10 +6,16 @@
|
|
|
6
6
|
<% if (it.findingsPointer) { -%>
|
|
7
7
|
<%~ it.findingsPointer %>
|
|
8
8
|
<% } -%>
|
|
9
|
+
<% if (it.roundsMarker) { -%>
|
|
10
|
+
<%~ it.roundsMarker %>
|
|
11
|
+
<% } -%>
|
|
9
12
|
|
|
10
13
|
### <%= it.verdictBadge(it.findings.verdict) %>
|
|
11
14
|
|
|
12
15
|
<% const meta = [] %><% if (it.postedAt) { meta.push('**Reviewed** `' + it.reviewedSha.slice(0, 7) + '` at ' + it.postedAt) } %><% if (it.route) { meta.push('**route:** ' + it.route) } %><% if (it.effort) { meta.push('**effort:** ' + it.effort) } %><% if (it.hasUsage) { meta.push('**turns:** ' + it.envelope.turns); meta.push('**wall:** ' + it.formatDuration(it.envelope.duration_ms)); meta.push('**models:** ' + it.modelNames); meta.push('**cost:** ' + it.formatCost(it.costReport.totalCostUSD)) } else { meta.push('_usage unavailable_') } %><sub><%~ meta.join(' · ') %></sub>
|
|
16
|
+
<% if (it.roundsSummary && !it.incomplete) { %>
|
|
17
|
+
<sub><%~ it.roundsSummary %></sub>
|
|
18
|
+
<% } %>
|
|
13
19
|
|
|
14
20
|
<%~ it.findings.summary %>
|
|
15
21
|
|