@jphutchins/code-review 0.1.0-alpha.4 → 0.1.0-alpha.6
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 +18 -0
- package/dist/index.js +367 -90
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/schema/VERSIONING.md +2 -1
- package/schema/findings.schema.json +10 -2
- package/schema/v0.2/findings.schema.json +88 -0
- package/templates/comment.eta +51 -46
- package/templates/inline.eta +19 -3
package/README.md
CHANGED
|
@@ -42,6 +42,7 @@ npx @jphutchins/code-review <subcommand>
|
|
|
42
42
|
| `inline` | Build the GitHub reviews `comments[]` payload from findings + diff (in-diff validation; strays demote to the summary) |
|
|
43
43
|
| `adapt` | Map a native agent-CLI result envelope onto the abstract SPEC §6.1 envelope |
|
|
44
44
|
| `extract` | Recover findings/triage JSON from a native envelope via the deterministic extraction ladder |
|
|
45
|
+
| `lower-suggestions` | Validate each finding's `patch` against the real PR-head file and lower it to an exact `suggestion` + line range, or drop it |
|
|
45
46
|
| `cost` | Recompute USD cost from the envelope's per-model token counts + a price map |
|
|
46
47
|
| `validate` | Validate findings JSON against the published schema |
|
|
47
48
|
| `print-schema` | Print a bundled schema (findings, triage, prices) |
|
|
@@ -75,6 +76,23 @@ endpoint is a per-repo **Actions variable** (`API_BASE_URL`, required, no defaul
|
|
|
75
76
|
another provider requires adding that provider's API host to the workflow's egress allowlist in the
|
|
76
77
|
same reviewed PR.
|
|
77
78
|
|
|
79
|
+
## Artifacts
|
|
80
|
+
|
|
81
|
+
The review job uploads two artifacts, each visible from the workflow run the sticky's disclosure
|
|
82
|
+
links to:
|
|
83
|
+
|
|
84
|
+
- **`code-review-findings`** — the findings JSON + result envelope the comment job renders. The
|
|
85
|
+
sticky comment embeds this same JSON directly, base64-encoded, in an
|
|
86
|
+
`<!-- code-review:findings-json;base64 <base64> -->` HTML comment — a reviewing agent (or any
|
|
87
|
+
downstream tool) SHOULD base64-decode and parse that marker rather than parse the comment's prose.
|
|
88
|
+
Embedding in the comment (rather than only linking the artifact) keeps the pointer from expiring
|
|
89
|
+
with artifact retention; when the encoded findings are too large to embed, the sticky falls back to
|
|
90
|
+
a `<!-- code-review:findings-json <url> -->` link marker instead
|
|
91
|
+
([SPEC §5.1 item 7](SPEC.md#51-sticky-summary-comment)).
|
|
92
|
+
- **`code-review-transcript`** — the full Claude Code session transcripts for the triage and review
|
|
93
|
+
phases. This is advisory/auditability only: it is never read by the comment job and never affects
|
|
94
|
+
what gets posted.
|
|
95
|
+
|
|
78
96
|
## What's here
|
|
79
97
|
|
|
80
98
|
- **[SPEC.md](SPEC.md)** — the normative, provider-agnostic specification.
|