* fix(bazel): one nogo-validating lane per race configuration (F5 S1)
The race configuration (--@rules_go//go/config:race) is built by five
lanes that duplicate the same RunNogo/ValidateNogo work: bazel-test
(--config=ci), bazel-embedded, bazel-doltserver, bazel-proxied, and
the advisory bazel-dolt-race shadow, plus the package-mcp/package-npm
gates' explicit race build. --norun_validations is a build-request
option, not a configuration flag (proven here by aquery: GoCompilePkg/
GoLink/RunNogo/ValidateNogo action keys are byte-identical with and
without it), so passing it on every lane but bazel-test removes the
duplicate work without touching a single action key or dropping any
lint coverage: bazel-test's --config=ci already validates every file
any of the others compiles.
scripts/nogo_lint_policy_test.go replaces the old blanket
"--norun_validations never appears in .bazelrc" check with
TestNogoConfigurationsHaveOneValidatingLane (T1: one owner per
configuration fingerprint), TestNogoOwnersAreRequired (T2: the owner
is a required CI Gate check whose `if:` covers every non-owner's),
TestNogoRaceOwnerBuildsEverything (T3: the owner builds //... whole,
no exclusions) and TestNoUnconditionalValidationOff (T5: nothing else
may disable validation). tools/bazel/nogo_ownership.py (make
nogo-ownership) is a dynamic, advisory aquery cross-check of the same
property, run on demand rather than from inside a Bazel action.
Verified locally: aquery shows identical action keys for the affected
lanes with/without --norun_validations; a planted printf-format vet
finding in internal/idgen/hash.go failed the owner build and passed
the non-owner build (then reverted, never committed);
scripts/bazel_dolt_race_shadow_test.go and the full //scripts suite
stay green.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
* fix(bazel): close S1 nogo-ownership review gaps (allowlist, owner pin, real aquery)
Addresses maintainer-city-c3's review of #7479:
1. T6 TestRunValidationsOnlyOnAllowlistedLines replaces the coverage gap
left when main's blanket run_validations ban was dropped: only the four
race-group non-owners' "test:<cfg> --norun_validations" lines in
.bazelrc, and the two package-gate bazel-build steps in bazel.yml, are
permitted. A later test:integration/doltserver-cmd --norun_validations
(out of T1's table, S2) now fails here instead of landing silently.
Verified by mutation: adding test:integration --norun_validations fails
the new test; reverting passes.
3. TestNogoRaceOwnerBuildsEverything (T3) now also pins that the race
owner's "bazel test //... --config=ci" step has no step-level if: or
continue-on-error, and that its job has none either. Verified by
mutation: adding if: ${{ always() }} to that step fails; reverting
passes.
2. tools/bazel/nogo_ownership.py's aquery comparison was querying the
identical mnemonic("RunNogo", //...) for the owner and every non-owner,
so `missing` could never be non-empty. It now derives each non-owner's
actual built target set the way --build_tests_only + --test_tag_filters
does: the deps closure of tests(//...) filtered to targets carrying one
of the lane's tags, read exactly from `query --output=xml` (not attr()'s
substring regex match, which would wrongly fold "dolt-server-proxied"
and "dolt-server-cmd" into a "dolt-server" filter). Confirmed against a
real (offline, --nohome_rc) bazel run: reports OK at head, and reports
100+ missing targets when the owner's query is artificially narrowed to
a subpackage -- it can now actually fail.
Also: refreshed a stale .bazelrc comment claiming nogo runs beside every
lane's compile, which S1 made untrue for race-group non-owners.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>