Skip to content

dref: follow-up for self-contained flag fix, add tests#150

Open
bradh wants to merge 1 commit intokixelated:mainfrom
bradh:dref_follow_up_2026-04-02
Open

dref: follow-up for self-contained flag fix, add tests#150
bradh wants to merge 1 commit intokixelated:mainfrom
bradh:dref_follow_up_2026-04-02

Conversation

@bradh
Copy link
Copy Markdown
Collaborator

@bradh bradh commented Apr 2, 2026

Follow-up for #147 - fixes handling of the self-contained flag when it isn't self contained, and adds tests

@iameli does this look OK to you?

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 2, 2026

Warning

Rate limit exceeded

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

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 0 minutes and 0 seconds.

⌛ 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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: b5dc08cc-02a1-4406-8f4f-b9cad4f80fb5

📥 Commits

Reviewing files that changed from the base of the PR and between 5a20a30 and 75b52af.

📒 Files selected for processing (1)
  • src/moov/trak/mdia/minf/dinf/dref/url.rs

Walkthrough

The Url struct's encoding behavior was updated to modify the self_contained flag logic. Previously hardcoded to true, the flag now reflects whether the location field is empty. A test module was added with coverage for encoding and decoding of empty URLs and HTTP URLs, asserting exact encoded byte sequences and round-trip consistency.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main changes: a follow-up fix to the self-contained flag and the addition of tests.
Description check ✅ Passed The description is directly related to the changeset, explaining it as a follow-up to issue #147 that fixes the self-contained flag handling and adds tests.
Docstring Coverage ✅ Passed Docstring coverage is 80.00% which is sufficient. The required threshold is 80.00%.

✏️ 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.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
src/moov/trak/mdia/minf/dinf/dref/url.rs (1)

95-95: Rename test for accuracy and readability.

test_url_file_decode is decoding ENCODED_HTTP; renaming to test_url_http_decode would better match intent.

✏️ Suggested rename
-    fn test_url_file_decode() {
+    fn test_url_http_decode() {
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/moov/trak/mdia/minf/dinf/dref/url.rs` at line 95, The test function named
test_url_file_decode is misnamed because it decodes the ENCODED_HTTP constant;
rename the test function to test_url_http_decode (update the fn identifier and
any internal references) so the name reflects the content, and run the test
suite to ensure no other references rely on the old name.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@src/moov/trak/mdia/minf/dinf/dref/url.rs`:
- Line 95: The test function named test_url_file_decode is misnamed because it
decodes the ENCODED_HTTP constant; rename the test function to
test_url_http_decode (update the fn identifier and any internal references) so
the name reflects the content, and run the test suite to ensure no other
references rely on the old name.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: b6830bb0-1272-4cfb-9fa5-269d4f039421

📥 Commits

Reviewing files that changed from the base of the PR and between 8481ed9 and 5a20a30.

📒 Files selected for processing (1)
  • src/moov/trak/mdia/minf/dinf/dref/url.rs

@bradh bradh force-pushed the dref_follow_up_2026-04-02 branch from 5a20a30 to 75b52af Compare April 2, 2026 10:03
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