docs: Document the finding risk calculation contract - #3152
Draft
justin-prime1 wants to merge 1 commit into
Draft
Conversation
Contributor
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
3 tasks
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.
Description
Intent
Document the optional persisted calculation evidence used by BHE to render an auditable risk-score explanation without recomputing historical graph state in the browser.
Implementation
Adds optional
risk_score_calculationschemas for stored/effective exposure, impact, aggregate score, and ordered per-zone zone/environment, hop/reason/divisor, source-principal count/reason, and contribution evidence. Arbitrary-precision values remain decimal strings. The bundled OpenAPI document is regenerated. There are no BHCE runtime, database, UI, graph, or migration changes.Blast Radius / Risk
This is an additive optional contract. Generated consumers may expose the new object; enums and decimal strings must remain synchronized with BHE. Existing clients that ignore unknown optional properties should be unaffected. Deploying BHE without this shared contract would leave repository documentation/generated artifacts inconsistent.
BHE/BHCE Parity
matched: BHCE owns the additive schema; BHE owns hydration, JSON projection, and UI. The object is intentionally optional and scoped to list/relationship detail responses.Reviewability
Review size: 78 reviewable schema lines. Excluded mechanical/generated material: 100 generated
openapi.jsonlines.Test Changes
No BHCE behavioral tests were added because this is schema-only. Schema generation, formatting/linting, and cleanliness were validated; the paired BHE PR covers projection and UI behavior. No tests were removed.
Rollback
Revert this schema/generated-document commit after or with the paired BHE consumer. No database, feature flag, configuration, persisted-data, or graph cleanup is involved.
Motivation and Context
The BHE sister renders exact persisted factors so analysts can audit the aggregate. No Jira or GitHub issue is associated with this prototype, by author request.
Resolves N/A — prototype authorized without a ticket.
How Has This Been Tested?
Validation / Evidence
At BHCE
0bbdee2044804359a7290c958f1ef0ee88c97dcfand BHE9cc730c67072a92533a8190e4acfeb6731bec7f8:just prepare-for-codereviewpassed.Explicitly Not Validated
Screenshots (optional):
Runtime evidence from the paired BHE PR:
Types of changes
Checklist: