@jphutchins/code-review 0.1.0-alpha.66 → 0.1.0-alpha.68
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/README.md +1 -1
- package/dist/index.js +201 -60
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/schema/VERSIONING.md +1 -1
- package/schema/findings.schema.json +5 -0
- package/templates/comment.eta +10 -2
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.68",
|
|
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
|
@@ -75,7 +75,7 @@ ignored); a version outside the supported set degrades to a §5.5 sticky notice.
|
|
|
75
75
|
| `v0.6.0` | superseded | Adds optional `systemic_problems` — an array of cross-cutting observations that tie findings together and are hard to express with a line range, each item with required `title`/`description`/`severity`/`reasoning`/`confidence` and optional `code`/`code_url`/`finding_codes`/`paths` (no line anchors). Refocuses `summary` on justifying the overall verdict rather than restating findings. Backwards-compatible (a `0.5` document is a valid `0.6` document); the CLI keeps resolving `0.4`/`0.5` via identity upcasts. |
|
|
76
76
|
| `v0.9.0` | superseded (frozen at `schema/v0.9/`) | Adds a REQUIRED `likelihood` (0..1) to every finding and systemic problem (issue #163): the probability the triggering input/state actually occurs — distinct from `confidence` (whether the defect is real) — folded into the convergence score as a second multiplier. **Breaking**: a pre-0.9 document lacks `likelihood` and no longer validates, so a stale sticky degrades to a sentinel-only seed (one cold re-review) rather than seeding. The draft axis skips `0.7`/`0.8`: those are the surface-signal axis's versions (below), so the draft jumps past them to keep the two version spaces distinct — a draft must never be mistaken for a legacy surfaced blob (issue #156). |
|
|
77
77
|
| `v0.10.0` | superseded | Renames the mechanism identifier `code` → `id` and makes it **required** on every finding (issue #246), so every finding is always trackable across rounds and discussions. Systemic problems rename `code`/`finding_codes` → `id`/`finding_ids`; convergence rounds rename `codes` → `ids`; `scope_metastasis.recurring` renames `code` → `id`. `change_size.code` (the role bucket) and `code_url` keep their names. **Breaking**: a pre-0.10 document lacks `id` — the registry upcasts every pre-0.10 minor through one tolerant legacy codec (`code` → `id`, or a synthesized content-derived id — sha256 of path+title — when a finding carried none), so a legacy sticky still seeds a re-review with its ids intact, and the pre-0.10 shape stays frozen at `schema/v0.9/` (above). |
|
|
78
|
-
| `v0.11.0` | **current** (draft) | Adds an optional `rebuttal` to every finding and systemic problem: on a re-raise, the reviewer's answer to the response recorded against that id (the review dialogue, #247). A re-raise that carries a non-blank `rebuttal` is never a verbatim re-raise. A rebuttal answers one round's response, so the re-review seed strips rebuttals from the prior review it carries forward, and a re-raise must supply its own. The legacy codec drops a `rebuttal` on a pre-0.10 document, which the frozen `v0.9` file rejects: the one deliberate codec-only tolerance, since only a hybrid document ever carries one. The systemic `id` description now states that a re-raise of the same class reuses the id. Backwards-compatible: a `0.10` document is a valid `0.11` document, so both minors resolve through the same live file and codec, the way `0.4`–`0.9` share the frozen legacy file. Draft until the next release, so the dialogue's later phases may still add to it. |
|
|
78
|
+
| `v0.11.0` | **current** (draft) | Adds an optional `rebuttal` to every finding and systemic problem: on a re-raise, the reviewer's answer to the response recorded against that id (the review dialogue, #247). A re-raise that carries a non-blank `rebuttal` is never a verbatim re-raise. A rebuttal answers one round's response, so the re-review seed strips rebuttals from the prior review it carries forward, and a re-raise must supply its own. The legacy codec drops a `rebuttal` on a pre-0.10 document, which the frozen `v0.9` file rejects: the one deliberate codec-only tolerance, since only a hybrid document ever carries one. The systemic `id` description now states that a re-raise of the same class reuses the id. Adds an optional top-level `unfinished`: the checks a review planned but did not complete, rendered beside the convergence badge. Backwards-compatible: a `0.10` document is a valid `0.11` document, so both minors resolve through the same live file and codec, the way `0.4`–`0.9` share the frozen legacy file. Draft until the next release, so the dialogue's later phases may still add to it. |
|
|
79
79
|
|
|
80
80
|
### Surface channel (stop signal)
|
|
81
81
|
|
|
@@ -176,6 +176,11 @@
|
|
|
176
176
|
}
|
|
177
177
|
}
|
|
178
178
|
},
|
|
179
|
+
"unfinished": {
|
|
180
|
+
"type": "array",
|
|
181
|
+
"description": "Checks this review planned but did not complete, one entry each.",
|
|
182
|
+
"items": { "type": "string", "pattern": "\\S" }
|
|
183
|
+
},
|
|
179
184
|
"change_size": {
|
|
180
185
|
"type": "object",
|
|
181
186
|
"additionalProperties": false,
|
package/templates/comment.eta
CHANGED
|
@@ -47,6 +47,14 @@
|
|
|
47
47
|
<% } -%>
|
|
48
48
|
|
|
49
49
|
<%~ it.findings.summary %>
|
|
50
|
+
<% if (it.unfinished.length > 0) { -%>
|
|
51
|
+
|
|
52
|
+
> [!WARNING]
|
|
53
|
+
> **Unfinished checks** — this round did not complete every check it planned, so its convergence covers less than a full review:
|
|
54
|
+
<% it.unfinished.forEach(function(check) { -%>
|
|
55
|
+
> - <%~ check %>
|
|
56
|
+
<% }) -%>
|
|
57
|
+
<% } -%>
|
|
50
58
|
<% const c = it.severityCounts %><% const findingsTotal = c.critical + c.major + c.minor + c.nit -%>
|
|
51
59
|
<% if (it.strays.length > 0 || (!it.incomplete && (findingsTotal > 0 || it.systemic.length > 0 || it.contested.length > 0))) { -%>
|
|
52
60
|
|
|
@@ -160,9 +168,9 @@ _The reviewer rebutted a maintainer's answer, and a maintainer answered again. E
|
|
|
160
168
|
**Findings:** <%~ parts.join(' · ') %>
|
|
161
169
|
<% } else if (!it.incomplete && (it.systemic.length > 0 || it.contested.length > 0)) { %>
|
|
162
170
|
<% const held = [] %><% if (it.contested.length > 0) { held.push(it.contested.length + ' contested item' + (it.contested.length === 1 ? '' : 's')) } %><% if (it.systemic.length > 0) { held.push(it.systemic.length + ' systemic problem' + (it.systemic.length === 1 ? '' : 's')) } %>
|
|
163
|
-
_No findings beyond the <%= held.join(' and ') %> above._
|
|
171
|
+
_No findings beyond the <%= held.join(' and ') %> above<%= it.unfinishedCaveat %>._
|
|
164
172
|
<% } else if (!it.incomplete && !it.answeredReRaiseNote) { %>
|
|
165
|
-
<% if (it.unverifiedNoLogs) { %>_No findings — but no failing-job logs were staged, so this pass could not read the CI failure. "No findings" is not evidence of none._<% } else { %>_No findings — clean review._<% } %>
|
|
173
|
+
<% if (it.unverifiedNoLogs) { %>_No findings — but no failing-job logs were staged, so this pass could not read the CI failure. "No findings" is not evidence of none._<% } else if (it.unfinishedCaveat) { %>_No findings in the checks this round completed<%= it.unfinishedCaveat %>._<% } else { %>_No findings — clean review._<% } %>
|
|
166
174
|
<% } %>
|
|
167
175
|
|
|
168
176
|
<% if (it.inlineDisposition && it.inlineDisposition.kind === 'posted') { %>
|