[19.0][IMP] payroll: prepare retained refund evidence before confirmation #332
All Vouch review confidence checks passed
Residual risk 0.05 = Change Risk (0.56) × (1 − Review Confidence (0.91)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.56 · 68 lines diff across 4 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.94 · 2 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.253
Sensitive Paths
sensitive_paths
0.056
Real PR Conversation Timeline
3 items
Hi @appstogrow, @nimarosa,
some modules you are maintaining are being modified, check this out!
The standard is to use the "prepare" pattern.
Why not use it here?
refund_values = payslip._prepare_refund_payslip()
copied_payslip = payslip.copy(refund_values)
dreispt
votrelec
An installed localization can keep statutory calculation evidence in
copy=Falsefields. The native full-refund workflow copies the salary lines and immediately confirms the copy without recomputing it. There is currently no narrow extension point to attach the original retained evidence before confirmation validates that copy.Extract the existing copy operation into
_copy_refund_payslip(). Localizations can extend it cooperatively to attach their retained evidence reference. The default copy values, numbering, confirmation and original-to-refund link keep their existing behavior. This does not add a country-specific policy to the payroll engine.Validation: all 28 native payroll tests pass, including a new workflow regression that extends the hook, checks that preparation occurs before confirmation, changes the current contract wage and verifies that the confirmed refund retains the original salary amounts. Ruff check and format pass for the changed Python files.