Guarantee deterministic risk sorting - #6
Merged
Conversation
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Qodana for RustIt seems all right 👌 No new problems were found according to the checks applied 💡 Qodana analysis was run in the pull request mode: only the changed files were checked Contact Qodana teamContact us at qodana-support@jetbrains.com
|
|
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.



Motivation
rankinsertion order or unstable iteration when materializing package and file lists.Description
ORDER BY relative_path ASCandORDER BY file_analysis.relative_path ASCto the SQL used infinalize_source_dependenciesandmaterialize_file_factsinsrc/pipeline/store_reducer.rs.ORDER BY score.rank ASCwithORDER BY score.score DESC, score.relative_path ASCinsrc/tui.rsso the UI presents rows by score descending then path ascending.materialized_package_and_file_lists_are_path_sortedandmaterialized_risk_rows_break_score_ties_by_pathinsrc/pipeline/store_reducer.rs, andloads_risk_rows_by_score_descending_then_path_ascendinginsrc/tui.rsto cover deterministic ordering and tie-breaking.text_rowsadded and code formatted; commit message isGuarantee deterministic risk sorting.Testing
cargo fmt --checkand formatting passed.cargo testand the full test suite passed (98unit tests in-library plus integration CLI tests and store reducer tests all succeeded).cargo clippy --all-targets --all-features -- -D warningsand the linter completed without warnings.Codex Task