Repository navigation
fix(release): PR #44 CodeRabbit residuals (round 5) — pre-v0.5.7-tag cleanup - #45
Conversation
CodeRabbit posted 11 inline comments across PR #44 (two batches, one per round-3/round-4 cycle). Seven were already resolved by earlier rounds; this round closes the three residuals plus one stale-doc finding CodeRabbit raised but the project's own `error-handling.md` already documented correctly. - `forgelm/cli/_training.py::_preflight_numpy_torch_abi` now wraps the call to `compute_numpy_torch_abi_status` in a `try/except` so any unexpected exception (e.g. corrupted torch install where `torch.__version__` raises `AttributeError`) converts into a structured `abi_preflight_crashed` JSON envelope rather than emitting a raw Python traceback that pre-empts the `--output-format json` contract. Two new regression tests in `tests/test_abi_check.py::TestPreflightHandlesProbeCrash` pin the exit code (`EXIT_TRAINING_ERROR` = 2, same class as the broken-ABI verdict so CI/CD doesn't need to distinguish "ABI bad" from "ABI probe died") and the envelope shape. - `CLAUDE.md` exit-code line corrected from `0/1/2/3/4` to `0/1/2/3/4/5` to match the canonical table in `docs/standards/error-handling.md` (Phase 22 / v0.5.5 added `EXIT_WIZARD_CANCELLED = 5`; CLAUDE.md was stale, not the code). - `docs/roadmap/completed-phases.md` Phase 12 Tier 1 status line no longer advertises a `[ingestion-secrets]` extra that was never published — only `[ingestion-pii-ml]` exists in `pyproject.toml`. Reworded as historical context ("originally planned as `[ingestion-secrets]` but deferred"). Verified: 1653 passed, 14 skipped, 0 failed under pytest-randomly shuffled order; ruff format + ruff check + all ten gauntlet doc guards green. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
ⓘ You've reached your Qodo monthly free-tier limit. Reviews pause until next month — upgrade your plan to continue now, or link your paid account if you already have one. |
There was a problem hiding this comment.
Sorry @cemililik, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
|
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 (5)
✨ 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 |
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 0 |
| Duplication | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
|
There was a problem hiding this comment.
Code Review
This pull request implements Round 5 follow-up changes to improve robustness and documentation accuracy. Key updates include wrapping the NumPy/Torch ABI preflight check in a try-except block to ensure it returns a structured JSON error instead of a raw traceback during crashes, updating the exit code contract in CLAUDE.md to include code 5, and correcting historical documentation regarding ingestion extras. New tests were added to verify the crash-handling logic in the ABI preflight. I have no feedback to provide as there were no review comments.



Summary
Final cleanup pass before tagging
v0.5.7. Closes the three residual CodeRabbit findings against PR #44's round-3 / round-4 commits (the other 7 of CodeRabbit's 11 inline comments were already resolved by the rounds that landed in PR #44 itself).forgelm/cli/_training.py::_preflight_numpy_torch_abi— wrap the underlying ABI probe intry/exceptso an unexpected crash (corrupted torch install wheretorch.__version__raises) becomes a structuredabi_preflight_crashedJSON envelope instead of a raw Python traceback that pre-empts the--output-format jsoncontract. Exit code staysEXIT_TRAINING_ERROR(= 2). CodeRabbit MAJOR.docs/roadmap/completed-phases.md::Phase 12— Tier 1 status line claimed a[ingestion-secrets]extra "viadetect-secretswith regex fallback", but that extra was never published; only[ingestion-pii-ml]is inpyproject.toml. Reworded as historical context. CodeRabbit MINOR; pure docs accuracy.CLAUDE.md— exit-code contract line was0/1/2/3/4, but the canonical table indocs/standards/error-handling.mddocuments0/1/2/3/4/5(Phase 22 / v0.5.5 addedEXIT_WIZARD_CANCELLED = 5). CLAUDE.md was stale, not the code. CodeRabbit MAJOR against a doc drift — closed by aligning the agent guidance with the existing canonical standard.What CodeRabbit raised that we did NOT change (and why)
### Added/### Fixed) — Keep-a-Changelog format intentionally repeats H3 subsection headers per release. The project ships no.markdownlint.jsonand markdownlint is not in any CI step. CodeRabbit's defaultMD024config is incompatible with Keep-a-Changelog; disagreed-with-reason.CLAUDE.md, which this PR fixes.Test plan
pytest tests/— 1653 passed, 14 skipped, 0 failed (pytest-randomly shuffled order, 73.83% coverage)ruff format . && ruff check .— cleantests/test_abi_check.py::TestPreflightHandlesProbeCrashpin the new error-handling contract (exit code + JSON envelope shape)v0.5.7and publish to PyPI🤖 Generated with Claude Code