feat(autonomy): add --autonomy-readiness CLI for direct-API promotion (Phase 3)#275
Conversation
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>
|
Warning Review limit reached
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 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 configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (4)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|



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_AUTONOMYknob 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-smokeprobe or hand-read.auto-claude/runtime/provider-smoke-history.json.This adds a pure-read inspection command:
Example
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:DirectApiAutonomousReadinessdataclass +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 --checkclean onapps/backend.🤖 Generated with Claude Code