Skip to content

Handle mutool failures and disable checkout credential persistence - #9

Merged
Lulzx merged 2 commits into
mainfrom
agent/address-pr8-followups
Jul 20, 2026
Merged

Handle mutool failures and disable checkout credential persistence#9
Lulzx merged 2 commits into
mainfrom
agent/address-pr8-followups

Conversation

@Lulzx

@Lulzx Lulzx commented Jul 20, 2026

Copy link
Copy Markdown
Owner

What changed

  • Treat non-zero mutool exits as benchmark failures instead of reporting misleading timings.
  • Disable checkout credential persistence in the Zig compatibility CI job.

Why

These changes address the two review-summary comments missed during PR #8.

Validation

  • Zig 0.15.2: tests, native builds, and WebAssembly build
  • Zig 0.16.0: tests, native builds, and WebAssembly build
  • Python: 187 passed, 1 skipped

Summary by CodeRabbit

  • Bug Fixes

    • Benchmark runs now correctly flag and report failures when the underlying document-processing command exits unsuccessfully, including clearer “failed vs not found” messaging.
  • Security

    • Improved CI checkout security by preventing credentials from being retained after repository checkout.

@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 7d9613c5-582c-40e7-8dea-b39a195d5a40

📥 Commits

Reviewing files that changed from the base of the PR and between 8a583e0 and 7326a4e.

📒 Files selected for processing (1)
  • src/bench.zig
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/bench.zig

📝 Walkthrough

Walkthrough

The CI checkout step disables persisted credentials. The mutool benchmark now distinguishes command failures from unavailable mutool commands and preserves successful timing behavior.

Changes

CI credential handling

Layer / File(s) Summary
Disable persisted checkout credentials
.github/workflows/ci.yml
The actions/checkout@v4 step sets persist-credentials: false.

Benchmark failure reporting

Layer / File(s) Summary
Validate and report mutool execution
src/bench.zig
benchMutool returns error.MutoolFailed for non-zero exit codes, and the MuPDF comparison reports failed executions separately from unavailable mutool commands.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the two main changes: mutool failure handling and checkout credential persistence.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch agent/address-pr8-followups

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.

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/bench.zig`:
- Around line 130-131: Update mainInner’s error handling to match
error.MutoolFailed separately, preserving and reporting it as a failed mutool
execution; keep the existing “mutool not found” message only for spawn or
command-start failures. Ensure other errors retain their current propagation
behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 1e4a34a3-bcd0-4cb5-b891-e8af1809ef06

📥 Commits

Reviewing files that changed from the base of the PR and between 9271ec6 and 8a583e0.

📒 Files selected for processing (2)
  • .github/workflows/ci.yml
  • src/bench.zig

Comment thread src/bench.zig
@Lulzx Lulzx changed the title Fix PR review follow-ups Handle mutool failures and disable checkout credential persistence Jul 20, 2026
@Lulzx
Lulzx merged commit 6a11bba into main Jul 20, 2026
4 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