beads/cmd/bd/protocol
Julian Knutsen 3d76cbd4e9
ci(bazel): dolt-server lane on remote execution (replaces the docker lane) (#6898)
* test(bazel): dolt-server lane for the storage domain + uow job

--config=doltserver runs pr.yml's "Test (storage domain + uow)" job as
remote-executable Bazel tests: each dolt-server target runs an existing
go_test binary with BEADS_TEST_DOLT_SERVER=local, so every Dolt server
is a `dolt sql-server` child of the test process, started from the
pinned dolt the test wrapper already ships. No docker, no
no-remote-exec, and BEADS_TEST_REQUIRE_DOLT_CONTAINER=1 fails a target
whose server cannot start, so cached results are trustworthy.

- db_dolt_test, uow_dolt_test (8 shards), tracker_dolt_test,
  fix_dolt_test (4 shards, BEADS_FIX_REQUIRE_DOLT=1); GOMAXPROCS=4 like
  the job's runner.
- no -short twins of domain, domain/fs, domain/git and
  tracker/conformance, so the lane alone runs every package of the job.
- tag `dolt-server` in the taxonomy; test:prcore (and so test:ci)
  excludes it. The requires-docker variants stay as the A/B control.

Remote (default instance, --nocache_test_results): 9/9 PASS in 113 s
wall; longest shard 111 s (uow). Per-test statuses, subtests included,
equal the job's go test -json on the same tree: 0 differences.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* test(bazel): contract corpus on the dolt-server lane

protocol_dolt_test runs protocol_test as pr.yml's "Contract corpus" job
does (non-race via protocol_race_off, BEADS_PROTOCOL_REQUIRE_DOLT=1) with
the local dolt sql-server backend, in 8 shards, so the corpus golden,
determinism and conformance tests run on remote workers and cannot skip.

Remote: 8 shards, longest 53 s. 153 tests (151 PASS / 2 SKIP, subtests
included) equal the job's go test -json: 0 differences.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* ci(bazel): run the dolt-server lane in place of the docker lane

bazel.yml's container-lane job becomes bazel-doltserver: `bazel test
//... --config=doltserver`, whose targets start their own dolt
sql-servers and so execute on the remote workers (locally for forks and
rbe=off) instead of against the runner's docker daemon. The docker lane
stays reachable as the A/B control: workflow_dispatch dolt-lane=docker
runs --config=docker in the same job, with the image pull that only it
needs. Still advisory; runner, rbe-west gate and secret handling are
unchanged. Policy test and TESTING.md follow.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* fix(bazel): reap processes left in a test's private root on exit

A Bazel test timeout signals the test's process group, which misses the
detached bd db-proxy-child processes (Setsid) and the dolt sql-servers they
start. A proxy that died without its idle timeout left its server orphaned on
a persistent remote worker. test_env.sh's EXIT trap now kills every process of
the current user whose command line names the action's private mktemp root
(pkill -f, two passes; a /proc scan when pkill is absent) before removing it.
The root is unique per action and never in the wrapper's own argv; cleanup
still cannot change the test's exit status.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* test(bazel): fail closed on every dolt-server target, checked per rule

The no-short twins (domain, domain/fs, domain/git, tracker/conformance) now
pin BEADS_TEST_DOLT_SERVER=local and BEADS_TEST_REQUIRE_DOLT_CONTAINER=1 like
the lane's other targets, so a Dolt-server test added to those packages fails
instead of skipping into a cached pass.

TestBazelDoltJobMirrorsContainerJobs checked the env with a file-wide
substring search, so a docker variant in the same BUILD file covered for a
dolt-server target that lost it. It now parses each rule tagged dolt-server
and requires both variables, BEADS_FIX_REQUIRE_DOLT on fix_dolt_test,
BEADS_PROTOCOL_REQUIRE_DOLT on protocol_dolt_test, and no no-remote-exec.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Gas City Adopt-PR <adopt-pr@gascity.local>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-28 05:17:36 -07:00
..
testdata/corpus Merge release/1.3.0 into main (post-tag forward-port) 2026-09-15 22:09:13 +00:00
assignee_test.go test(protocol): pin data-model + ready-front production-scar clauses (wy-nzybu) 2026-07-13 09:46:16 -07:00
blocked_status_test.go feat(test): parallelize protocol tests for 3x speedup (bd-dgp) 2026-02-27 20:04:00 -08:00
blocked_test.go feat(test): parallelize protocol tests for 3x speedup (bd-dgp) 2026-02-27 20:04:00 -08:00
blocking_semantics_test.go feat(test): parallelize protocol tests for 3x speedup (bd-dgp) 2026-02-27 20:04:00 -08:00
BUILD.bazel ci(bazel): dolt-server lane on remote execution (replaces the docker lane) (#6898) 2026-09-28 05:17:36 -07:00
canonicalize_test.go test(protocol): make corpus determinism pure (bd-qq1qn) (#5281) 2026-08-02 07:14:30 -07:00
CATALOG.md Merge remote-tracking branch 'upstream/main' into pr-4232-fix 2026-07-13 20:43:10 -07:00
child_id_test.go test(protocol): pin data-model + ready-front production-scar clauses (wy-nzybu) 2026-07-13 09:46:16 -07:00
children_test.go fix(cli): implement children pretty and defer reason 2026-06-13 21:22:38 -07:00
close_guard_test.go feat(test): parallelize protocol tests for 3x speedup (bd-dgp) 2026-02-27 20:04:00 -08:00
comments_test.go feat(test): parallelize protocol tests for 3x speedup (bd-dgp) 2026-02-27 20:04:00 -08:00
corpus.go fix(contracts): JSON contract fixes before 1.3.0 freezes them — string revision tokens, --set-metadata scalar typing, create --json nano timestamps (#6053) 2026-08-29 05:20:27 +00:00
corpus_test.go test(protocol): make corpus determinism pure (bd-qq1qn) (#5281) 2026-08-02 07:14:30 -07:00
defer_test.go fix(cli): implement children pretty and defer reason 2026-06-13 21:22:38 -07:00
dep_identity_test.go test(protocol): pin data-model + ready-front production-scar clauses (wy-nzybu) 2026-07-13 09:46:16 -07:00
errors_contract_test.go test(protocol): pin §E/§M/§V conformance clauses at the CLI level (wy-ge2h8) 2026-07-13 10:30:24 -07:00
exit_codes_init_test.go test(protocol): pin §E/§M/§V conformance clauses at the CLI level (wy-ge2h8) 2026-07-13 10:30:24 -07:00
exit_codes_test.go Beads #6648: report partial batch-close failure (#6740) 2026-09-26 13:55:44 -07:00
helpers_test.go test(testutil): opt-in local dolt sql-server backend for Dolt-backed tests (#6891) 2026-09-28 04:06:49 -07:00
input_validation_test.go feat(test): parallelize protocol tests for 3x speedup (bd-dgp) 2026-02-27 20:04:00 -08:00
interchange_test.go test(protocol): pin the §J interchange clauses; fix the bd import header gap (wy-ltox1) 2026-07-13 11:20:06 -07:00
json_contract_test.go fix(show): flag comment_count as omitted when comments are not streamed (#4865) 2026-07-25 16:16:41 -07:00
lease_claim_test.go test: fix red main — init-cancel E2E deadline + reclaim JSON assertion (#5039) 2026-07-25 10:10:18 -07:00
lifecycle_test.go feat(test): parallelize protocol tests for 3x speedup (bd-dgp) 2026-02-27 20:04:00 -08:00
memory_contract_test.go test(protocol): pin §E/§M/§V conformance clauses at the CLI level (wy-ge2h8) 2026-07-13 10:30:24 -07:00
preservation_test.go test(protocol): realign show --json contract tests with count-only payload (wy-017ry) 2026-07-13 10:08:34 -07:00
ready_front_test.go test: make ready ordering setup deterministic (bd-y9cjq) (#5238) 2026-08-01 09:55:11 -07:00
roundtrip_test.go test(protocol): realign show --json contract tests with count-only payload (wy-017ry) 2026-07-13 10:08:34 -07:00
stale_test.go feat(test): parallelize protocol tests for 3x speedup (bd-dgp) 2026-02-27 20:04:00 -08:00
status_validation_test.go feat(test): parallelize protocol tests for 3x speedup (bd-dgp) 2026-02-27 20:04:00 -08:00
versioning_contract_test.go test(protocol): pin §E/§M/§V conformance clauses at the CLI level (wy-ge2h8) 2026-07-13 10:30:24 -07:00
wp4_helpers_test.go test(protocol): pin §E/§M/§V conformance clauses at the CLI level (wy-ge2h8) 2026-07-13 10:30:24 -07:00