fix(spectrum): unbreak main — pass l_pac to validate_packed_pac in stepper/lockstep paths - #59
Conversation
…paths The cross-query stepper and lockstep entry points (forward_spectrum_via_stepper, forward_spectrum_lockstep, mem_search_via_stepper, mem_search_lockstep) called validate_packed_pac with the pre-l_pac 3-argument signature, so the crate failed to compile against the current 4-argument signature (pac, num_bases, l_pac, ctx). Pass self.l_pac() as the serial spectrum/mem_search callers already do, so the packed-pac length check validates num_bases against the index l_pac.
The current nightly rustfmt wraps the multi-argument call in the keyed_tests .kmt-fallback test; apply it so the CI fmt check passes. Formatting only.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughFour ChangesPacked-PAC Validation Fix
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
|
@coderabbitai review |
✅ Action performedReview finished.
|
main does not currently compile: its CI has been red since #50 (cross-query lockstep primitives) landed. #50 added four new packed-pac entry points —
forward_spectrum_via_stepper,forward_spectrum_lockstep,mem_search_via_stepper,mem_search_lockstep— each callingvalidate_packed_pac(pac, num_bases, ctx)with the old 3-argument signature. In parallel, #47 (word-at-a-time decode) had already changedvalidate_packed_pacto 4 arguments(pac, num_bases, l_pac, ctx)so the packed length is validated against the indexl_pac. The two PRs were merged without recompiling against each other, socargo build/cargo testfail on main with fourE0061: this function takes 4 arguments but 3 arguments were suppliederrors.This passes
self.l_pac()as the third argument at all four sites, exactly as the serialforward_spectrum/mem_searchcallers already do, restoring thenum_bases == l_paccheck for those paths.Commits:
fix(spectrum): …— the four arity corrections (functional; this is what unbreaks the build).style(spectrum): …— a rustfmt wrap of an unrelated multi-arg call inkeyed_teststhat the current nightly rustfmt (used by the CI fmt step) reformats; separated from the functional commit.Verified locally:
cargo build --all-targets,cargo clippy -p prmi -p prmi-sys --all-targets --all-features -- -D warnings,cargo test --workspace, andcargo +nightly fmt --all -- --checkall pass. This also unblocks #53 (and every other open PR), whose merge-with-main CI is currently red for the same reason.Summary by CodeRabbit