beads/scripts/ci
Julian Knutsen aaae7e6aff
ci: package gates start after rbe, MCP pytest -n 8, gate jobs on Blacksmith (F3) (#7126)
* ci(bazel): move package-mcp/package-npm gates into bazel.yml (F3)

Package gates now build bd via Bazel (no --config=ci) when the rbe job
enables it and fall back to go build otherwise, so forks/Dependabot/rbe-off
runs are unaffected. pr.yml's CI Gate keeps PACKAGE_MCP/PACKAGE_NPM required
and never-skippable, now sourced from needs.bazel.outputs.*; the retired
detect-package-gates/package-mcp/package-npm pr.yml jobs and
DETECT_PACKAGE_GATES are deleted. MCP pytest pins -n 8 explicitly with
pytest-xdist locked via uv lock. rbe, bazel-coverage, and both required gate
jobs move to Blacksmith for same-repo PRs (gate names unchanged).

Also closes a gap in detect-package-gates.sh (missing bazel.yml in the
force-both-gates path list, since the job definitions moved there) and wires
integrations/beads-mcp's manifest/lock into scripts_test's Bazel data so the
new pytest-xdist pin check runs under `bazel test` too.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* fix(bazel): review fix-up for F3 package gates (SF-1, SF-2, nits)

Review of 65f378d241 (~/beads-bazel-plan/f3/review.md, no blockers) found:

- SF-1: the package gates' `bazel build //cmd/bd:bd_for_tests` resolved to
  a different output configuration (k8-fastbuild) than `bazel test
  --config=ci`'s bd_for_tests (k8-fastbuild-ST-..., via test:ci ->
  test:prcore's --@rules_go//go/config:race), so it got no action-cache
  reuse from the test job. Add the matching race flag to both jobs' build
  step; verified with cquery that both invocations now cquery to the
  identical bazel-out/k8-fastbuild-ST-.../bin/cmd/bd/bd_for_tests/bd path,
  and with a real build that it's an action-cache hit once bazel test
  --config=ci has run. Update the pinned Run string in
  pr_lanes_bazel_coverage_test.go and the impl report's cache-reuse claim.
- SF-2: drop stale comments/doc text saying the package gates download
  bazel-ci-build-artifacts; they build their own bd now (bazel.yml,
  pr.yml, engdocs/CI_REQUIRED_CHECK_TOPOLOGY.md).

Nits: pin both required gates' display names in TestSameRepoBlacksmithRunners
(nothing else reads job.Name, so a rename would otherwise go uncaught); pin
the package jobs' Python/uv/Node setup against main.yml's copies; add
timeout-minutes to both gate jobs and detect-ci-tier (same-repo PRs now run
on paid Blacksmith minutes, not a free runner's 360-minute default); shut
down Bazel and remove the RBE client key right after each package job
packages its Bazel-built bd (nothing downstream needs either); add
scripts/ci/package-bazel-bd.sh to detect-package-gates.sh's both-gates
trigger arm and pin it in TestDetectPackageGatesCoversBazelWorkflow.

Every fix mutation-tested (mutate -> test fails with a specific message ->
restore from a /tmp backup, diff-confirmed identical -> test passes again).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

---------

Co-authored-by: Gas City Adopt-PR <adopt-pr@gascity.local>
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-03 00:03:43 -07:00
..
go-list-test-names Add PR CI wrapper command surface (#4211) 2026-05-29 18:52:53 -07:00
lib test(bazel): runfiles helpers + declared inputs for scan-guard tests (#6828) 2026-09-27 08:24:08 -07:00
allowlisted-go-tests.sh ci: retire pr.yml's legacy PR Core, build, pure-Go, domain+uow and contract jobs where the gated Bazel lanes run them (D2 step 3) (#7097) 2026-10-02 06:08:52 -07:00
bazel-sync-patch.sh ci: auto-push Bazel BUILD sync fixes to PRs; harden docs autofix (#6907) 2026-09-28 17:23:27 -07:00
complexity.sh ci: add advisory cyclomatic complexity reporting (#6081) 2026-08-30 19:05:17 -07:00
detect-package-gates.sh ci: package gates start after rbe, MCP pytest -n 8, gate jobs on Blacksmith (F3) (#7126) 2026-10-03 00:03:43 -07:00
fmt-check.sh fix(ci): resolve gofmt from go.mod's toolchain, not PATH (be-gx8) (#6294) 2026-09-30 18:38:46 -07:00
gen_proxied_shard_manifest.py fix(dolt): server-mode bd ready never wakes expired defers (re-proposes #6082) (#6424) 2026-09-30 15:53:22 -07:00
go-test-shard-names.sh Add PR CI wrapper command surface (#4211) 2026-05-29 18:52:53 -07:00
go-test-shard-packages.sh Add PR CI wrapper command surface (#4211) 2026-05-29 18:52:53 -07:00
go-test-vet.sh ci: retire pr.yml's legacy PR Core, build, pure-Go, domain+uow and contract jobs where the gated Bazel lanes run them (D2 step 3) (#7097) 2026-10-02 06:08:52 -07:00
gofmt-bin.sh fix(ci): resolve gofmt from go.mod's toolchain, not PATH (be-gx8) (#6294) 2026-09-30 18:38:46 -07:00
install-dolt.sh test(bazel): run every Bazel test against a hermetic, pinned dolt CLI (#6853) 2026-09-27 14:29:49 -07:00
package-bazel-bd.sh ci: package gates start after rbe, MCP pytest -n 8, gate jobs on Blacksmith (F3) (#7126) 2026-10-03 00:03:43 -07:00
package-mcp.sh ci: package gates start after rbe, MCP pytest -n 8, gate jobs on Blacksmith (F3) (#7126) 2026-10-03 00:03:43 -07:00
package-npm.sh Add PR CI wrapper command surface (#4211) 2026-05-29 18:52:53 -07:00
pr-core.sh ci(bazel): advisory Bazel workflow + go test/Bazel equivalence check (#6881) 2026-09-27 23:05:21 -07:00
pr-lint.sh fix(preflight): share checkout lint authority (#5780) 2026-09-30 22:41:55 -07:00
pr-policy.sh fix(ci): require direct workflow build tags (#5679) 2026-10-01 01:24:03 -07:00
pull-dolt-image.sh ci: retry Dolt image pulls (bd-m0o1z) (#5228) 2026-08-01 08:18:41 -07:00
scripts-go-test.sh ci: retire pr.yml's legacy PR Core, build, pure-Go, domain+uow and contract jobs where the gated Bazel lanes run them (D2 step 3) (#7097) 2026-10-02 06:08:52 -07:00
test-init-gateway-credential.sh test(init): port gateway credential fixtures onto shared credentialcmd (#7056) 2026-10-01 08:03:19 -07:00
test-user-config-diagnostic.sh fix(config): identify native config environment in path errors (#6325) 2026-09-28 12:17:20 -07:00
test-windows-env-helpers.sh fix(gitenv): retain explicit null config suppression (#6461) 2026-09-27 15:59:08 -07:00