Skip to content

iinf: return error for unsupported infe v1#165

Merged
bradh merged 2 commits into
kixelated:mainfrom
rhoopr:fix/infe-v1-unsupported
May 29, 2026
Merged

iinf: return error for unsupported infe v1#165
bradh merged 2 commits into
kixelated:mainfrom
rhoopr:fix/infe-v1-unsupported

Conversation

@rhoopr

@rhoopr rhoopr commented May 28, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Return Error::Unsupported("infe version 1 extensions") instead of panicking on version-1 infe entries.
  • Add regression coverage for a minimal version-1 infe entry and the fuzz-derived iinf body from the issue.

Closes #164.

Tests

  • cargo test test_iinf_decode_unsupported_infe_v1_returns_error
  • just test - passed, 221 tests
  • just check - passed; cargo shear reported existing unlinked/empty-file warnings and exited 0

@coderabbitai

coderabbitai Bot commented May 28, 2026

Copy link
Copy Markdown

Actionable comments posted: 0

@coderabbitai

coderabbitai Bot commented May 28, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@rhoopr, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 55 minutes and 20 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, 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 include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 35fc9148-5dbb-473e-90ec-2a24ad0609c5

📥 Commits

Reviewing files that changed from the base of the PR and between e17f4cd and 68b0ff2.

📒 Files selected for processing (1)
  • src/meta/iinf.rs

Walkthrough

This PR eliminates unimplemented panic paths in ItemInfoEntry's encode_body_ext and decode_body_ext methods when handling infe extension version 1. Both methods now return Error::Unsupported("infe version 1 extensions") instead. A new unit test test_iinf_decode_unsupported_infe_v1_returns_error verifies that Iinf::decode_body correctly propagates this error when decoding an iinf body containing an infe entry with version 1.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'iinf: return error for unsupported infe v1' clearly and concisely summarizes the main change: replacing a panic with an error return for unsupported version-1 infe entries.
Description check ✅ Passed The description accurately relates to the changeset, explaining the error handling change, test coverage added, and issue closure, with verification of test execution.
Linked Issues check ✅ Passed The changes fully address issue #164: replacing the unimplemented panic with Error::Unsupported for version-1 infe entries and adding regression test coverage as required.
Out of Scope Changes check ✅ Passed All changes are directly scoped to the linked issue: error handling for unsupported infe version 1 and related test coverage, with no unrelated modifications.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@bradh bradh merged commit 7f26f82 into kixelated:main May 29, 2026
1 check passed
@github-actions github-actions Bot mentioned this pull request May 29, 2026
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.

iinf: unsupported version-1 infe panics instead of returning Error

2 participants