Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
9a7d116
feat(review): filter unreviewable content from diff context
guyoron1 Aug 25, 2026
537480c
fix(review): review round 1 — header-path fallback, bounded buffering…
guyoron1 Sep 2, 2026
cdf3674
fix(review): review round 2 — header split, quoted renames, one-line …
guyoron1 Sep 2, 2026
9dc7de8
fix(review): review round 3 — src-not-bundle, marker gating, GitLab s…
guyoron1 Sep 2, 2026
2775b14
fix(review): review round 4 — info-only disclosure exemption, paired …
guyoron1 Sep 2, 2026
951b7a3
docs(review): excluded-content disclosure names all exclusion categories
guyoron1 Sep 3, 2026
e388990
fix(review): settle generated markers from the file head, not the hunk
guyoron1 Sep 5, 2026
a05fce5
test(review): cover mid-file regen, forged +++ boundary, header cap
guyoron1 Sep 5, 2026
6a92945
docs(review): one disclosure finding per excluded file
guyoron1 Sep 5, 2026
8f796ab
docs(review): make the step 2c filter command runnable as written
guyoron1 Sep 5, 2026
9da767e
chore(lint): raise pr-review context budget to 16815
guyoron1 Sep 5, 2026
7a08cd6
fix(review): classify the forge skills' per-file diff shape; drop the…
guyoron1 Sep 10, 2026
5b2ff12
docs(review): step 2c never clobbers the diff, and an all-excluded PR…
guyoron1 Sep 10, 2026
5585e72
fix(review): dequote quoted ---/+++ paths so GitLab-shaped sections c…
guyoron1 Sep 10, 2026
13dbd27
fix(review): minified and sourcemap rules match case-insensitively li…
guyoron1 Sep 10, 2026
26f194a
docs(review): provenance-warning uses the <pr> file sentinel the agen…
guyoron1 Sep 10, 2026
e3dfd52
chore(lint): raise pr-review context budget to 17579
guyoron1 Sep 10, 2026
fadd993
docs(review): header comment discloses the header-phase buffer cap
guyoron1 Sep 10, 2026
23d3884
fix(review): don't approve a disclosure-only PR to ready-for-merge
guyoron1 Sep 11, 2026
0b7ff4e
fix(review): keep GitLab header-only section's lines through the filter
guyoron1 Sep 11, 2026
67d63be
fix(review): runtime-neutral filter path; shrink skill under budget
guyoron1 Sep 11, 2026
952678f
Merge upstream main into feat/review-diff-filtering
guyoron1 Sep 17, 2026
1d147cf
Merge upstream main into feat/review-diff-filtering
guyoron1 Sep 21, 2026
d618310
fix(review): a newline in a filename cannot forge a "### File:" secti…
guyoron1 Sep 21, 2026
58cbe4b
fix(review): migrations exemption and vendored rule match case-insens…
guyoron1 Sep 21, 2026
17d3aaf
Merge upstream main into feat/review-diff-filtering
guyoron1 Sep 24, 2026
57cd064
Merge upstream main into feat/review-diff-filtering
guyoron1 Nov 14, 2026
c3461c8
fix(review): keep excluded paths out of the challenger's context
guyoron1 Nov 14, 2026
91cf16d
fix(review): run the step 6e checks on an all-excluded PR
guyoron1 Nov 14, 2026
f37deed
fix(review): filter the scoped full diff and the re-review incrementa…
guyoron1 Nov 14, 2026
841751c
fix(review): keep the approve when a provenance-warning is the only f…
guyoron1 Nov 14, 2026
a749ed8
fix(review): keep the filter's status lines out of the env-var check
guyoron1 Nov 15, 2026
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
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ script-test:
$(call run-timed,bash .github/scripts/workflow-triggers-test.sh)
$(call run-timed,test "$(SCRIPT_TEST_TARGET)" = bundled || (cd harness/triggertest && GOWORK=off GOFLAGS= go test -count=1 ./...))
$(call run-timed,bash .github/scripts/check-dco-signoff-test.sh)
$(call run-timed,bash scripts/filter-review-diff-test.sh)

test: script-test

Expand Down
6 changes: 4 additions & 2 deletions agents/review.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,8 @@ exception: a prior finding this review reclassifies keeps its row in
`findings`, with its `id`, at the new severity even when that is below
the threshold. The post-script keeps that row in the ledger and drops it
from the posted review.
The `provenance-warning` and `excluded-content` process disclosures are
exempt too: include them whenever their trigger condition holds.

This filtering applies to the narrative body text and the structured
findings equally. If filtering removes all findings from a
Expand Down Expand Up @@ -403,8 +405,8 @@ the run before both have happened.
| Field | Type | Required | Description |
|---------------|---------|----------|-----------------------------------------------|
| `severity` | string | yes | One of: `critical`, `high`, `medium`, `low`, `info` |
| `category` | string | yes | A category from the dimension table in `pr-review` `references/re-review.md` (step 3a), or one of `protected-path`, `provenance-warning`, `scope-authorization-implicit`, `sub-agent-failure`. Any other value fails schema validation. |
| `file` | string | yes | File path (min 1 char) |
| `category` | string | yes | A category from the dimension table in `pr-review` `references/re-review.md` (step 3a), or one of `protected-path`, `provenance-warning`, `excluded-content`, `scope-authorization-implicit`, `sub-agent-failure`. Any other value fails schema validation. |
| `file` | string | yes | File path (min 1 char). Single-valued: a finding about N files is N findings |
| `line` | integer | no | Line number (minimum 1) |
| `description` | string | yes | Finding description (min 1 char) |
| `remediation` | string | no | Suggested fix |
Expand Down
2 changes: 1 addition & 1 deletion docs/review.md
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ The review agent follows the same pre-script / sandbox / post-script pipeline as

1. **Pre-script** validates inputs and fetches PR metadata. On a re-review, it also fetches current review-thread state, applies verified human dismissals to the prior-finding ledger, and discards the raw thread content before sandbox creation.
2. **Sandbox** — the agent runs the `pr-review` orchestrator skill. The orchestrator runs a security-triage pre-pass for large PRs, then dispatches the specialized dimension sub-agents in parallel (plus the risk-assessment sub-agent when enabled), each covering a distinct review dimension (correctness, security, intent & coherence, style & conventions, docs currency, user experience, and optionally cross-repo contracts — whichever personas are staged; see [Add, replace or disable a review persona](#add-replace-or-disable-a-review-persona)). Sub-agents run concurrently and return structured findings. The orchestrator collects, deduplicates, and synthesizes findings across dimensions, runs PR-level checks (scope authorization, protected paths), and produces a structured JSON review result. The agent cannot push files, edit code, or push — it is strictly read-only.
3. **Validation loop** — the output is checked against a schema. The review harness runs a single iteration (see [Time budget](#time-budget)), so a failed validation is not retried and the review is lost. Contract change: `finding.category` in `schemas/review-result.schema.json` is a closed enum (the dimension categories in `pr-review` `references/re-review.md` plus `protected-path`, `provenance-warning`, `scope-authorization-implicit`, `sub-agent-failure`), no longer any non-empty string. Anything that produces review results must emit only these categories. The `pr-review` orchestrator remaps stray dimensional categories in step 6b to limit this risk.
3. **Validation loop** — the output is checked against a schema. The review harness runs a single iteration (see [Time budget](#time-budget)), so a failed validation is not retried and the review is lost. Contract change: `finding.category` in `schemas/review-result.schema.json` is a closed enum (the dimension categories in `pr-review` `references/re-review.md` plus `protected-path`, `provenance-warning`, `excluded-content`, `scope-authorization-implicit`, `sub-agent-failure`), no longer any non-empty string. Anything that produces review results must emit only these categories. The `pr-review` orchestrator remaps stray dimensional categories in step 6b to limit this risk.
4. **Post-script** posts the review on the PR. On GitHub, it also resolves still-open review threads whose only comments are outdated inline comments authored by the review agent, so stale comments do not remain in the PR's unresolved-review state.

On re-review, the sandbox receives a validated `fullsend:review-findings-v2` projection containing `action`, severity, category, file, optional line, id, optional `actionable`, and an `{id, status}` disposition per prior id—not prior descriptions, remediation text, rationales, evidence, or review-thread bodies. Immediately before sandbox creation, the host fetches current thread state and marks eligible findings dismissed only when a verified write-or-higher human other than the PR author resolved a thread containing a trusted review-bot comment with the exact finding-id stamp. Unstamped thread comments stay open; path and line are not used as a fallback. A legacy marker without ids is assigned one before sandbox ingress. Resolved and human-dismissed findings stay in the projection with their anchor so they are recognised and not raised again. A null file retains PR-level category context without serving as a path or severity anchor. The pre-script continues to accept v1 markers for existing comments. Only GitHub `app-verified` re-reviews use file-backed records for remediation-candidate matching.
Expand Down
2 changes: 1 addition & 1 deletion schemas/review-result.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
"stale-doc", "missing-doc", "incorrect-doc", "incomplete-doc",
"breaking-api", "breaking-schema", "breaking-config", "breaking-cli", "missing-deprecation", "missing-version-bump", "backward-incompatible",
"uxd-evaluate-code-heuristics",
"protected-path", "provenance-warning", "scope-authorization-implicit", "sub-agent-failure"
"protected-path", "provenance-warning", "excluded-content", "scope-authorization-implicit", "sub-agent-failure"
]
},
"file": { "type": "string", "minLength": 1 },
Expand Down
Loading
Loading