[16.0][FIX] base_report_to_printer: compute the print action in the caller's context #512
All Vouch review confidence checks passed
Residual risk 0.18 = Change Risk (0.33) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.33 · 153 lines diff across 1 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
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.301
Real PR Conversation Timeline
1 comments
"Review active on #512"
general
weight: 0.35
rousseldenis
print_action_for_report_name()gets the report from_get_report_from_name(), which replaces the context with the user's context.behaviour()is then computed without the context of the caller: its ownskip_printer_exceptionkey never reaches it this way, and a module that passes a key to itsbehaviour()(e.g. to route prints by the operating unit of the printed records) has to replaceprint_action_for_report_name()instead of extending it.The other callers of
behaviour()already compute it in the caller's context:print_document()andprint_document_client_action()call it on the report itself, and the print in_render_qweb_pdf()/_render_qweb_text()gets the report through_get_report(), which keeps the context. Onlyprint_action_for_report_name()lost it.This gives the report the caller's context back before
behaviour()is computed.test_print_action_for_report_name_returns_if_reportfollows the new call (with_context()on the report); a new test checks that a key of the caller's context reachesbehaviour().AI assistance: the change and its tests were written with Claude Code; I reviewed and tested them (module test suite, pre-commit).
cc @rousseldenis @chienandalu