beads/.github
Julian Knutsen 308fd38ca2
test(corpus): seed served/embedded sides concurrently; size served shards from CI timings (#7538)
* test(bazel): shard http_served_test and corpus_served_test (embedded lane critical path)

Both served targets ran as one shard each (235-597s) and were the embedded
lane's longest action in most executing runs; every other embedded shard
ends by ~90-155s.

- http_served_test runs through go_test_pinned_shard.sh like
  httpclient_served_test: the 19 TestE2E_* cases >= 3s are pinned onto 6
  shards (pin_shards.py from three lane runs' test.xml plus one local run,
  <= ~88 measured seconds each), the ~28 fast tests round-robin in a 7th.
- corpus_served_test: TestServedCorpus becomes TestServedCorpusPart1..4.
  Shapes are dealt round robin in corpus order; each part starts its own
  server and seeds its own pair of workspaces. The shapes are independent:
  every check is served-vs-embedded parity after the same commands, each
  write owns its target ids, and order preservation keeps each part's reads
  ahead of its writes. TestCorpusPartsDealEveryShapeOnce checks the deal
  (every shape once, in order, no empty part); the manifest pins part k to
  shard k, with a 5th round-robin shard for the engine-free tests, and
  scripts TestCorpusPartsArePinnedOnePerShard ties corpusParts, the
  manifest and shard_count together. BEADS_CORPUS_REPORT now accumulates
  every part the process ran.
- pinnedShardTargets and the retired-lane args pins list both targets;
  go_test_sources_test gets the two packages' manifests as data.

Embedded goes from 172 to 182 test actions; the dolt-race/dolt-int union
budgets do not include the embedded tag and are unchanged.

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

* test(corpus): seed the served and embedded sides concurrently in each part

Each TestServedCorpusPartN paid the server start and both seeds serially
(about 100-150s of a 190-220s shard in #7537's CI). The embedded side now
runs bd init and the seed on a goroutine while the test goroutine starts
the server and proxy and seeds the served side.

- prepareSide attaches one side (connect or init), writes its assets and
  runs the seed in order, returning failures as errors (execBD, runBD
  without the testing.T) so it is safe off the test goroutine; a failing
  side cancels the other, and a deferred cancel+Wait keeps the goroutine
  from outliving the test or its TempDirs.
- The sides share no directory, env or bd process; shapes, their order and
  every assertion are unchanged. Each part logs its setup time.
- bazel.yml's embedded lane uploads the served targets' test.xml on every
  run (bazel-embedded-served-testxml), so their pinned shards can be sized
  from a sharded run of the lane.

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

* test(bazel): corpus in 3 parts; re-pin http_served_test from a sharded CI run

Measured on this PR's first embedded-lane run (test.xml from the new
bazel-embedded-served-testxml artifact):

- corpus_served_test with concurrent seeding: parts 1-4 ran 135/140/144/114s,
  of which setup (part time minus its shapes) was 76/76/76/62s and the 127
  shapes 242s together. The setup floor is still ~70s+, so corpusParts goes
  from 4 to 3 (round robin; the measured split is 85/81/76s of shapes) and
  the manifest and shard_count follow (4 shards: 3 parts + round-robin).
- http_served_test: #7537's pins were sized from single-shard runs, and the
  sharded shards ran 73-184s against ~88s estimated. served_pinned_shards.txt
  is regenerated with pin_shards.py from that sharded run's per-test
  durations: 119/118/120/128/132/123 measured seconds per pinned shard.

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

* test(bazel): pin http_served_test on the max over two sharded CI runs

The second run of the lane on this PR ran the same tests at 0.2-1x their
first-run times (executor load, not the tests), and its re-pinned shards
came out 36-118s against 118-132s estimated. pin_shards.py now takes each
test's maximum over both runs' test.xml, the same rule the other pinned
targets use: 123-135 measured seconds per pinned shard.

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

* test(corpus): guard part wiring; seed metadata on e2e-t-ifa (review of #7537)

- testServedCorpus fails (before the engine gate, so in every lane) unless
  the test's name is TestServedCorpusPart<part>: a TestServedCorpusPart3
  calling testServedCorpus(t, 2) would run part 2 twice and silently drop
  part 3's shapes. TestCorpusPartNameMustMatchItsPart covers the check and
  that servedCorpusParts lists Part1..N in order. Mutation (Part3 -> 2)
  fails //backend/http/corpus:corpus_test with "TestServedCorpusPart3 runs
  corpus part 2; only TestServedCorpusPart2 may".
- e2e-t-ifa is seeded with metadata seeded=keep. The parts seed separately,
  so the two refused (exit 13) conditional updates no longer always follow
  gc-update-if-assignment's k=v; their verify show again holds that a
  refusal keeps existing metadata. Mutation (served verify output's
  seeded=keep rewritten) fails both stale shapes at
  $[0].metadata.seeded.

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

* test(bazel): back to 4 corpus parts (served long pole over test-seconds)

maintainer-city-c3's call on the measured trade-off. With concurrent
seeding, 4 parts ran 114-146s each (run A) and 3 parts ran 170-180s (run D).
3 parts save one ~75s setup, about 75 test-seconds per executing run, but
the longest part is the embedded lane's served long pole. That pole is on
the gate's critical path (forks' above all), and 4 parts cut it by ~34s.

corpusParts=4, TestServedCorpusPart4, manifest part 4 on shard 4,
shard_count=5. The part-name guard is unchanged and covers Part4.

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

* ci(bazel): served-timings upload is telemetry; corpus part bounds and ctx

Review of #7538 (maintainer-city-c3):
- "Upload served test timings" gets continue-on-error: true and
  timeout-minutes: 2, like the CI analytics upload. An artifact-service 5xx
  or stall no longer fails the required embedded lane or holds it until the
  job timeout. TestBazelWorkflowSecretsAndFailureSurface allows that
  continue-on-error only on this exact step
  (bazelServedTimingsContinueOnErrorPath, which also pins its name,
  artifact, path and timeout; TestBazelEmbeddedServedTimingsUploadIsTelemetry).
- corpusPartNameErr also refuses a part outside 1..corpusParts, so a stray
  TestServedCorpusPart5 fails instead of running no shapes. Two new cases.
- expand takes ctx: prepareSide's {rev:} lookups run under the seeding
  context, so a cancel stops them as well.

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-13 12:30:52 +00:00
..
actions/setup-bazel ci(bazel): mode-cache readers use the remote repo contents cache via rbe-cache (#7476) 2026-10-10 17:42:12 +00:00
images Prepare for public launch: comprehensive examples, docs, and tooling 2025-10-12 11:25:29 -07:00
ISSUE_TEMPLATE docs(contributing): recommend issues when they add context instead of requiring one per PR (#7323) 2026-10-06 23:29:09 +00:00
pages-redirect docs: redirect legacy GitHub Pages site to Mintlify (#4759) 2026-07-13 14:19:13 -07:00
scripts ci(bazel): dolt-int gates server-storage + cmd-dolt in mode remote (item 5 A2) (#7535) 2026-10-13 09:17:54 +00:00
workflows test(corpus): seed served/embedded sides concurrently; size served shards from CI timings (#7538) 2026-10-13 12:30:52 +00:00
allowed-actions.json ci: pin the Actions allow-list for the selected-and-SHA-pinned policy (R3) (#7175) 2026-10-04 01:03:40 -07:00
bazel-farm-allowlist.txt ci(bazel): fork PRs execute on rbe-west's fork pool (fork-ro/fork-rw), cache fallback (#7136) 2026-10-03 12:10:14 -07:00
CODEOWNERS chore: purge deleted docs-pipeline references from release tooling, CI, and repo plumbing 2026-07-12 11:07:26 -07:00
copilot-instructions.md docs(agents): contributor-only agent instructions and documented-issue intake (#7223) 2026-10-05 08:43:53 +00:00
dependabot.yml ci(dependabot): group version bumps per ecosystem (#5038) 2026-07-25 16:06:16 -07:00
PULL_REQUEST_TEMPLATE.md docs(bazel): make bazel test the primary build and test path (ga-96smfk.23) (#7348) 2026-10-07 07:46:02 +00:00