← Back to Pull requests

stricter increment lint #728

Merged
bakkot merged 2 files (8 lines) on Sep 02, 2026 19:53 UTC
View on GitHub
bakkot bakkot commented on Sep 01, 2026 22:46 UTC
Author
Diff: 8 lines (+5 / -3) across 2 files Reviewer: michaelficarra Review duration: 1266m
All Vouch review confidence checks passed
Residual risk 0.02 = Change Risk (0.18) × (1 − Review Confidence (0.88)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.18 · 8 lines diff across 2 files
0.18
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.84 · 5 substantive comment(s)
0.84
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 50%
87%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
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.131
Real PR Conversation Timeline
7 items
gibson042 gibson042 commented on code on Sep 01, 2026 23:17 UTC
Code Review
src/lint/rules/algorithm-spelling.ts:1
@@ -9,7 +9,7 @@ const ruleId = 'algorithm-spelling';
 // Note that these will be composed, so cannot contain backreferences
 const matchers = [
   {
-    pattern: /\b[Ii]ncrement\b/gu,
+    pattern: /\b[Ii]ncrement _/gu,

We should apply the same pattern below as well, keeping consistency for "increment"/"decrement"/"increase"/"decrease" checks.

   {
-    pattern: /\b[Dd]ecrement\b/gu,
+    pattern: /\b[Dd]ecrement _/gu,
     message: 'prefer "set _x_ to _x_ - 1" over "decrement"',
   },

bakkot bakkot commented on code on Sep 01, 2026 23:43 UTC
Code Review
src/lint/rules/algorithm-spelling.ts:1
@@ -9,7 +9,7 @@ const ruleId = 'algorithm-spelling';
 // Note that these will be composed, so cannot contain backreferences
 const matchers = [
   {
-    pattern: /\b[Ii]ncrement\b/gu,
+    pattern: /\b[Ii]ncrement _/gu,

Disagree: "increment" a noun that's reasonable to use in algorithms e.g. as a record name; "decrement" is not. (I suppose I could imagine "increase" or "decrease" being used as nouns but it'd be a stretch.)

gibson042 gibson042 commented on code on Sep 01, 2026 23:47 UTC
Code Review
src/lint/rules/algorithm-spelling.ts:1
@@ -9,7 +9,7 @@ const ruleId = 'algorithm-spelling';
 // Note that these will be composed, so cannot contain backreferences
 const matchers = [
   {
-    pattern: /\b[Ii]ncrement\b/gu,
+    pattern: /\b[Ii]ncrement _/gu,

[[Decrement]] is absolutely a reasonable record field name, and even if it weren't I'd still be arguing for consistency here to avoid confusion about what sets "decrement" apart—especially since all the cases we care about catching are still covered by /\b[Dd]ecrement _/gu.

michaelficarra michaelficarra commented on code on Sep 02, 2026 01:04 UTC
Code Review
src/lint/rules/algorithm-spelling.ts:1
@@ -9,7 +9,7 @@ const ruleId = 'algorithm-spelling';
 // Note that these will be composed, so cannot contain backreferences
 const matchers = [
   {
-    pattern: /\b[Ii]ncrement\b/gu,
+    pattern: /\b[Ii]ncrement _/gu,

I imagine I would object to a record field named [[Decrement]], but I also think we should lint against increment/decrement equally.

bakkot bakkot commented on code on Sep 02, 2026 18:40 UTC
Code Review
src/lint/rules/algorithm-spelling.ts:1
@@ -9,7 +9,7 @@ const ruleId = 'algorithm-spelling';
 // Note that these will be composed, so cannot contain backreferences
 const matchers = [
   {
-    pattern: /\b[Ii]ncrement\b/gu,
+    pattern: /\b[Ii]ncrement _/gu,

OK, done.

michaelficarra michaelficarra approved these changes on Sep 02, 2026 19:43 UTC
Approved Reviewer

Approved these changes.

Assignees
bakkot bakkot
Labels
risk: low confidence: 87.7% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 17.6% (LOW) · Higher = larger blast radius
17.6%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 87.7% · Lower = rushed or shallow review
87.7%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 2.2% · Safe to merge
2.2%
Repository