Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,27 @@ All notable changes to the claude-plugins project will be documented in this fil

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). Entries are listed newest-first; each plugin section is treated as released when merged to `main`.

### code-review v3.10.0

#### Added
- `review_result.json` records which checkout and commit a review read:
- `review_root`, `review_root_sha`, and, for a staged review, `review_root_tree`.
- Values are copied from `scope.json` and re-validated first. A root must be an absolute path free of control characters, `<`, `>` and backticks, and a SHA must be hex. Anything absent or malformed is written as `null`.
- The fields are additive, so `schema_version` stays at 2. The envelope validator rejects any value that is neither a string nor `null`, and `result_envelope_json_schema()` declares all three as nullable strings.
- `diff_tip` could not carry this, because for a branch review it is the literal `HEAD`.
- The review footer prints a second line, `reviewed_line` from `footer.json`, in the form ``**Reviewed:** `<review_root>` @ `<12-char sha>` ``:
- A PR head isolated into a worktree is named `PR #N head` rather than by path, because the footer stage removes that worktree in the same call.
- A staged review appends the pinned index tree.
- A run whose `scope.json` has no valid `review_root_sha` prints `checkout not recorded`.
- New `render-reviewed-commit` helper subcommand prints the GitHub summary's `**Reviewed commit:**` line, which `github-review.md` places right after **Status**:
- It names the commit the review read, and marks it `(PR head)` when it matches the PR head.
- When the runner checked out a different commit, such as a merge ref, it names the PR head as well.
- It never prints a filesystem path.
- The PR head comes from a new `scope.json` key, `pr_head_sha`, which `resolve-scope` writes for PR scope. Github mode records it there while still leaving `head_sha` empty, because `head_sha` redirects `_file_content_hash` and the inline-comment `commit_id` away from the verified working tree.

#### Fixed
- `github-review.md` and the `present-local` skill now run `render-reviewed-commit` and `render-fleet-summary` through the resolved `<HELPERS>` path instead of `${CLAUDE_PLUGIN_ROOT}`. When `CLAUDE_PLUGIN_ROOT` is empty and `start.md` resolved the helpers from the in-repo tree or the marketplace cache, the old form pointed at `/tools/python/code_review_helpers.py`.

### code-review v3.9.0

#### Fixed
Expand Down
2 changes: 1 addition & 1 deletion plugins/code-review/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "code-review",
"description": "Code review plugin",
"version": "3.9.0",
"version": "3.10.0",
"author": {
"name": "ClosedLoop",
"email": "support@closedloop.ai"
Expand Down
5 changes: 3 additions & 2 deletions plugins/code-review/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ The orchestrator executes these steps in order:
11. **Cache update** (if caching is active) — writes validated findings to the cache for future incremental runs
12. **Present results** — local mode: prints findings by severity in the terminal; GitHub mode: writes `.closedloop-ai/code-review-findings.json`, `.closedloop-ai/code-review-threads.json`, and `.closedloop-ai/code-review-summary.md` for the CI workflow to post
13. **Review state write** — persists the current diff tip so future `--since-last-review` runs can narrow the scope
14. **Footer** — prints elapsed time, token usage stats, and writes the deterministic verdict JSON to `<CR_DIR>/verdict.json` (consumed by the `code` plugin's `run-loop.sh`)
14. **Footer** — prints elapsed time, token usage stats, and the checkout and commit the review read (`reviewed_line`), and writes the deterministic verdict JSON to `<CR_DIR>/verdict.json` (consumed by the `code` plugin's `run-loop.sh`)

(Step numbers in this list are illustrative; the canonical 30-stage ordering lives in `prepare-run`'s `run_plan.json`. Steps 2–8 — the deterministic prefix through routing and partitioning — run in a single process via the `run-prefix` helper; the orchestrator walks the reviewer/validation/presentation tail from step 9 onward.)

Expand All @@ -243,7 +243,8 @@ The helper script is a multi-subcommand Python CLI. The orchestrator invokes it
| `post-comments` | Posts validated findings as inline GitHub PR comments (GitHub mode) |
| `resolve-threads` | Resolves outdated bot review threads on a PR (GitHub mode) |
| `session-tokens` | Collects token usage stats from the session |
| `footer` | Computes the formatted review footer string |
| `footer` | Computes the formatted review footer string and the `reviewed_line` naming the checkout and commit the review read (ISS-9137) |
| `render-reviewed-commit` | Prints the GitHub summary's `Reviewed commit` line from `scope.json`: the commit the review read, plus the PR head (`pr_head_sha`) when they differ; never a filesystem path (ISS-9137) |
| `resolve-scope` | Resolves diff scope (branch, PR number, base ref, path filter) from CLI arguments and git context |
| `fetch-intent` | Fetches context (PR description, recent commits) used to classify the diff intent |
| `classify-intent` | Classifies the diff intent (feature, bugfix, refactor, etc.) for model routing |
Expand Down
7 changes: 5 additions & 2 deletions plugins/code-review/SCHEMA.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,13 +136,16 @@ The terminal artifact of every review run.

```jsonc
{
"schema_version": 1,
"schema_version": 2,
"review_id": "<uuid v4>",

// ── Run context ───────────────────────────────────────────
"pr_number": <int|null>,
"head_sha": "<sha|null>",
"diff_tip": "<sha>",
"review_root": "<absolute path|null>", // checkout the review read (ISS-9137)
Comment thread
wongk marked this conversation as resolved.
"review_root_sha": "<sha|null>", // commit that checkout held at resolve-scope
"review_root_tree": "<tree sha|null>", // staged scope only: the pinned index tree
"review_branch": "<branch>",
"base_ref": "<ref>",
"diff_scope": "<as resolved by resolve-scope>",
Expand Down Expand Up @@ -492,7 +495,7 @@ finding — best-effort omissions are budget-driven, not coverage gaps.
| 27 | review-state-write | `review-state-write` | Review state |
| 28 | verdict | `verdict` | `verdict.json` |
| 29 | present | (present) | Local or GitHub output |
| 30 | footer | `footer` | Footer line |
| 30 | footer | `footer` | Footer line + `reviewed_line` (checkout and commit read) |

Stages from plans 01/03/05/06 are present in `run_plan.json` but marked
`enabled: false` until those plans land.
Expand Down
Loading
Loading