Skip to content

docs: gemini: hard stops on review advice that silences errors - #12018

Merged
maliberty merged 1 commit into
The-OpenROAD-Project:masterfrom
oharboe:gemini-hard-stops
Nov 4, 2026
Merged

maliberty merged 1 commit into
The-OpenROAD-Project:masterfrom
oharboe:gemini-hard-stops

Conversation

@oharboe

@oharboe oharboe commented Oct 27, 2026

Copy link
Copy Markdown
Collaborator

Gemini review comments cost authors time to refute, and the most common advice that gets turned down is also the most harmful when followed: a null, empty or zero guard, a default or a quiet fallback that turns a loud, early failure into a silent wrong result. This makes that a hard stop at the top of .gemini/styleguide.md, and adds the other false positives that recur.

Refs #11585.

Where the rules come from

Every Gemini review thread on OpenROAD pull requests since April 2026 that got a human reply (717 of 2,905 comments) was read and the turned-down advice sorted by habit (approximate counts, a thread can count twice):

Habit Threads Examples
Guard, default or silent fallback for a state that cannot occur, where a hard failure is wanted ~110 #11569, #11151
Reports a bug that is not there (misread code or API) ~85 #10522, #10088
Missing symbol, option or include that exists; compile error that is not (auto& on a by-value return) ~30 #11569
Wrong platform premise: Windows, MSVC, CentOS 7, old Boost, "C++20 not allowed" ~25
Logger::error() treated as returning ~8
Bazel advice that misreads the rule (genrule $(@D), transitional BUILD state) 12
Unmeasured micro-optimisations, nits on cold code ~40
Scope: pre-existing code, QoR-changing side remarks (float→double accumulation would have changed 62 of 100 gpl goldens) ~20
Flip-flops between rounds (asks to remove a default argument, then to restore it) several #11151

The null bullet is replaced

Since the current guide landed on 2026-10-13, the share of Gemini comments that mention null/nullptr went up, from 20 % (487 of 2,466) to 36 % (159 of 439). That is a keyword count, not a reading of each comment, but it does not look like the bullet is working. The replacement says what we want instead: a reachable null dereference is reported with its triggering input and fixed with logger_->error() or an assert, never a silent default. The bullet's other point, trace guards and callees before reporting, is kept in a general form.

🤖 Generated with Claude Code

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

@oharboe
oharboe marked this pull request as ready for review October 27, 2026 11:02
@oharboe
oharboe requested a review from a team as a code owner October 27, 2026 11:02
@oharboe
oharboe requested a review from precisionmoon October 27, 2026 11:02
The most common Gemini advice reviewers turn down is also the most
harmful when followed: a guard, default or fallback that turns a loud
failure into a silent wrong result. Put it first, as a hard stop, and
add the other false positives that recur in the review threads: missing
symbols that exist, Logger::error() treated as returning, platforms
OpenROAD does not support, Bazel rule semantics, QoR-changing side
remarks and advice that flips between rounds.

Replace the null-handling bullet: since it landed, the share of Gemini
comments mentioning null went up, not down.

Refs The-OpenROAD-Project#11585

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
@oharboe

oharboe commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator Author

@maliberty Unrelated outage, merge? Whittles down bad advice from Gemini.

@maliberty
maliberty merged commit c2239c3 into The-OpenROAD-Project:master Nov 4, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants