Skip to content

feat(autonomy): planner gate for non-Claude providers at level off (P3.T2)#392

Merged
OBenner merged 1 commit into
developfrom
claude/p3-planner-autonomy-gate
Jul 6, 2026
Merged

feat(autonomy): planner gate for non-Claude providers at level off (P3.T2)#392
OBenner merged 1 commit into
developfrom
claude/p3-planner-autonomy-gate

Conversation

@OBenner

@OBenner OBenner commented Jul 5, 2026

Copy link
Copy Markdown
Owner

What

Roadmap P3·T2: AUTO_CODE_AUTONOMY=off must block the non-Claude planner. The coder path already respects the autonomy level (P3·T1); the planner had no gate at all — at off, a direct-API planner would still spin up and write implementation_plan.json.

  • agents/planner.py — new _assert_planner_autonomy_allows(provider_name) called from create_planner_session() after runner routing, on the effective provider (so a route to a different engine is enforced too). At level off + non-Claude provider it raises ProviderError with an actionable message before the session exists.
  • Claude sessions keep working at every level; claude/safe/bold keep non-Claude planners available. Unset env resolves to the default level (claude) and stays permissive.

Acceptance (roadmap P3·T2)

При off не-Claude planner блокируется

Verified end-to-end via a provider stub: at off the gate raises and create_session is never reached; at safe the non-Claude session is created; at off the Claude session is created.

Tests

  • 10 new in tests/test_planner_autonomy_gate.py (helper matrix incl. default-level behavior and provider naming in the error; 3 end-to-end через create_planner_session).
  • Related suites green: test_planner.py, test_autonomy_level.py — 60 passed total.
  • Ruff check + format clean.

🤖 Generated with Claude Code

@cursor

cursor Bot commented Jul 5, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@coderabbitai

coderabbitai Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

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

Next review available in: 48 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: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 6b39957d-01c6-4bb7-b565-4f01b7b7fc9d

📥 Commits

Reviewing files that changed from the base of the PR and between a85fff1 and c1c0fbe.

📒 Files selected for processing (3)
  • apps/backend/agents/planner.py
  • docs/strategy/roadmap.md
  • tests/test_planner_autonomy_gate.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/p3-planner-autonomy-gate

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.

…3.T2)

AUTO_CODE_AUTONOMY=off now blocks non-Claude planner sessions with a
clear ProviderError before the session exists. The check runs in
create_planner_session on the effective provider (after runner
routing), so a route to a different engine is enforced too. Claude
sessions keep working at every level; claude/safe/bold keep non-Claude
planners available (default level is claude, so unset env stays
permissive).

Tests: 10 new (helper matrix incl. default level + provider naming in
the error; end-to-end through create_planner_session with a provider
stub proving create_session is never reached when gated).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Oleg Miagkov <mrobenner@gmail.com>
@sonarqubecloud

sonarqubecloud Bot commented Jul 5, 2026

Copy link
Copy Markdown

@OBenner OBenner merged commit fe32c5b into develop Jul 6, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant