Add Go package risk aggregation - #7
Merged
rdzehtsiar merged 3 commits intoJun 10, 2026
Merged
Conversation
|
Codecov Report❌ Patch coverage is
📢 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
|
rdzehtsiar
marked this pull request as ready for review
June 10, 2026 16:39
rdzehtsiar
deleted the
codex/linear-mention-rdg-35-implement-package-level-aggregation
branch
June 10, 2026 16:40
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
Description
package_risk_scores,package_risk_terms, andpackage_risk_factsinsrc/pipeline/store_reducer.rsand corresponding indexes.materialize_package_risk_scoreswhich groupsfile_risk_scoresjoined withfile_factsbypackage_path, accumulates file counts, scores, churn, complexity, and source-coupling, computes aggregate terms (max, mean, top-3 mean, file count, source coupling) and writes package-level score, terms, and facts.materialize_package_risk_scores(&transaction)?;beforematerialize_project_risk_summary.PACKAGE_RISK_FORMULA_ID, weighting constants,package_risk_row,package_risk_term,normalized_package_value,package_risk_band, and accumulator structs) and updateinitialize_databaseto create the new tables.scan_materializes_go_package_risk_scoresintests/scanner_cli.rsand extend existing store reducer schema test to assert presence of package tables, and updateREADME.mdto document package-level risk behavior.Testing
cargo fmt --checkandcargo clippy --all-targets --all-features -- -D warnings, and both completed successfully.cargo testand all tests passed, including the new integration testscan_materializes_go_package_risk_scores(unit tests: 95 passed; scanner CLI tests: 8 passed).package_risk_formula_idandpackage_risk_scores_materialized, per-package file counts, source coupling aggregation, and a positive package score.Codex Task