Repository navigation
go: control nogo analysis and preserve caller settings - #306
Merged
Merged
Conversation
tonyredondo
marked this pull request as ready for review
November 13, 2026 18:49
There was a problem hiding this comment.
More details
The transitions preserve caller nogo policy and existing restoration records, while disabled exports retain ordinary analysis. Restoration remains explicitly opt-in and requires patched rules_go.
🤖 Bits Code Review · Commit 61240b2
anmarchenko
approved these changes
Nov 13, 2026
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.
Instrumented Go tests can repeat nogo analysis already performed by the ordinary build. Their SDK transition also needs to preserve the caller's settings when a consumer's rules_go restores configuration on non-Go dependency edges.
This PR adds two options to
dd_topt_go_test:nogoFalseto skip analysis in the enabled instrumented Go dependency closure when the ordinary build already analyzes those sources. Disabled sync exports retain ordinary analysis.True, preserving the caller's policyrestore_non_go_settingsFalseThe restoration option requires
original_sdk_name,original_bootstrap_nogoand the consumer's restoration transitions. Stock upstream rules_go 0.59.0–0.65.0 does not implement that contract. The default path remains compatible with those versions; the opt-in fails analysis if the required settings are missing. This PR does not patch rules_go or change SDK registration. Both wrapper variants keep theddtest_gotest language.The README, configuration reference, Go onboarding skill and changelog explain when an opt-out is appropriate and which consumer patches remain necessary.
Validation:
x_defs, manifest-only runfiles, doctor and a received mock payload.git diff --checkpassed. Independent final audit found no remaining concrete defects.The local runs above used macOS ARM64. Ordinary CI at
61240b2anow passes all 34 checks, including native Linux/macOS/Windows and all seven supported rules_go versions in WORKSPACE and Bzlmod. The new nogo controls run at the range endpoints. RBE, differing host/exec platforms and cryptographic FIPS execution have not been verified here. No performance gain is claimed.Stacked on #305 so the diff contains only the SDK/nogo changes. Consumer E2E #193 pins this commit and exercises the public options in the existing native jobs.