Skip to content

fix(release): PR #44 CodeRabbit residuals (round 5) — pre-v0.5.7-tag cleanup - #45

Merged
cemililik merged 1 commit into
mainfrom
development
May 11, 2026
Merged

cemililik merged 1 commit into
mainfrom
development

Conversation

@cemililik

Copy link
Copy Markdown
Collaborator

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 in try/except so an unexpected crash (corrupted torch install where torch.__version__ raises) becomes a structured abi_preflight_crashed JSON envelope instead of a raw Python traceback that pre-empts the --output-format json contract. Exit code stays EXIT_TRAINING_ERROR (= 2). CodeRabbit MAJOR.
  • docs/roadmap/completed-phases.md::Phase 12 — Tier 1 status line claimed a [ingestion-secrets] extra "via detect-secrets with regex fallback", but that extra was never published; only [ingestion-pii-ml] is in pyproject.toml. Reworded as historical context. CodeRabbit MINOR; pure docs accuracy.
  • CLAUDE.md — exit-code contract line was 0/1/2/3/4, but the canonical table in docs/standards/error-handling.md documents 0/1/2/3/4/5 (Phase 22 / v0.5.5 added EXIT_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)

  • CHANGELOG MD024 (duplicate ### Added / ### Fixed) — Keep-a-Changelog format intentionally repeats H3 subsection headers per release. The project ships no .markdownlint.json and markdownlint is not in any CI step. CodeRabbit's default MD024 config is incompatible with Keep-a-Changelog; disagreed-with-reason.
  • EXIT_WIZARD_CANCELLED = 5 itself — The exit code has been in production since v0.5.5. Renumbering would break any CI/CD consumer that branches on the public exit-code contract. The standard at docs/standards/error-handling.md already documented this code correctly; the drift was only in 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 . — clean
  • All ten gauntlet doc guards green (anchor-resolution, bilingual-parity, CLI help, wizard-defaults, no-analysis-refs, no-unguarded-sys-modules-pop, …)
  • Two new regression tests in tests/test_abi_check.py::TestPreflightHandlesProbeCrash pin the new error-handling contract (exit code + JSON envelope shape)
  • After merge: tag v0.5.7 and publish to PyPI

🤖 Generated with Claude Code

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>
@qodo-code-review

Copy link
Copy Markdown
ⓘ 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.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @cemililik, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@coderabbitai

coderabbitai Bot commented May 11, 2026

Copy link
Copy Markdown
Contributor

Warning

Rate limit exceeded

@cemililik has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 25 minutes and 5 seconds before requesting another review.

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 @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 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 configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: ad61b2a6-3f7d-4f9c-914b-f6cdccfd0dfd

📥 Commits

Reviewing files that changed from the base of the PR and between 2be90a5 and b3d6dcb.

📒 Files selected for processing (5)
  • CHANGELOG.md
  • CLAUDE.md
  • docs/roadmap/completed-phases.md
  • forgelm/cli/_training.py
  • tests/test_abi_check.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch development

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.

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

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.

@sonarqubecloud

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@cemililik
cemililik merged commit 5e089ab into main May 11, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant