Fix token mapping for rules whose spots share structure; fix swprintf size in replace_backrefs #6
All Vouch review confidence checks passed
Residual risk 0.31 = Change Risk (0.59) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.59 · 174 lines diff across 2 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.309
Sensitive Paths
sensitive_paths
0.059
Real PR Conversation Timeline
1 comments
"Review active on #6"
general
weight: 0.35
arademaker
Two fixes in
lattice-mapping.c, one commit each.Clear temporary unifications before the first spot of a lattice mapping rule (fixes #3)
initialize_possible_map()andupdate_possible_map_add()leave their last successful match unified into the rule.apply_lattice_rule1()only calledbump_generation()whenhave > 0, so the first candidate for the first spot was unified into a rule that still held another edge in another spot. For rules whose spots share structure this failed, and the failure cache then rejected that candidate for the rest of the rule's run. The bump is now unconditional.Pass the remaining buffer size to swprintf in replace_backrefs (fixes #4)
The size argument stayed at 1023 while the write pointer advanced, so builds with
_FORTIFY_SOURCEabort the first time a rule with a${...}back-reference in its output applies.Testing
a b b cgets the new token butb b candab b b cdo not; after, every adjacent identical pair gets it.-n 5) on test suites for the ERG (610 items), Zhong (850 items) and a Cantonese grammar (116 items), apart from edge numbering in one derivation.🤖 Generated with Claude Code