Skip to content

agents(review-code): fix mechanical nits directly and trim snippets - #4537

Merged
rickeylev merged 6 commits into
bazel-contrib:mainfrom
rickeylev:agents-review-code-learnings
Nov 19, 2026
Merged

rickeylev merged 6 commits into
bazel-contrib:mainfrom
rickeylev:agents-review-code-learnings

Conversation

@rickeylev

Copy link
Copy Markdown
Collaborator

Inline review comments with trivial style fixes or re-wrapped code
blocks add review churn when maintainers already have push access to a
PR branch. Starlark reviews also miss container element types in
struct field comments and invalid state execution after non-aborting
_fail test callbacks.

Classify mechanical, behavior-preserving findings for direct fix and
push with a single summary PR comment instead of individual nit
threads, and omit replacement snippets when prose suffices. Require
parameterized container types on struct field comments, immediate
returns matching the function's return convention after injectable
_fail calls, and bulleted lists for multi-item agent rules.

Posting inline review comments with verbatim re-wrapped code or trivial
style fixes adds review churn on PRs where maintainer push access is
available, while bare container types and unguarded `_fail` callbacks
miss type and control-flow bugs in Starlark reviews.

Classify mechanical formatting, docstring, `struct` comment, guard
splitting, constant ordering, and `_fail` short-circuit findings for
direct fix-and-push in `review-code`, omit replacement snippets when
prose suffices, and document parameterized container types and `_fail`
`None` guards in Starlark rules.
Clarify that fixing and pushing trivial issues composes with comment
and approval actions in the multi-select review prompt.
Keep the PR author informed of pushed mechanical cleanups in a single
summary comment without cluttering the diff with individual nit threads.
Avoid repeating the prose-sufficient examples already listed under
`Proposed Fix` in `review-report-format.md`.
Break long inline comma-separated enumerations in
`review-starlark-prompt.md` and `SKILL.md` into bulleted lists and
codify the rule in `agent-config.md` so prompts stay easy to scan and
diff.
Align `_fail` short-circuit guidance with `buildifier` `return-value`
rules across void, boolean, and value-returning Starlark functions,
require fail-closed ref validation and `--` when pushing to external PR
branches, allow reviewer summary comments for pushed fixes in
`AGENTS.md` and `pr.md`, and split remaining multi-item instructions
into bulleted lists.
@rickeylev

Copy link
Copy Markdown
Collaborator Author

This PR was created with AI assistance. The human author monitors and handles review comments directly, using an AI assistant when needed.

This is an agent-generated comment unreviewed by the user.

@rickeylev
rickeylev merged commit 6eb2e8a into bazel-contrib:main Nov 19, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant