feat(riskcatalog): optional rank for risk prioritization (#339)#395
Merged
Conversation
- Add optional rank (int) on #Risk; lower = higher importance - Enforce unique rank values among risks that set rank - Extend fixtures and add duplicate-rank negative test Made-with: Cursor Signed-off-by: sonupreetam <spreetam@redhat.com>
- Risk Catalog Guide: rank field, examples, validation note - risk-catalog-example.yaml: ranks for two High risks - Tutorials index: mention optional rank Made-with: Cursor Signed-off-by: sonupreetam <spreetam@redhat.com>
ee5bc1c to
fbce1de
Compare
Contributor
|
@eddie-knight This change looks pretty straightforward -- is this aligning with what you had in mind for prioritization? |
Keep optional rank wording from feature branch and new Mapping Document row from upstream main. Signed-off-by: sonupreetam <spreetam@redhat.com> Co-authored-by: Cursor <cursoragent@cursor.com>
eddie-knight
approved these changes
May 26, 2026
jpower432
approved these changes
May 26, 2026
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.
Summary
Adds optional
rankon#Riskso authors can order risks within a catalog when severity alone is not enough (e.g. multiple risks at the same severity), per issue #339.Behavior
rankis optionalint; lower values mean higher relative importance.Changes
riskcatalog.cue:rank?,_uniqueRiskRanksconstrainttest/schema_test.go: regression caseValidation
make testcue vet -c -d '#RiskCatalog' .on fixturesCloses #339
Made with Cursor