fix(merge): repeated merges, help grouping and release test build - #196
Merged
Conversation
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 fixes from reviewing #192 and #193, stacked on top of #195 so the reviewed branches stay untouched.
make_disjoint_fromre-derived the right graph's ids asid((1, old_id)). Those ids survive into the merged graph whenever a block or node finds no homologue, so a second merge with that graph on the left mapped the new graph's raw ids straight back onto them, and the disjointness guard fired with a message blaming a 64-bit hash collision. The salt now comes from the path id offset, which strictly increases along a merge chain, and the bounded retry loop is back as the actual guarantee —simplifydrops paths without renumbering, so the offset is not monotone under every command. Covered by a unit test and an integration test that appends to an already-merged graph.sanity_check, which is#[cfg(any(test, debug_assertions))]and therefore missing from the library when integration tests are built in release:cargo clippy --release --all-targetsfailed at those call sites. The calls were redundant anyway —merge_graphsandmerge_runalready sanity-check the same graph — so they are gone rather than cfg-guarded.--circular,--verify,--no-progress-barand--guide-treewere listed under the "Alignment" help section, becausenext_help_headingapplies to every argument declared after the flattenedGraphMergeParams. That struct is now declared last in both commands. Pre-existing forbuild;mergehad inherited it. CLI reference regenerated.merge --verifymaterialised every genome of both inputs before comparing. It now reconstructs and drops one genome at a time, matching whatreconstruct --verifyalready does. Measured on a 3+1 E. coli merge the peak RSS is unchanged (~1.05 GB either way — the merge itself dominates), so this is consistency rather than a measurable win.--all-targetsin release still fails at #192's own commit; fixing that there would have meant force-pushing three branches.