Is your feature request related to a problem? Please describe.
Production Java members whose visibility is broader solely for direct test access do not consistently explain that exception to the repository's minimal-visibility rule. This makes it harder to distinguish intentional test access from visibility that can be tightened.
Describe the solution you'd like
After #20048 merges, audit production Java sources for members accessed directly only by tests and add // visible for testing immediately above their declarations. Check usages before changing each member so the comment is not added when production code also requires the visibility.
Describe alternatives you've considered
Changing member visibility is not part of this cleanup because tests may need direct access. An annotation would add dependencies or require a repository-wide annotation convention where the existing comment already has broad precedent.
Additional context
#20048 adds this convention to the always-loaded agent knowledge guidance. The rule came from review feedback on #19868.
Tip
React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.
Is your feature request related to a problem? Please describe.
Production Java members whose visibility is broader solely for direct test access do not consistently explain that exception to the repository's minimal-visibility rule. This makes it harder to distinguish intentional test access from visibility that can be tightened.
Describe the solution you'd like
After #20048 merges, audit production Java sources for members accessed directly only by tests and add
// visible for testingimmediately above their declarations. Check usages before changing each member so the comment is not added when production code also requires the visibility.Describe alternatives you've considered
Changing member visibility is not part of this cleanup because tests may need direct access. An annotation would add dependencies or require a repository-wide annotation convention where the existing comment already has broad precedent.
Additional context
#20048 adds this convention to the always-loaded agent knowledge guidance. The rule came from review feedback on #19868.
Tip
React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding
+1orme too, to help us triage it. Learn more here.