Feat: Control where properties are inserted #81
All Vouch review confidence checks passed
Residual risk 0.16 = Change Risk (0.41) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.41 · 206 lines diff across 2 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.319
Shallow Review Depth
shallow_review_depth
0.289
Ai Authored
ai_authored
0.050
Real PR Conversation Timeline
1 comments
"Review active on #81"
general
weight: 0.35
quintesse
Implements #68
The commits are structured:
1) feature addition, all tests pass unchanged
2) test additions exercising the new API
3) extracts the 'navigateToStartOfBlock' Method into Cursor, makes it public and adds tests.
4) fixes a regression introduced by 1) that went unnoticed due to missing tests.
I added package-private getters and setters to
Cursorbecause I dislike creating useless copies withcopy().(Those were also helpful for writing tests)
The core change is that
addNewKeyValuenow accepts a Cursor as an insertion-point.There are sanity checks so that properties are not inserted at illogical positions (see also
testNavigateToStartOfBlock):then it is moved to point at the preceeding whitespace (if any) of the first comment in the block.
then it is moved to point at the preceeding whitespace of the first comment (if any) or the key.
So to insert directly after a property, the Cursor must be moved to point directly after the EOL of the VALUE.
There are new utility methods to make this easier:
Cursor Properties.afterHeaderComment()Cursor Properties.beforeFirstProperty()Cursor Properties.afterLastProperty()Cursor Properties.before(String key)Cursor Properties.after(String key)The default insertion-point is
afterLastProperty. (forput(String key, String value)andputRaw(String rawKey, String rawValue))