Fix center, slugify and render() differences (#587) #590
All Vouch review confidence checks passed
Residual risk 0.12 = Change Risk (0.31) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.31 · 100 lines diff across 1 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
Shallow Review Depth
shallow_review_depth
0.289
Diff Size
diff_size
0.276
Real PR Conversation Timeline
1 comments
"Review active on #590"
general
weight: 0.35
LilyFirefly
Part of #587 (wordwrap is in #594).
1. center: counts characters instead of bytes. It was also padding the escaped text (
<counted as<).. now it pads first and escapes after, same as Django. Django's test_center02 passes now.2. slugify: strips leading underscores too. Also
\x1c-\x1fbecome dashes like in Django.3. render() returns SafeString. render_to_string as well.
Tests added for each. Django test suite goes 884 -> 885 passing.. nothing else changes. Also compared against Django on a lot of random strings and got no differences.
Not fixed: lone surrogates, width passed as a string/float and
{{ missing|center:5 }}(left that since #586 is in that area). The render() change is close to what #586 touches in template.rs so one of them will need a rebase.