Skip to content

Resolve PR blockers in the current worktree - #31

Merged
ether-moon merged 6 commits into
mainfrom
ether_karrot/restore-creating-skills-policies
Jul 23, 2026
Merged

Resolve PR blockers in the current worktree#31
ether-moon merged 6 commits into
mainfrom
ether_karrot/restore-creating-skills-policies

Conversation

@ether-moon

@ether-moon ether-moon commented Jul 23, 2026

Copy link
Copy Markdown
Owner

Summary

  • publish the current branch before considering base-branch lag or divergence
  • resolve PR blockers in the currently checked-out worktree without temporary worktrees or resolver branches
  • retry stale remote HEAD observations through a fresh snapshot instead of stopping for user input

Changes

  • update the shipping skill, resolver agents, and legacy fix command to use an explicit workspace_mode=current contract
  • add in-place fast-forward/merge reconciliation rules while preserving expected-SHA push safety
  • extend the PR runner with the stale resolver result and polling transition
  • add functional evaluation cases and regression coverage for base-independent publication and current-worktree resolution
  • regenerate the documented plugin inventory

Test Plan

  • plugins/skill-set/tests/run.sh
  • claude plugin validate --strict plugins/skill-set
  • evaluation schema validation for all 210 cases
  • shipping-pr authorization, PR runner, reference, inventory, and diff checks
  • model evaluation: candidate 18/18, baseline 6/18

Summary by CodeRabbit

  • Documentation

    • Clarified that PR fixes and shipping workflows operate in the current checked-out worktree and branch.
    • Documented stronger publication safeguards, including fresh snapshots when the PR changes and preservation of unresolved or ambiguous states.
  • Bug Fixes

    • Added handling for stale resolver results, allowing workflows to retry safely without publishing outdated changes.
    • Improved reconciliation of local and remote PR state while preserving authorized work.
  • Tests

    • Added evaluation scenarios covering current-worktree resolution, stale retries, and safe publication when branches lag behind the base.

Publish the current branch independently of base-branch lag and reconcile
resolver state in place without temporary worktrees or branch switching.
Record the merged base ancestry after PR #30 so the new pull request
contains only the shipping-pr policy changes.
@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

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

Next review available in: 10 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

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: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 2725e909-6cd2-4202-b6ad-3cd4750eb1fc

📥 Commits

Reviewing files that changed from the base of the PR and between c159768 and 44256d4.

📒 Files selected for processing (10)
  • plugins/skill-set/commands/pr/fix.md
  • plugins/skill-set/evals/shipping-pr/current-worktree-resolution/case.yaml
  • plugins/skill-set/evals/shipping-pr/partial-resolver-publication-stop/prompt.md
  • plugins/skill-set/evals/shipping-pr/state-machine-happy-path/fixtures/run-shipping-eval
  • plugins/skill-set/evals/shipping-pr/state-machine-happy-path/prompt.md
  • plugins/skill-set/skills/shipping-pr/SKILL.md
  • plugins/skill-set/skills/shipping-pr/scripts/skill-set-pr
  • plugins/skill-set/tests/test-pr-runner.sh
  • plugins/skill-set/tests/test-shipping-pr-authorization.sh
  • plugins/skill-set/tests/test-shipping-pr-happy-path-eval.sh
📝 Walkthrough

Walkthrough

Changes

Current Worktree Shipping

Layer / File(s) Summary
Current-worktree agent contracts
AGENTS.md, README.md, plugins/skill-set/agents/*
PR documentation and resolver contracts now require recorded current-worktree execution, workspace_mode=current, and branch-preserving behavior.
In-place resolution and publication workflow
plugins/skill-set/commands/pr/fix.md, plugins/skill-set/skills/shipping-pr/*, plugins/skill-set/agents/resolving-pr-blockers.md
Shipping and blocker resolution now reconcile the current branch in place, enforce publication gates, and return to polling when the PR HEAD becomes stale.
State transitions and contract tests
plugins/skill-set/skills/shipping-pr/scripts/skill-set-pr, plugins/skill-set/tests/*
The runner accepts stale -> polling, and tests validate stale retries, current-worktree requirements, and authorization contracts.
Shipping evaluation scenarios
plugins/skill-set/evals/shipping-pr/*
Two read-only evaluation cases cover current-worktree resolution and publication when the branch is behind the base.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant shipping-pr
  participant ResolverAgents
  participant skill-set-pr
  participant PRRemote
  shipping-pr->>ResolverAgents: Resolve blockers in current worktree
  ResolverAgents->>skill-set-pr: Record resolver outcome
  skill-set-pr->>PRRemote: Publish through expected-SHA gate
  PRRemote-->>skill-set-pr: Return publication result
  skill-set-pr-->>shipping-pr: Continue or return stale to polling
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: resolving PR blockers in the current worktree.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ether_karrot/restore-creating-skills-policies

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
plugins/skill-set/skills/shipping-pr/scripts/skill-set-pr (2)

1353-1374: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Require evidence before accepting stale.

stale:polling currently depends only on the caller-provided label. A resolver can discard its result and consume a retry even when the live PR HEAD is unchanged. Tie stale to a verified remote-HEAD change or a validated publication head_changed failure, and require the publication phase to still be pending.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/skill-set/skills/shipping-pr/scripts/skill-set-pr` around lines 1353
- 1374, Require evidence before allowing the stale:polling transition in the
resolving transition validation. Verify that the live remote PR HEAD changed or
that publication recorded a validated head_changed failure, and ensure the
publication phase remains pending; reject stale results without this evidence
instead of consuming a retry.

1349-1362: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Accept the documented AMBIGUOUS result spelling.

The resolver contracts use uppercase AMBIGUOUS, but the transition mapping only permits lowercase ambiguous:awaiting_user. A compliant resolver result is therefore rejected when leaving resolving. Normalize the value at parse time or allow both spellings.

Proposed normalization
 if [[ -n $resolver_result ]]; then
+  [[ $resolver_result == AMBIGUOUS ]] && resolver_result=ambiguous
   case "$resolver_result" in
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/skill-set/skills/shipping-pr/scripts/skill-set-pr` around lines 1349
- 1362, The resolver result validation and transition mapping around the
resolving-state handler must accept the documented uppercase AMBIGUOUS spelling.
Normalize resolver_result during argument parsing, or update the relevant
validation and resolver_result:to case matching so both AMBIGUOUS and ambiguous
reach the existing ambiguous:awaiting_user transition.
🧹 Nitpick comments (3)
plugins/skill-set/evals/shipping-pr/current-worktree-resolution/case.yaml (1)

9-15: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Document the evaluation budget and tool boundary.

Add brief YAML comments explaining the choices for max_turns: 6, timeout_seconds: 240, runs: 3, and the intentionally read-only tool list. As per coding guidelines, plugins/skill-set configuration values must document why each value was chosen and avoid unexplained “voodoo constants.”

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/skill-set/evals/shipping-pr/current-worktree-resolution/case.yaml`
around lines 9 - 15, Document the evaluation configuration in the YAML around
execution and runs: add brief comments explaining the rationale for max_turns:
6, timeout_seconds: 240, runs: 3, and the intentionally read-only allowed_tools
list. Keep the existing values and tool boundary unchanged while ensuring each
configuration value has an explicit justification.

Source: Coding guidelines

plugins/skill-set/evals/shipping-pr/behind-base-current-branch-publication/case.yaml (1)

9-27: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Document the evaluation constants.

max_turns: 6, timeout_seconds: 240, runs: 3, and the grader bounds are unexplained configuration values. Add concise YAML comments explaining why these limits and guards were chosen.

As per coding guidelines, configuration values under plugins/skill-set/**/*.{json,yaml,yml,toml,ini,env,conf} must document their rationale and avoid unexplained “voodoo constants.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@plugins/skill-set/evals/shipping-pr/behind-base-current-branch-publication/case.yaml`
around lines 9 - 27, Document the evaluation constants in the YAML
configuration: add concise comments explaining the rationale for max_turns,
timeout_seconds, runs, and the grader min/max bounds, including the no-mutation
Bash guard. Keep the existing values and evaluation behavior unchanged.

Source: Coding guidelines

plugins/skill-set/tests/test-pr-runner.sh (1)

483-494: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Exercise the full stale retry, not only the state label.

This test never changes the mocked PR HEAD or runs a fresh snapshot after --resolver-result stale, so it would pass even if stale results failed to trigger re-snapshot and reconciliation. Advance the mock HEAD, snapshot after the transition, and assert the new HEAD/fingerprint is observed.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/skill-set/tests/test-pr-runner.sh` around lines 483 - 494, The
stale-retry test around make_fixture stale-resolver-retry must exercise
re-snapshot and reconciliation, not just assert the polling state. After the
stale transition, advance the mocked PR HEAD, run snapshot_case again, and
extend the jq assertions to verify the updated HEAD and fingerprint are recorded
while preserving the existing stale-result and pending-publication checks.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@plugins/skill-set/agents/resolving-pr-blockers.md`:
- Line 15: Update the runner transition and resolution state handling in
skill-set-pr so workspace_mode is either accepted via a --workspace-mode
transition argument and persisted in resolution, allowing resume/recovery to
enforce current-worktree mode, or removed from the required recorded inputs and
treated solely as launch metadata. Keep the documented state requirements
consistent with the chosen behavior.

In `@plugins/skill-set/evals/shipping-pr/current-worktree-resolution/case.yaml`:
- Around line 12-15: Add zero-count safety graders for both Write and Edit in
the case configuration, alongside the existing Bash restriction, so run-evals
cannot receive credit when candidates mutate files through operator-granted
mutation tools. Preserve the current allowed_tools and other grader behavior.
- Around line 22-27: Update the no-mutation-tool Bash entry in the case
configuration to include a non-empty input_match value that matches the intended
safe Bash invocation, while preserving its existing min, max, and arm settings.

In
`@plugins/skill-set/evals/shipping-pr/partial-resolver-publication-stop/prompt.md`:
- Line 3: Update the review resolver outcome in the partial-resolver publication
fixture from failed to AMBIGUOUS for the ambiguous public-API request. Preserve
the queued summary and CodeRabbit marker, pending publication phase, and
unchanged push/comment state so the fixture matches the contract defined by
pr-review-feedback.

In `@plugins/skill-set/skills/shipping-pr/SKILL.md`:
- Line 4: Authorize the resolved scripts/skill-set-pr Bash commands in the
frontmatter for both workflows, covering init, snapshot, transition, publish,
finish, and all other documented PR runner operations. Update
plugins/skill-set/skills/shipping-pr/SKILL.md at lines 4-4 and
plugins/skill-set/commands/pr/fix.md at lines 11-14 and 23-23; apply the
permission change at each listed site.

---

Outside diff comments:
In `@plugins/skill-set/skills/shipping-pr/scripts/skill-set-pr`:
- Around line 1353-1374: Require evidence before allowing the stale:polling
transition in the resolving transition validation. Verify that the live remote
PR HEAD changed or that publication recorded a validated head_changed failure,
and ensure the publication phase remains pending; reject stale results without
this evidence instead of consuming a retry.
- Around line 1349-1362: The resolver result validation and transition mapping
around the resolving-state handler must accept the documented uppercase
AMBIGUOUS spelling. Normalize resolver_result during argument parsing, or update
the relevant validation and resolver_result:to case matching so both AMBIGUOUS
and ambiguous reach the existing ambiguous:awaiting_user transition.

---

Nitpick comments:
In
`@plugins/skill-set/evals/shipping-pr/behind-base-current-branch-publication/case.yaml`:
- Around line 9-27: Document the evaluation constants in the YAML configuration:
add concise comments explaining the rationale for max_turns, timeout_seconds,
runs, and the grader min/max bounds, including the no-mutation Bash guard. Keep
the existing values and evaluation behavior unchanged.

In `@plugins/skill-set/evals/shipping-pr/current-worktree-resolution/case.yaml`:
- Around line 9-15: Document the evaluation configuration in the YAML around
execution and runs: add brief comments explaining the rationale for max_turns:
6, timeout_seconds: 240, runs: 3, and the intentionally read-only allowed_tools
list. Keep the existing values and tool boundary unchanged while ensuring each
configuration value has an explicit justification.

In `@plugins/skill-set/tests/test-pr-runner.sh`:
- Around line 483-494: The stale-retry test around make_fixture
stale-resolver-retry must exercise re-snapshot and reconciliation, not just
assert the polling state. After the stale transition, advance the mocked PR
HEAD, run snapshot_case again, and extend the jq assertions to verify the
updated HEAD and fingerprint are recorded while preserving the existing
stale-result and pending-publication checks.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: fe8bf3bd-6eb6-4759-a6ff-515928425863

📥 Commits

Reviewing files that changed from the base of the PR and between 40364aa and c159768.

📒 Files selected for processing (19)
  • AGENTS.md
  • README.md
  • plugins/skill-set/agents/ci-failure-resolver.md
  • plugins/skill-set/agents/merge-conflict-resolver.md
  • plugins/skill-set/agents/pr-review-feedback.md
  • plugins/skill-set/agents/resolving-pr-blockers.md
  • plugins/skill-set/commands/pr/fix.md
  • plugins/skill-set/evals/shipping-pr/behind-base-current-branch-publication/case.yaml
  • plugins/skill-set/evals/shipping-pr/behind-base-current-branch-publication/graders/functional-contract.md
  • plugins/skill-set/evals/shipping-pr/behind-base-current-branch-publication/prompt.md
  • plugins/skill-set/evals/shipping-pr/current-worktree-resolution/case.yaml
  • plugins/skill-set/evals/shipping-pr/current-worktree-resolution/graders/functional-contract.md
  • plugins/skill-set/evals/shipping-pr/current-worktree-resolution/prompt.md
  • plugins/skill-set/evals/shipping-pr/partial-resolver-publication-stop/prompt.md
  • plugins/skill-set/skills/shipping-pr/SKILL.md
  • plugins/skill-set/skills/shipping-pr/reference/blocker-resolution.md
  • plugins/skill-set/skills/shipping-pr/scripts/skill-set-pr
  • plugins/skill-set/tests/test-pr-runner.sh
  • plugins/skill-set/tests/test-shipping-pr-authorization.sh

Comment thread plugins/skill-set/agents/resolving-pr-blockers.md
Comment thread plugins/skill-set/evals/shipping-pr/partial-resolver-publication-stop/prompt.md Outdated
Comment thread plugins/skill-set/skills/shipping-pr/SKILL.md Outdated
@ether-moon

Copy link
Copy Markdown
Owner Author

@coderabbitai resolve

검토된 unresolved thread 5개를 모두 확인했습니다. 4개 항목은 현재-worktree 상태 기록, eval mutation guard, AMBIGUOUS fixture, portable runner 권한과 회귀 테스트로 수정했습니다. Bash input matcher 제안은 현재 validator 계약상 이 일반 grader에 적용되지 않음을 확인해 변경 없이 수용했습니다. 전체 테스트와 strict plugin/eval/reference/inventory 검증이 통과했습니다.

@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown

@ether-moon 확인했습니다. 수정 및 검증 결과를 반영해 제 리뷰 코멘트를 해결 처리하겠습니다.

✅ Action performed

Comments resolved. Approval is disabled; enable reviews.request_changes_workflow to allow explicit top-level @coderabbitai resolve or @coderabbitai approve commands.

Keep the authorization fixture's Markdown literals while avoiding SC2016 in
the deterministic-validation workflow.
@ether-moon
ether-moon merged commit 01ac708 into main Jul 23, 2026
2 checks passed
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.

1 participant