beads/scripts/ci
Julian Knutsen 8988340994
ci(embedded): run every BEADS_TEST_EMBEDDED_DOLT-gated cmd/bd test in the embedded lane (#7708)
* test(cmd/bd): repair the embedded-gated tests that rotted while no lane ran them

These tests skip unless BEADS_TEST_EMBEDDED_DOLT=1 but no CI lane selected
them, so they rotted unseen. Running them shows:

- TestEventsTailFollowReportsTruncationOnTheStream raced on a plain
  bytes.Buffer that os/exec's copy goroutine writes while the test polls it.
  Use the package's syncBuffer.
- TestCorruptMetadataDiagnosticsRunAndDataFailsLoud still asserted that
  doctor and init run on a corrupt metadata.json. #4857 deliberately made
  every workspace command refuse instead (pinned for doctor by
  TestDoctorRejectsCorruptMetadataBeforeSharedServerChecks). Rewrite it to
  the shipped contract as TestEmbeddedCorruptMetadataFailsLoudUntilRestored:
  version warns, doctor/list/init refuse naming the file without touching
  it, and restoring the file brings the data back.
- dolt_remote_origin_guard_embedded_test.go was tagged
  `embeddeddolt && cgo`, a tag no lane sets, so it never compiled in CI
  (gazelle left it out of bd_test srcs). Retag it `cgo`, as #4153 did for
  its dolt_local_only sibling, and add it to srcs. Drop its four bd doctor
  git-origin tests: bd doctor runs no checks on an embedded workspace
  (GH#3794), so two could never pass and two passed vacuously on empty
  output. Rename the surviving tests into the TestEmbedded* prefix.

Agent-Signature: claude-code-claude-opus-5-5-unknown-reasoning on behalf of Julian Knutsen
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* ci(embedded): run every BEADS_TEST_EMBEDDED_DOLT-gated cmd/bd test in the embedded lane

The embedded-Dolt cmd lane selected tests with
grep '^func TestEmbedded' cmd/bd/*_embedded_test.go, and only its two
Bazel targets set BEADS_TEST_EMBEDDED_DOLT. A test that skips without the
variable but missed the name prefix or the file suffix skipped in every
lane and reported green: 92 of them, including #7203's --if-revision CLI
coverage (TestIfRevisionMatchAndMismatch, TestReassignFenceCLI, ...).

- embedded-test-shard.sh and gen_embedded_cmd_shard_manifest.py select
  TestEmbedded* by name across cmd/bd/*_test.go, as proxied-test-shard.sh
  does, leaving authors one rule.
- Rename the gated tests into the TestEmbedded* prefix
  (TestDoctorEmbedded<X> -> TestEmbeddedDoctor<X>) and update every
  reference.
- Place the new names with gen_embedded_cmd_shard_manifest.py 100
  --weights=duration --write (incremental).
- Add TestEmbeddedGatedTestsRunInTheEmbeddedLane: it walks cmd/bd's tests
  for any that reach os.Getenv("BEADS_TEST_EMBEDDED_DOLT") != "1" and fails
  if a shard of the lane never lists one. The proxied guard's helpers now
  take the variable and the script; a fixture test pins the walk.

Agent-Signature: claude-code-claude-opus-5-5-unknown-reasoning on behalf of Julian Knutsen
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-19 22:02:22 +00:00
..
go-list-test-names Add PR CI wrapper command surface (#4211) 2026-05-29 18:52:53 -07:00
lib fix(bazel): remove host-go dep from compact GC test; drop frozen shard blocks (#7478) 2026-10-10 19:24:21 +00:00
_embedded_shard_manifest_lib.py ci(bazel): halve the embedded cmd tier's cost (seeded bd init schema, no race exit sleep, concurrency-aware packing) (#7437) 2026-10-09 19:20:33 +00:00
bazel-release-cross-compile.sh ci(bazel): nogo replaces go vet and golangci-lint (ga-96smfk.18) (#7341) 2026-10-07 05:17:22 +00: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: merge-queue readiness for the required gates; cache test results (fresh nightly) (#7264) 2026-10-05 13:54:15 -07:00
embedded_cmd_test_durations.json ci(bazel): split the slow embedded cmd tests and run the cmd block as 2x50 shards (#7438) 2026-10-09 20:30:52 +00:00
embedded_storage_test_durations.json ci(bazel): embedded storage tier to 40 shards; split its two slowest tests (#7440) 2026-10-09 21:21:20 +00:00
fmt-check.sh fix(bazel): remove host-go dep from compact GC test; drop frozen shard blocks (#7478) 2026-10-10 19:24:21 +00:00
gen_embedded_cmd_shard_manifest.py ci(embedded): run every BEADS_TEST_EMBEDDED_DOLT-gated cmd/bd test in the embedded lane (#7708) 2026-10-19 22:02:22 +00:00
gen_embedded_storage_shard_manifest.py ci(bazel): embedded storage tier to 40 shards; split its two slowest tests (#7440) 2026-10-09 21:21:20 +00:00
gen_proxied_shard_manifest.py fix(bazel): remove host-go dep from compact GC test; drop frozen shard blocks (#7478) 2026-10-10 19:24:21 +00: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
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: bigger runners for the slowest cached-run jobs (MCP gate 8 vCPU -n16, Bazel test 4 vCPU) (#7381) 2026-10-08 05:16:20 +00:00
package-npm.sh Add PR CI wrapper command surface (#4211) 2026-05-29 18:52:53 -07:00
pr-core.sh ci(bazel): retire main.yml's Linux jobs, nightly's go test jobs and ci-measurements (#7354) 2026-10-07 10:06:59 +00:00
pr-lint.sh ci(bazel): nogo replaces go vet and golangci-lint (ga-96smfk.18) (#7341) 2026-10-07 05:17:22 +00:00
proxied_test_durations.json ci(bazel): scope the proxied lane's shared-server projects to their own database (44 -> 34 shards) (#7436) 2026-10-09 18:22:08 +00:00
pull-dolt-image.sh ci: retry Dolt image pulls (bd-m0o1z) (#5228) 2026-08-01 08:18:41 -07:00
release-targets.txt ci(bazel): cross-compile every release target with Bazel, retire the go build job (#7332) 2026-10-07 03:18:37 +00:00
run-go-test-binary.sh ci(bazel): run every Windows/macOS job on Blacksmith; retire the Linux preflight leg and the cross-compiled Windows pair (#7355) 2026-10-07 10:41:14 +00:00
test-init-gateway-credential.sh ci(pr): share restored GOCACHE with the native init credential step (#7227) 2026-10-05 01:01:23 -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
warm-non-race-cache.sh ci(pr): cut the Windows PR preflight leg's fixed costs (slice W) (#7378) 2026-10-08 02:42:27 +00:00