Skip to content

feat(riskcatalog): optional rank for risk prioritization (#339)#395

Merged
jpower432 merged 3 commits into
gemaraproj:mainfrom
sonupreetam:feat/issue-339-risk-rank
May 26, 2026
Merged

feat(riskcatalog): optional rank for risk prioritization (#339)#395
jpower432 merged 3 commits into
gemaraproj:mainfrom
sonupreetam:feat/issue-339-risk-rank

Conversation

@sonupreetam

Copy link
Copy Markdown
Contributor

Summary

Adds optional rank on #Risk so 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

  • rank is optional int; lower values mean higher relative importance.
  • When set, each rank must be unique among risks that specify it (partial ranking allowed).
  • Schema uniqueness enforced via CUE (same pattern as unique risk ids).

Changes

  • riskcatalog.cue: rank?, _uniqueRiskRanks constraint
  • Fixtures + negative test for duplicate rank
  • test/schema_test.go: regression case

Validation

  • make test
  • cue vet -c -d '#RiskCatalog' . on fixtures

Closes #339

Made with Cursor

@sonupreetam sonupreetam requested a review from a team as a code owner April 29, 2026 09:47
@sonupreetam sonupreetam requested a review from a team as a code owner April 29, 2026 09:50
@sonupreetam sonupreetam marked this pull request as draft April 29, 2026 09:50
- 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>
@sonupreetam sonupreetam force-pushed the feat/issue-339-risk-rank branch from ee5bc1c to fbce1de Compare April 29, 2026 10:26
@jpower432 jpower432 requested a review from eddie-knight April 29, 2026 23:04
@jpower432

Copy link
Copy Markdown
Contributor

@eddie-knight This change looks pretty straightforward -- is this aligning with what you had in mind for prioritization?

@sonupreetam sonupreetam moved this to In progress 📋 in ComplyTime planning May 5, 2026
@sonupreetam sonupreetam moved this from In progress 📋 to In Review 👀 in ComplyTime planning May 5, 2026
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>
@sonupreetam sonupreetam marked this pull request as ready for review May 26, 2026 16:10
@jpower432 jpower432 merged commit 8488cc2 into gemaraproj:main May 26, 2026
8 checks passed
@sonupreetam sonupreetam deleted the feat/issue-339-risk-rank branch May 26, 2026 22:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support Risk fine tuning or prioritization

3 participants