Feat/verification json output#196
Conversation
TestSuiteGate.verify ran pytest via a hard-coded python3 interpreter with cwd set to file_path.parent. For nested files this misses the repo's pyproject.toml / pytest.ini / conftest.py and may use a different interpreter/venv than the host process, causing false positives or undiscovered tests and CI-vs-local mismatch. - Run pytest via sys.executable instead of python3. - Set cwd to the resolved project root (project_root or file dir). - Prepend the project root to PYTHONPATH for layouts that rely on it. - Add tests asserting the interpreter, cwd, and PYTHONPATH. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Add a stable, versioned JSON report for verification results so CI gates, bots, and parent tools can consume structured data instead of scraping Rich terminal output. - VerificationResult.to_json_dict() / CheckResult.to_json_dict() and a JSON_SCHEMA_VERSION constant in verification/result.py - format_verification_result_json() in verification/report.py - new `refactron verify` command with --json (verify.py); exit code 0 when safe to apply, 1 when blocked - main.py: widen subcommand import guards to except Exception so a broken optional dependency degrades gracefully instead of taking down the whole CLI Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, 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 have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (7)
✨ 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 |
solve #189
This change adds machine-readable JSON output to Refactron's verification pipeline so that CI gates, bots, and parent tooling can consume structured results instead of scraping
Rich-formatted terminal text. It introduces to_json_dict() helpers on the VerificationResult and CheckResult data contracts, backed by a JSON_SCHEMA_VERSION constant so the schema can evolve safely for downstream consumers, along with a format_verification_result_json() formatter in verification/report.py. A new refactron verify CLI command is added that runs
▎ the verification engine on a code change and supports a --json flag, emitting a stable, versioned JSON object (overall status, blocking reason, confidence, timing, and per-check
▎ details) and returning exit code 0 when the change is safe to apply or 1 when it is blocked. Finally, the CLI's subcommand registration in main.py is hardened to catch any exception
▎ rather than only ImportError, so that a broken optional dependency degrades a single subcommand gracefully instead of taking down the entire CLI.