MVP hardening: review fixes, CI/release workflows, and dependency updates #1

Merged
JMR-dev merged 7 commits from feat-mvp into main 2026-06-25 01:50:56 +00:00
JMR-dev commented 2026-06-25 01:48:31 +00:00 (Migrated from github.com)

Builds on the published v0.1 engine (ADEPT EPUB + Kindle MOBI, Windows Adobe key auto-extraction) with hardening, automation, and dependency maintenance. No change to the supported-format scope.

Robustness (code review)

  • Fix four panic-on-malformed/edge-input defects surfaced by /code-review (each with a regression test):
    • ADEPT EPUB content guard < 16 → <= 16 (empty-after-slice unwrap panic).
    • MOBI section-table guards (require ≥ 2 sections; reject record count ≥ section count).
    • trailing_size saturating/checked subtraction + caller clamp (no usize underflow).
    • normalize_pids slices by chars, not bytes (non-ASCII --pid can't panic).
  • CLI wraps the per-file decrypt in catch_unwind, so one bad file can't abort a remove <glob> batch.

CI / Release (GitHub Actions)

  • ci.yml: on PRs to main, runs fmt + clippy (-D warnings) + unit tests on windows-latest and macos-latest.
  • release.yml: manual workflow_dispatch that builds Windows (x86_64) and macOS (aarch64 + x86_64) binaries and publishes them to GitHub Releases.
  • All actions pinned to commit SHAs at their latest versions (with version comments); Rust toolchain pinned to 1.96.0 (latest stable, matches MSRV).

Dependency updates

  • Bump dependencies to latest and migrate the breaking APIs: zip 2→8, quick-xml 0.37→0.40, toml 0.8→1, windows 0.58→0.62, winreg 0.52→0.56, and the RustCrypto cipher/hash generation (aes 0.8→0.9, cbc 0.1→0.2, sha 0.10→0.11, …).
  • rand updated to 0.10 with a small, documented, test-only rand_core 0.6 compatibility shim (RandCompat), since the latest rsa (0.9) still needs rand_core 0.6 for keygen. The CryptoRng guarantee is preserved.

Verification

  • 46 unit tests pass; clippy + rustfmt clean.
  • Re-verified end-to-end on a real ADEPT EPUB after the dependency update: DPAPI key extraction + RSA/AES decryption → valid DRM-free EPUB.

🤖 Generated with Claude Code

Builds on the published v0.1 engine (ADEPT EPUB + Kindle MOBI, Windows Adobe key auto-extraction) with hardening, automation, and dependency maintenance. No change to the supported-format scope. ## Robustness (code review) - Fix four panic-on-malformed/edge-input defects surfaced by `/code-review` (each with a regression test): - ADEPT EPUB content guard `< 16` → `<= 16` (empty-after-slice `unwrap` panic). - MOBI section-table guards (require ≥ 2 sections; reject record count ≥ section count). - `trailing_size` saturating/checked subtraction + caller clamp (no `usize` underflow). - `normalize_pids` slices by chars, not bytes (non-ASCII `--pid` can't panic). - CLI wraps the per-file decrypt in `catch_unwind`, so one bad file can't abort a `remove <glob>` batch. ## CI / Release (GitHub Actions) - `ci.yml`: on PRs to `main`, runs fmt + clippy (`-D warnings`) + unit tests on `windows-latest` and `macos-latest`. - `release.yml`: manual `workflow_dispatch` that builds Windows (x86_64) and macOS (aarch64 + x86_64) binaries and publishes them to GitHub Releases. - All actions pinned to commit SHAs at their latest versions (with version comments); Rust toolchain pinned to 1.96.0 (latest stable, matches MSRV). ## Dependency updates - Bump dependencies to latest and migrate the breaking APIs: zip 2→8, quick-xml 0.37→0.40, toml 0.8→1, windows 0.58→0.62, winreg 0.52→0.56, and the RustCrypto cipher/hash generation (aes 0.8→0.9, cbc 0.1→0.2, sha 0.10→0.11, …). - `rand` updated to 0.10 with a small, documented, test-only `rand_core` 0.6 compatibility shim (`RandCompat`), since the latest `rsa` (0.9) still needs `rand_core` 0.6 for keygen. The `CryptoRng` guarantee is preserved. ## Verification - 46 unit tests pass; clippy + rustfmt clean. - Re-verified end-to-end on a real ADEPT EPUB after the dependency update: DPAPI key extraction + RSA/AES decryption → valid DRM-free EPUB. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.