Repository navigation
fix: address remaining review findings - #552
Merged
Merged
Conversation
Follow-up to #548 for the audited review of main at 6de8538: - Reject non-hex characters in the extension's hex decoder: `from_str_radix` accepts a leading `+`, so "+f" decoded successfully before. Covered by a unit test. - Document both `unsafe` blocks in `real_home_dir` with SAFETY comments. - Route the gallery stderr-tail locks through `runtime::lock_recover` instead of unwrapping on poison. - Turn live clippy suppressions into `#[expect(..., reason = "...")]` and drop the four `too_many_arguments` allowances that no longer fire (their functions take at most 7 arguments). - Date the legacy paired-extension branch for removal after 2027-03-01. - Delete the empty `runtime` test module left by a removed test.
Linuxuser67
force-pushed
the
fix/review-remaining-findings
branch
from
October 27, 2026 07:11
ae6c239 to
bac1de5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #548, covering the remaining findings from the audited review of
mainat6de8538. Finding 8 (file/test-file size) is out of scope and stays shelved.Changes
src/extension_server.rs):hex_decodenow rejects anything that is not an ASCII hex digit.u8::from_str_radixaccepts a leading+, so"+f"and"0f+0"decoded successfully before. Added a unit test for those inputs (and for odd-length / non-hex).src/video_tools.rs): documented the twounsafeblocks inreal_home_dir—sysconf(no pointers) andCStr::from_ptr(entry.pw_dir)(non-null after a successfulgetpwuid_r, bytes copied before the buffer can change).src/gallery_runner.rs): the two stderr-tail locks now go throughruntime::lock_recoverlike every other worker-shared mutex, instead of.lock().unwrap(). A panicking stderr task can no longer take the download down with it.reason, and the liveclippy::too_many_arguments,clippy::type_complexityandclippy::needless_borrowsuppressions are#[expect(..., reason = "...")], so a future clippy that stops firing them fails the build instead of leaving dead allowances behind. Dropped the fourtoo_many_argumentsallowances that no longer fire (their functions take at most 7 arguments). The test-moduleawait_holding_lockstays anallow(test-only by design) but now has a reason.src/extension_server.rs): the paired-extension compatibility branch is now dated for removal after 2027-03-01. Adjust the date if it does not match the extension's update window.src/runtime.rs): deleted the empty#[cfg(test)] mod teststhat only documented a deleted test.Findings #4 (naming) and #7 (serial-test docs) needed no code:
CONTRIBUTING.mdalready documentsRUST_TEST_THREADS=1and the serial test run.Verification
cargo fmt --check,cargo clippyand the test suite were not run locally; CI is the gate.git diff --checkis clean.type_complexitysuppression is still live at clippy 1.99 (the earlier local score estimate of 200 was wrong), so it is kept as an#[expect].needless_borrowsuppression documents a clippy false positive inside let-chains (1.99). If clippy fixes it, the new#[expect]will flag the stale suppression — that is the intended behavior.