Repository navigation
agents: require user-visible docs prose and workaround comments - #4271
Merged
rickeylev merged 1 commit intoOct 15, 2026
Merged
Conversation
Agents sometimes document internal workarounds in user-facing reference docs or omit inline comments explaining why non-obvious code workarounds are needed. Update the documentation and Starlark rules and review prompts to keep docs focused on user-visible behavior and require comments on non-obvious workarounds stating the intent, why the direct approach fails, and why the workaround works.
rickeylev
enabled auto-merge
October 15, 2026 04:14
rickeylev
pushed a commit
to rickeylev/rules_python
that referenced
this pull request
Oct 16, 2026
…rib#4272) Replace the unmaintained `github.com/smacker/go-tree-sitter` dependency with the official `github.com/tree-sitter/go-tree-sitter` and `github.com/tree-sitter/tree-sitter-python` (v0.25.0) modules. This updates the Python grammar so the Gazelle plugin can parse Python 3.14 PEP 758 unparenthesized multi-exception `except` clauses without errors. Because the official bindings include C sources across parent and subdirectory paths that standard `go_repository` Gazelle generation cannot compile directly, fetch both modules via `http_archive` with custom `cc_library` and `go_library` targets in both Bzlmod and WORKSPACE modes. We also remove unneeded go_repository items from `gazelle/deps.bzl`. Generated by Gemini. Tested on our large-scale QuantumAI monorepo. TAG=agy ### Timing I ran the parent commit and this PR on our primary QuantumAI monorepo. This PR might make things a little faster, but I didn't want to wait for 5 or more runs in hyperfine 😆. Parent commit: ``` $ git -C ../../oss/bazel-contrib/rules_python rev-parse HEAD b7ec5bd # agents: require user-visible docs prose and workaround comments (bazel-contrib#4271) $ hyperfine --warmup=1 --runs=3 'bazel run --bes_backend= //:gazelle' Benchmark 1: bazel run --bes_backend= //:gazelle Time (mean ± σ): 93.052 s ± 18.023 s [User: 99.884 s, System: 6.302 s] Range (min … max): 82.134 s … 113.855 s 3 runs Warning: Statistical outliers were detected. Consider re-running this benchmark on a quiet system without any interferences from other programs. It might help to use the '--warmup' or '--prepare' options. ``` This PR: ``` $ git -C ../../oss/bazel-contrib/rules_python rev-parse HEAD bc5b12a $ hyperfine --warmup=1 --runs=3 'bazel run --bes_backend= //:gazelle' Benchmark 1: bazel run --bes_backend= //:gazelle Time (mean ± σ): 80.338 s ± 2.570 s [User: 80.271 s, System: 3.808 s] Range (min … max): 78.292 s … 83.223 s 3 runs ``` Fixes bazel-contrib#3416
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Agents sometimes document internal workarounds in user-facing reference
docs or omit inline comments explaining why non-obvious code workarounds
are needed.
Update the documentation and Starlark rules and review prompts to keep
docs focused on user-visible behavior and require comments on
non-obvious workarounds stating the intent, why the direct approach
fails, and why the workaround works.