fix: diagnose repeated restricted downloads#62
Conversation
Greptile SummaryThis PR improves the Confidence Score: 5/5Safe to merge; the one finding is dead code that doesn't affect runtime behavior. All identified issues are P2 or lower. The unreachable fallback error path in commands.rs is cosmetic dead code — the correct, more-informative error is always returned. Core stale-cache logic and comparison helpers are well-tested. crates/empack-lib/src/application/commands.rs (dead fallback branch lines 3623–3626) Important Files Changed
Prompt To Fix All With AIThis is a comment left during a code review.
Path: crates/empack-lib/src/application/commands.rs
Line: 3616-3626
Comment:
**Unreachable fallback error path**
`restricted_rerun_error_detail` only returns `None` when its input slice is empty — but this code runs inside `if !restricted_entries.is_empty()`, so `dedup_restricted_mod_infos` always yields at least one entry and the function always returns `Some(...)`. The fallback `return Err` on line 3623 is dead code: the less-informative message can never be emitted.
Alternatively, replace `restricted_rerun_error_detail` with a non-`Option`-returning helper to make the invariant explicit.
How can I resolve this? If you propose a fix, please make it concise.Reviews (3): Last reviewed commit: "fix: trim duplicate rerun diagnostics" | Re-trigger Greptile |
Surface rerun restricted entries after build --continue and stop trusting unchanged preexisting restricted cache files for new pending sessions with a baseline.
Rename the restricted rerun comparison variants to satisfy the workspace clippy configuration without changing behavior.
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Deduplicate rerun display entries by download URL, reuse the existing diagnostic string when building the returned error, and make cache staging enforce the same Current semantics as the upstream missing-entry checks.
Normalize rerun summary deduping across CurseForge URL variants and keep the diagnostic sentence in structured terminal output instead of repeating it in the returned continue-build error.
Summary
build --continuestill failsTest plan