[19.0][IMP] base_tier_validation: warn at definition save if reviewer lacks model ACL #31
All Vouch review confidence checks passed
Residual risk 0.16 = Change Risk (0.40) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.40 · 276 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 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.336
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #31"
general
weight: 0.35
bofiltd
Summary
Catch the "invalid tier definition" misconfiguration at config time instead of letting it fail silently later.
When an admin sets a reviewer (individual user or group) that has no
ir.model.accessread on the tier's target model, anonchangewarning explains the problem and names the affected user(s). The warning is non-blocking — the record can still be saved. Legitimate workflows (admin is about to add the user to the group,ir.rulegrants per-record access on demand, multi-company quirks) keep working; the warning just makes it impossible to misconfigure this silently.Scope
| review_type | Behaviour |
|---|---|
|
individual| Checkreviewer_id||
group| Check every member ofreviewer_group_id.user_ids||
field| Skipped — the reviewer only resolves at validation time from a field on the document. The chatter notification atrequest_validationtime (separate PR) catches that case. |Tradeoff (worth calling out for review)
check_access('read')is a model-level check. Per-recordir.rulecan grant or revoke access at runtime. So:ir.rulewould have allowed access on specific records → admin sees the warning and ignores it. Fine; non-blocking.ir.ruleblocks access on some records → still silently broken for those. The chatter PR catches this.The message is worded "may not be able to read" on purpose. Better than silent failure.
Test plan
Three tests cover the three branches:
test_definition_onchange_warns_when_reviewer_lacks_access(individual)test_definition_onchange_warns_when_group_member_lacks_access(group)test_definition_onchange_skips_field_review_type(field — no warning)Each unlinks the tester model's
ir.model.access, builds atier.definition.new(...)with the relevant reviewer config, and asserts the onchange returns / does not return a warning dict.Follow-up
A separate PR will add a chatter notification on
request_validationfor the cases this onchange can't cover (fieldreviewer, dynamic group membership that changed after the definition was saved,ir.rule-only restrictions).