Skip to content

feat(autonomy): add --autonomy-readiness CLI for direct-API promotion (Phase 3)#275

Merged
OBenner merged 1 commit into
developfrom
feat/autonomy-readiness-cli
May 31, 2026
Merged

feat(autonomy): add --autonomy-readiness CLI for direct-API promotion (Phase 3)#275
OBenner merged 1 commit into
developfrom
feat/autonomy-readiness-cli

Conversation

@OBenner

@OBenner OBenner commented May 31, 2026

Copy link
Copy Markdown
Owner

What & why — Phase 3 follow-up

The promotion machinery is complete end-to-end (nightly e2e evidence → gate → factory), and #274 wired the single AUTO_CODE_AUTONOMY knob into the gate. But operators had no one-shot way to see how close a provider is to promotion or exactly what's missing — they had to run a full --provider-smoke probe or hand-read .auto-claude/runtime/provider-smoke-history.json.

This adds a pure-read inspection command:

python run.py --autonomy-readiness            # all direct-API providers
python run.py --autonomy-readiness openai     # one provider
python run.py --autonomy-readiness --json     # structured output

Example

Direct-API autonomous promotion readiness

openai: NOT READY (disabled - direct_api_autonomous_disabled)
  autonomy level: claude
  missing: AUTO_CODE_AUTONOMY
  evidence: none recorded (provider_history_missing)
  thresholds: min_stable_runs=3, max_history_age_days=7

Summary: 0 ready, 1 not ready.

Each report combines, per provider: the gate verdict (READY / NOT READY + status + reason), the missing requirements, the operator's resolved autonomy level, the recorded evidence snapshot (consecutive passes, recent window, trend, last run, covered live-fault cases / task families), and the policy thresholds.

Change

  • agents/runtime/direct_api_autonomy.py: DirectApiAutonomousReadiness dataclass + resolve_direct_api_autonomous_readiness() — a non-mutating resolver folding the gate, policy, autonomy level, and evidence.
  • cli/runtime_commands.py: build_autonomy_readiness_payload / format_autonomy_readiness_text / handle_autonomy_readiness_command.
  • cli/main.py: --autonomy-readiness [PROVIDER] arg + early-exit dispatch (mirrors --runtime-modes).

Tests

claude disabled (missing AUTO_CODE_AUTONOMY), safe blocks without evidence, safe ready with stable history, bold skips evidence, all-provider listing, text format, JSON handler round-trip, arg parsing. 316 runtime/autonomy tests pass; ruff check + ruff format --check clean on apps/backend.

🤖 Generated with Claude Code

Phase 3 follow-up. The promotion machinery is complete end-to-end (nightly
e2e evidence -> gate -> factory), and the knob now drives the gate, but
operators had no one-shot way to see how close a provider is to promotion
or exactly what is missing. They had to run a full provider-smoke probe or
hand-read .auto-claude/runtime/provider-smoke-history.json.

This adds a pure-read inspection command:

    python run.py --autonomy-readiness            # all direct-API providers
    python run.py --autonomy-readiness openai     # one provider
    python run.py --autonomy-readiness --json     # structured output

Each report combines, per provider: the gate verdict (READY / NOT READY +
status + reason), the missing requirements, the operator's resolved
autonomy level, the recorded evidence snapshot (consecutive passes, recent
window, trend, last run, covered live-fault cases / task families), and the
policy thresholds (min_stable_runs, max_history_age_days).

- agents/runtime/direct_api_autonomy.py: DirectApiAutonomousReadiness
  dataclass + resolve_direct_api_autonomous_readiness() — a non-mutating
  resolver that folds the gate, policy, autonomy level, and evidence.
- cli/runtime_commands.py: build_autonomy_readiness_payload /
  format_autonomy_readiness_text / handle_autonomy_readiness_command.
- cli/main.py: --autonomy-readiness [PROVIDER] arg + early-exit dispatch.

Tests: claude disabled (missing AUTO_CODE_AUTONOMY), safe blocks without
evidence, safe ready with stable history, bold skips evidence, all-provider
listing, text format, JSON handler, arg parsing. 316 runtime/autonomy
tests pass; ruff check + format clean on apps/backend.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented May 31, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

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

More reviews will be available in 39 minutes and 53 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

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.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 23acca29-4b10-451f-8132-5ec2bf8d934c

📥 Commits

Reviewing files that changed from the base of the PR and between e08401a and d323036.

📒 Files selected for processing (4)
  • apps/backend/agents/runtime/direct_api_autonomy.py
  • apps/backend/cli/main.py
  • apps/backend/cli/runtime_commands.py
  • tests/test_runtime_modes_command.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/autonomy-readiness-cli

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 and usage tips.

@sonarqubecloud

Copy link
Copy Markdown

@OBenner OBenner merged commit c9975fa into develop May 31, 2026
20 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