← Back to Pull requests

minor: Use /** not /// style comments. #20849

Merged
gianm merged 5 files (145 lines) on Nov 07, 2026 03:09 UTC
View on GitHub
gianm gianm commented on Nov 05, 2026 09:07 UTC
Author

Most existing files use /**. I don't feel one is really inherently better than the other, and it's nice to keep things consistent, so this patch rules out the /// style.

Diff: 145 lines (+83 / -62) across 5 files Reviewer: amaechler Review duration: 2521m
All Vouch review confidence checks passed
Residual risk 0.05 = Change Risk (0.39) × (1 − Review Confidence (0.87)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.39 · 145 lines diff across 5 files
0.39
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.89 · 3 substantive comment(s)
0.89
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 50%
86%
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.298
Real PR Conversation Timeline
7 items
FrankChen021 FrankChen021 commented on code on Nov 05, 2026 12:24 UTC
Code Review
codestyle/checkstyle.xml:1
@@ -43,6 +43,13 @@
     <property name="message" value="Prohibit @author tags in Javadoc"/>
     <property name="fileExtensions" value="java"/>
   </module>
+  <module name="RegexpSingleline">
+    <property name="format" value="^\s*///"/>

[P1] Project-wide rule leaves existing /// comments failing Checkstyle

Finding: This RegexpSingleline is configured at Checker scope, so every Java source and test file processed by the inherited Maven Checkstyle plugin is checked. The current head still contains 17 matching lines in sql/src/main/java/org/apache/druid/sql/calcite/planner/DruidRexExecutor.java and extensions-core/kafka-indexing-service/src/main/java/org/apache/druid/indexing/kafka/supervisor/KafkaSupervisor.java; those unchanged files will produce violations and prevent CI from passing.

Suggestion: Convert the remaining documentation comments to Javadoc or explicitly scope/exclude the rule so the new Checkstyle policy does not fail on existing sources.

FrankChen021 FrankChen021 commented on Nov 05, 2026 12:24 UTC
Reviewer

🟡 Changes recommended

The new project-wide Checkstyle rule rejects 17 existing /// comment lines in two unchanged Java source files, so CI will fail until those comments are migrated or the rule is deliberately scoped.

Reviewed 3 of 3 changed files; findings in 1 file. Coverage included the full supplied new-review merge-base diff and surrounding Checkstyle/source context.

Validation: git diff --check passed for the supplied three-file diff; no build or tests were run.

| Severity | Findings |
| --- | ---: |
| P0 | 0 |
| P1 | 1 |
| P2 | 0 |
| P3 | 0 |
| Total | 1 |

<!-- mergelens:review -->

---

This is an automated review by Codex GPT-5.6-Luna(max)

After addressing the findings or replying to the comments, you can request another review from me to trigger a new automated review.

FrankChen021 FrankChen021 commented on Nov 05, 2026 13:50 UTC
Contributor

As we are using jdk25, I think we can try some new jdk features.

The markdown style comment introduced in jdk23, which dones't require HTML/link/code tags embeded in the comments, makes comments simpler and easy to read.

If we place the consistency as the first priority, then we can impose this rule.

gianm gianm commented on Nov 05, 2026 17:37 UTC
Author

If we place the consistency as the first priority, then we can impose this rule.

I understand this question is a matter of taste and there is not one correct answer. For me I prefer consistency, since something seems strange to me about having different styles of comments in different files.

FrankChen021 FrankChen021 commented on Nov 06, 2026 12:13 UTC
Reviewer

🟢 Approval recommended

The updated head converts the remaining /// comments and retains the project-wide Checkstyle guard without introducing a correctness or compatibility issue. The prior finding is resolved: the current head contains no Java lines matching ^\s///.

Reviewed 5 of 5 changed files. This updated-head pass started with the supplied 2-file incremental diff, then covered the full 5-file merge-base diff and surrounding Checkstyle/Javadoc context.

Validation: git diff --check passed; no Java lines matching ^\s/// remain. No build or tests were run.

<!-- mergelens:review -->

---

This is an automated review by Codex GPT-5.6-Luna(max)

amaechler amaechler approved these changes on Nov 06, 2026 14:05 UTC
Approved Reviewer

🐻 Makes sense.

One option that could be considered in the future: In other projects I work on, we decided that we "like" the new markdown comment style, but also didn't want to update everything at once. The rule there is that a file in itself has to be consistent, and that any file you touch that uses the traditional syntax should be switched to ///. Not perfect, since diffs over quite a long period can have many more changes, but overall that has been working fine.

Reviewers
Assignees
gianm gianm
Labels
risk: low confidence: 87.0% 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: 38.7% (MEDIUM) · Higher = larger blast radius
38.7%
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.0% · Lower = rushed or shallow review
87.0%
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: 5% · Safe to merge
5%
Repository