[Maintenance] Add color rule scheme to AI assistance for repository #3938
All Vouch review confidence checks passed
Residual risk 0.32 = Change Risk (0.57) × (1 − Review Confidence (0.45)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.57 · 437 lines diff across 5 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.364
Shallow Review Depth
shallow_review_depth
0.344
Ai Authored
ai_authored
0.050
Real PR Conversation Timeline
1 comments
"Review active on #3938"
general
weight: 0.35
icfaust
Description
This PR adds a github action which analyzes which files are modified and uses comments in the CODEOWNERS to find what level of review vs AI usage is allowed.
Still missing is associated rules added for general users and AIs to understand and parse.
Tested using my fork's main and a test branch, results can be seen here: https://github.com/icfaust/oneDAL/pull/5#issuecomment-6438239849
I used AI assistance in stitching together the components, with a high level design, corrections, and base yaml implementation by me (claude, opus 5.5 with medium effort).
It uses workflow_run to get the necessary permissions in order to write comments to the PR. It uses the github API in order to query the changed files, so that the underlying PR is properly separated (security reasons). It then classifies using git's glob capability (rather than spinning our own AST to maintain), and reports back the level which is most critical (blue -> green -> yellow -> red). It matches internal discussions and agreed parameters. It will check on every commit, is low overhead, and will only update to higher levels if required (and is therefore sticky). It has edge cases for new folders and rules, and adds an initial color coding via the CODEOWNERS file (suggestions welcome for changing levels). It additionally forces disclosure and usage policies in line with other open source projects, along with some related best practices (i.e. submitters themselves should be writing review comments).
---
<!--
PR should start as a draft, then move to ready for review state
after CI is passed and all applicable checkboxes are closed.
This approach ensures that reviewers don't spend extra time asking for regular requirements.
You can remove a checkbox as not applicable only if it doesn't relate to this PR in any way.
For example, a PR with docs update doesn't require checkboxes for performance
while a PR with any change in actual code should list checkboxes and
justify how this code change is expected to affect performance (or justification should be self-evident).
-->
<details>
<summary>Checklist:</summary>
Completeness and readability
Testing
Performance
</details>