Skip to content

fix(skills): bind reviewers to a non-mutating inspection workspace (#3058) - #3060

Merged
EffortlessSteven merged 1 commit into
mainfrom
fix/3058-review-inspection-workspace
Aug 8, 2026
Merged

EffortlessSteven merged 1 commit into
mainfrom
fix/3058-review-inspection-workspace

Conversation

@EffortlessSteven

@EffortlessSteven EffortlessSteven commented Aug 8, 2026 •

Copy link
Copy Markdown
Member

Closes #3058.

What was wrong

review-pr told a reviewer what to inspect but never where. Step 2 requires reading
the whole current-head change, and the review_contract:rendered_behavior lane requires
exercising "actual CLI, API, LSP, help, generated, or output surface where practical".
Both push toward materializing the PR head on disk, and the skill offered no non-mutating
way to do it. The obvious route —

git fetch origin pull/<n>/head:pr<n> && git checkout pr<n>

— run from a shared root checkout, silently moves a HEAD another writer owns.

CLAUDE.md already states the law: one writer mutates each candidate branch or worktree,
while readers, researchers, reviewers, and tools inspect it. The law existed; the reviewer
procedure did not carry the reader half of it, and the closed marker set had nothing
binding it.

This was observed, not theorized. Three concurrent read-only reviewers of #3053, #3055,
and #3057 all ran in the shared root and left it on a local pr3053 branch instead of
main. Nothing was lost, because the tree happened to be clean — which is precisely why
it is worth closing. The same sequence against a worktree holding uncommitted candidate
work is a real writer collision, and the reviewer gets no signal it did anything wrong.

What changed

File Change
xtask/src/agent_skills.rs Register review_contract:non_mutating_inspection_workspace in the closed marker set (16 → 17)
.claude/skills/review-pr/SKILL.md Declare the marker; add an Inspection workspace section; bind it from procedure step 1; add a false-confidence rule
.agents/skills/review-pr/SKILL.md Same contract for the Codex/ZCode provider tree, in that tree's own prose

The rule names the routes that materialize nothing (gh pr diff, gh pr view,
git show <sha>:<path>, git diff <base>...<sha>), and requires a dedicated
git worktree add --detach when rendered-behavior review genuinely needs a real tree.

Both provider trees are edited because the marker set is a shared gate contract, not a
routing import — CLAUDE.md's no-import rule is unaffected.

Proof

The existing review_contract_markers_are_closed_and_discriminating unit test covers the
closed set generically, so registering the marker extends it automatically. That is not
sufficient on its own: it proves the set discriminates, not that the real skill files
declare this marker. So the gate is bound to a negative experiment per provider tree.

Negative experiment A — delete only the marker line from .agents/skills/review-pr/SKILL.md:

$ cargo xtask check-agent-skills
xtask: check-agent-skills found 2 issue(s)
- codex: .agents/skills/review-pr/SKILL.md is missing review contract marker
  `review_contract:non_mutating_inspection_workspace`
- zcode: .agents/skills/review-pr/SKILL.md is missing review contract marker
  `review_contract:non_mutating_inspection_workspace`

Negative experiment B — delete only the marker line from .claude/skills/review-pr/SKILL.md:

$ cargo xtask check-agent-skills
xtask: check-agent-skills found 1 issue(s)
- claude: .claude/skills/review-pr/SKILL.md is missing review contract marker
  `review_contract:non_mutating_inspection_workspace`

Two findings for the shared .agents tree (read by both codex and zcode), one for the
Claude tree. The counts track the provider fan-out exactly, and neither run produces
collateral findings — the gate isolates this omission rather than failing broadly.

Positive: cargo xtask check-agent-skills → pass with both markers present.

Where this gate actually runs: check-agent-skills is not part of cargo xtask precommit
(precommit_report_body lists 32 gates; this is not among them). It is registered in
xtask/src/command.rs and invoked from .github/workflows/routed-rust.yml, so CI is the
enforcement path. Confirmed executing at this head rather than assumed — run 31252554896,
job Ripr Rust Small on GitHub Hosted:

10:20:54Z  cargo xtask check-agent-skills
10:27:29Z  check-agent-skills: pass

cargo xtask precommit also passes in full, but note it does not cover this particular gate.

What this does not claim

  • It does not change review semantics, dispositions, currentness dimensions, or any
    existing marker.
  • It adds no reservation, lease, lock, candidate-frontier, or sibling-monitoring
    surface. CLAUDE.md forbids those and none is needed to state the rule.
  • A written rule is not enforcement of reviewer behavior at runtime. The gate proves each
    provider skill declares the contract; it cannot prove a given reviewer honored it.
  • Automated review coverage is missing at this head: CodeRabbit reports rate-limited and
    droid-review is queued. Neither is a required check, but rate-limited reviewer output is
    missing review, not clean review.

…3058)

review-pr required reading the whole current-head change and exercising the
real CLI/LSP/output surface, but never said where. The obvious route is to
fetch the PR head and check it out, which in a shared root checkout silently
moves a HEAD another writer owns.

CLAUDE.md already carries the operating law -- one writer mutates each
candidate branch or worktree while readers, researchers, reviewers, and tools
inspect it. The reviewer procedure did not carry the reader half of it, and
the closed review-contract marker set had nothing binding it.

Add review_contract:non_mutating_inspection_workspace to the closed set in
xtask and declare it in both provider skill trees, each with an Inspection
workspace section naming the routes that materialize nothing (gh pr diff,
git show <sha>:<path>, git diff <base>...<sha>) and requiring a dedicated
worktree when rendered-behavior review genuinely needs a materialized tree.

No reservation, lease, lock, or sibling-monitoring surface is introduced;
CLAUDE.md forbids those and they are not needed to state the rule.
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@coderabbitai

coderabbitai Bot commented Aug 8, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@EffortlessSteven, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 36 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: f07c6730-594e-405f-ba02-8bf71e280314

📥 Commits

Reviewing files that changed from the base of the PR and between 1d1d2c5 and 529aba5.

📒 Files selected for processing (3)
  • .agents/skills/review-pr/SKILL.md
  • .claude/skills/review-pr/SKILL.md
  • xtask/src/agent_skills.rs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Aug 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@EffortlessSteven

Copy link
Copy Markdown
Member Author

Exact-head review record

reviewed_head_sha:   529aba50147d1a929026b6f247eb26f14f0ad145
integration_basis:   main @ 1d1d2c5d (behind-only; no conflict, no production overlap)
claim_boundary:      #3058 — reviewers get a non-mutating inspection-workspace rule
                     bound by a closed-set contract marker

Author self-review. GitHub does not permit an author to request changes on their own PR,
so this is a COMMENT disposition — that platform limitation is not approval.

Surfaces inspected and semantic owners

  • xtask/src/agent_skills.rs — REVIEW_PR_REQUIRED_MARKERS (16 → 17), the closed-set
    authority. review_pr_contract_findings and validate_review_pr_contract are unchanged;
    the marker rides the existing missing/duplicate/unknown classification rather than adding
    a parallel path.
  • .claude/skills/review-pr/SKILL.md and .agents/skills/review-pr/SKILL.md — both provider
    trees the PROVIDERS table validates. .agents is read by two providers (codex and
    zcode), which is load-bearing for the evidence below.
  • Consumers: PROVIDERS, SKILLS, and declared_marker_counts — the marker is matched by
    the existing - \…`` list-item parse, so no parser change was needed.

Two gaps found in my own proof, and closed

The PR body originally rested on a single negative experiment against .agents. That was
insufficient in two distinct ways, both now resolved:

1. The Claude tree was never proven to fail. The original experiment removed the marker
only from .agents/skills/review-pr/SKILL.md, which proves the gate for codex and zcode
and says nothing about claude. Re-run against the Claude tree:

$ # marker line deleted from .claude/skills/review-pr/SKILL.md
$ cargo xtask check-agent-skills
xtask: check-agent-skills found 1 issue(s)
- claude: .claude/skills/review-pr/SKILL.md is missing review contract marker
  `review_contract:non_mutating_inspection_workspace`

One finding for the Claude tree, two for the shared .agents tree — the counts match the
provider fan-out exactly, which is the discriminating detail. Both trees are now bound.

2. check-agent-skills is not part of precommit. precommit_report_body lists 32
gates and this is not among them, so the earlier "precommit passes" claim did not cover
this gate. It is registered in command.rs and invoked from .github/workflows/routed-rust.yml
(five call sites), so CI is the real enforcement path — but that had to be confirmed at this
head rather than assumed.

Exact-head CI receipt, run 31252554896, job Ripr Rust Small on GitHub Hosted:

10:20:54Z  cargo xtask check-agent-skills
10:27:29Z  Running `target/debug/xtask check-agent-skills`
10:27:29Z  check-agent-skills: pass

The gate ran and consumed real subjects at this head. Not an aggregate status.

Challenge

Removal experiment: deleting either added marker line fails the gate with exactly the
expected provider-scoped finding and no collateral findings, so the gate isolates this
omission rather than failing broadly. The pre-existing
review_contract_markers_are_closed_and_discriminating unit test covers missing, duplicate,
and unknown markers over the whole set, and extends to the new marker automatically.

Limitation, stated plainly: this proves each provider skill declares the contract. It
cannot prove a reviewer honored it at runtime. The rule is prose bound by a declaration
gate, not runtime enforcement — the PR body says so and should not be read as more.

Non-blocking observations

  • has_active_reference / negative_context treat a line within two lines of "do not",
    "no ", or "without " as a negated mention. The new Inspection workspace sections contain
    "Never run git checkout…" and "introduces no reservation…". Neither section mentions the
    other provider's skill root, so the import check is unaffected — verified by the gate
    passing. Worth knowing this heuristic exists before adding cross-tree prose later.
  • CI parity: check-agent-skills guarding agent contracts while sitting outside precommit
    means a local-only run gives no signal on skill edits. Defensible (it is a policy gate, not
    a build gate) but it is a shift-left gap. Not in this claim's boundary; noting rather than
    widening scope.

Missing evidence

  • CodeRabbit reports rate limited at this head. Per the repository contract, quota-limited
    reviewer output is missing review, not clean review.
  • droid-review has been queued for roughly 40 minutes and has produced no result.

Neither is a required check — branch protection on main requires only
Ripr Rust Small Result, which passes. But automated review coverage at this head is
genuinely absent and is recorded as such rather than counted as clean.

Disposition

blocking_findings:            none
non_blocking_suggestions:     2 (recorded above)
proof_or_review_missing:      CodeRabbit rate-limited; droid-review queued
residual_non_claims:          declaration gate, not runtime enforcement of reviewer behavior
disposition:                  REVIEW_READY

Ready for merge convergence on the source and oracle axes, with the missing automated-review
coverage recorded as an explicit residual rather than silently absorbed.

@EffortlessSteven
EffortlessSteven merged commit 5b92dc7 into main Aug 8, 2026
26 of 27 checks passed
@EffortlessSteven
EffortlessSteven deleted the fix/3058-review-inspection-workspace branch August 8, 2026 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

orchestration(review-pr): reviewers have no non-mutating inspection workspace rule, so a delegated review can move another writer's HEAD

1 participant