- pr.yml's Windows jobs and the macOS/Windows legs of pr-preflight-platforms
and check-doc-freshness-platforms run on Blacksmith for every PR and merge
group, forks and Dependabot included: no windows-latest/macos-latest
fallback (Blacksmith serves this org's fork PRs). Matrix legs name their
label (runs-on: ${{ matrix.runner }}); the same-repo "matrix marker"
ternary and its policy plumbing are gone.
- pr-preflight-platforms drops its Linux leg: its tests run under Bazel on
rbe-west (//scripts:scripts_test, //cmd/bd:bd_test,
//internal/config:config_test).
- The Linux-cross-compiled Windows path is retired: windows-test-binaries,
its two -prebuilt twins, main.yml's windows-test-binaries-cache, the
WINDOWS_PREBUILT_REQUIRED flag and the build script/manifest. The native
pair (test-windows-liveness, worktree-remove-windows) is the required run.
- main.yml's test-windows and blacksmith-macos-go-build-cache drop their
GitHub-hosted venue legs (no GitHub-hosted consumer left).
Gate names unchanged. ga-96smfk.22
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* chore(migration-test): extend the release catalog through v1.3.1
The catalog stopped at v1.1.2 (the v1.2 upgrade census). The migration
corpus already upgrades from v1.2.2, and the Bazel targets that replace
migration-test.yml and cross-version-smoke.yml take their pinned release
binaries from the catalog (@bd_releases), so it has to cover the releases
since. Regenerated with `catalog generate` after raising maximumVersion to
v1.3.1: five new stable versions (v1.2.0, v1.2.1, v1.2.2, v1.3.0, v1.3.1;
three with a linux/amd64 asset) and five new proxy prereleases; no existing
entry, drift record or repository-only exclusion changed. The count
constants and the identity digest are updated to match, and the README now
says how to add a release.
Refs: ga-96smfk.19
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* ci(bazel): run the historical-upgrade corpus under Bazel; retire migration-test.yml
migration-test.yml ran scripts/migration-test/run.sh --version <release> for
14 reviewed releases in 3 shards on GitHub runners: it downloaded each
release archive, built v0.9.1 from source with Go 1.25 through the module
proxy, installed libicu74 and the dolt 2.1.8 runtime, all over the network.
//tests/migration now has one target per corpus release
(historical_upgrade_<release>_test) plus legacy_bridge_test, all hermetic:
- Published releases come from @bd_releases (the release catalog's
sha256-verified assets) through a per-target directory
(HISTORICAL_RELEASE_DIR); lib/binary.sh uses it instead of downloading and
still checks each binary's self-reported version.
- v0.9.1 is //tests/migration:bd_source_tag, the same `go mod download` +
`go build -trimpath` with CGO and Go 1.25.0, run offline as a build
action: the module files come from tests/migration/source_tag_modules.json
through a file:// GOPROXY tree (tools/bazel/go_module_proxy.bzl), the
release's own zip is the catalog's source_zip, and go checks every
dependency against the release's go.sum (SOURCE_TAG_SQLITE_BIN).
- The external Dolt runtime is @dolt_test_runtime_linux_amd64 (dolt.bzl's
dolt_release gains a version attribute; 2.1.8 is pinned to versions.sh's
digest), passed as DOLT_BIN to the server-Dolt and wisp-plane releases.
- The workers already provide jq, python3, sqlite3 and libicu74.
The targets are untagged, so bazel-test runs them remotely on every PR,
merge group and push; result caching replaces the path filter. Every
release also passed inside a loopback-only network namespace.
scripts/migration_corpus_bazel_test.go keeps the BUILD lists equal to
versions.sh's corpus, the catalog digests equal to STRICT_RELEASE_SHA256,
the source-tag lock equal to the catalog's source_zip, and the Dolt runtime
pin equal to versions.sh's. migration-test.yml and the policy tests that
pinned its shards, caches, apt step and runner are removed.
Refs: ga-96smfk.19
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* ci(bazel): run the historical-upgrade targets in the PR-core lane only
The integration lane runs every untagged target too, and its
check_testcases.py requires Go testcases, which a shell test's test.xml does
not list. A new pr-core-only tag keeps //tests/migration out of
--config=integration (bazelIntegrationExcludedTags adds it), so the corpus
runs once, in bazel-test, against the release-shaped bd_for_tests (no
integration tag). build_source_tag.sh carries the build-tags opt-out: it
builds a historical release with that release's own go.mod, which predates
gms_pure_go.
Refs: ga-96smfk.19
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* ci(F4): advisory Linux-cross-built Windows test binaries, macOS cache restore
Side-by-side rollout slice of the PR CI -> 5 min plan (F4):
- Add pr.yml `windows-test-binaries`: a Linux job that cross-compiles
bd.exe and two go-test-c binaries (cgo and nocgo) for windows/amd64
via mingw (CC/CXX=x86_64-w64-mingw32-*, matching release.yml's
goreleaser setup), driven by a committed manifest
(scripts/ci/windows-test-binaries.txt) and build script
(scripts/ci/build-windows-test-binaries.sh). Artifacts are uploaded
and consumed by two new advisory "-prebuilt" twins
(test-windows-liveness-prebuilt, worktree-remove-windows-prebuilt)
that run the identical test selection/flags/env (including
BEADS_TEST_REPO_ROOT) against the prebuilt binaries via
scripts/ci/run-go-test-binary.sh and scripts/test.sh's new
BEADS_TEST_PREBUILT_TEST_BINARY short-circuit.
- The original native Windows jobs are untouched and remain required;
the new jobs are advisory only (not in CI_GATE_REQUIRED) for this
rollout phase. Flipping to the cross-built path later is a one-line
CI_GATE_REQUIRED change.
- Add main.yml `windows-test-binaries-cache`: seeds the Go build cache
for the cross-compile toolchain/packages on a schedule, mirroring
the existing module/build cache warmers; reorder build-artifacts'
warm-cache step to precede the module-cache save for a cleaner
build -> warm -> save grouping.
- Restore macOS's native build-cache save step in main.yml (lost
during an earlier job consolidation).
- Remove the non-required "Test (macos-latest)" full-suite job from
PRs; the native macOS gate jobs still run, so required coverage is
unaffected. This does drop a non-required pre-merge macOS race
signal; see docs/notes for the accepted tradeoff.
- Add scripts/windows_test_binaries_manifest_test.go: policy tests
pinning the manifest's three advisory-phase entries, pinning the
mingw toolchain to release.yml's, checking consumer jobs only
reference manifest-listed binaries, checking upload/download
artifact names and `needs` match, checking the prebuilt jobs select
exactly the same tests (-run literals) as their native counterparts,
and checking none of the new jobs reference secrets (fork safety).
All mutation-tested.
- Add two scripts/ci_workflow_apt_get_timeout_test.go budget entries
for the new "Install mingw cross-compiler" steps.
- Fix two latent Bazel-only scripts_test failures surfaced while
wiring the new test file into scripts/BUILD.bazel: materialize
cmd/bd's sources via the existing //cmd/bd:go_srcs filegroup so
sourceRepoRoot(t)-based package-directory checks work under Bazel's
runfiles root, and strip Bazel's own TEST_TIMEOUT env var before
exercising scripts/test.sh's hardcoded default in
test_script_test.go (name collision with test.sh's own override
knob).
Verified: go test ./scripts/...; bazel --nohome_rc test
//scripts:scripts_test; actionlint; shellcheck; make ci-pr-policy;
make bazel-sync-check; a from-scratch /tmp clone cross-build using
the exact job commands (cold 130.2s, warm/cache-hit 30.3s, PE32+
x86-64 validity via file/objdump, byte-identical SHA-256 across
cold/warm/traced runs); wine -test.list confirms
TestPrimeBinaryPortfolio/TestIsServerProbablyRunning* present in the
cgo binary and the full TestWorktreeRemove* family (including
Windows-specific variants) present in the nocgo binary.
Scoping note: only 2 of the spec's 4 consumer jobs (liveness,
worktree-remove) get prebuilt twins, and only 3 of 8 spec-listed
manifest binaries are built this slice; preflight, doc-freshness and
credential-fixture consumers are deferred as documented follow-up.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
* fix(ci): address F4 review findings (SF-1..SF-6 + nits)
Addresses the F4 review (~/beads-bazel-plan/f4/review.md): no blockers, six
substantive findings plus several nits.
- SF-1: main.yml's windows-test-binaries-cache job now seeds the Windows
cross-compile cache from both runner selections pr.yml's consumer job can
land on (Blacksmith for same-repo PRs/merge_group, ubuntu-latest for
forks/Dependabot) via a 2-leg matrix with identical keys/paths, instead of
a single ubuntu-latest leg Blacksmith runners can never see.
- SF-2: removed the two consumer-less "Warm non-race Go build cache
(test-only packages)" steps from main.yml (build-artifacts, test macOS
leg); they had no real consumer and cost ~270s on main's macOS leg for
nothing.
- SF-3: scripts/ci/run-go-test-binary.sh now injects the same
-test.timeout=10m default (when -timeout is omitted) and unconditional
-test.paniconexit0 flag `go test` itself injects; added
timeout-minutes to test-windows-liveness-prebuilt; added a direct
regression test (TestRunGoTestBinaryDefaultsTimeoutWhenOmitted) for the
omitted-timeout branch, which no path through scripts/test.sh can reach
(test.sh always supplies its own -timeout default first).
- SF-4: scripts/test.sh's BEADS_TEST_PREBUILT_TEST_BINARY branch now runs
run-go-test-binary.sh as a child process (capturing and re-exiting its
status) instead of `exec`-ing it, so the EXIT trap (beads_test_env_cleanup)
still runs and the per-run BEADS_TEST_ENV_ROOT temp dir (and, with
BEADS_TEST_SHARED_SERVER=1, the shared dolt sql-server) is cleaned up
instead of leaked/orphaned.
- SF-5: closed the five surviving mutations (cgo/nocgo swap between the
Windows prebuilt twins, dropped -count=1, an unguarded twin in
ci-gate.needs, a goreleaser compiler change, a PKGDIR change) with
dedicated policy tests, and replaced the three-edits-per-job required/
advisory toggle with a single committed WINDOWS_PREBUILT_REQUIRED flag
(pr.yml top-level env) in the style of the existing BAZEL_RETIRES_LEGACY_*
flags: both Windows pairs are now unconditionally in ci-gate.needs and
always evaluated, and only which pair lands in CI_GATE_REQUIRED vs.
CI_GATE_SKIPPED_OK is decided by the flag, in one place.
- SF-6: dropped the //cmd/bd:go_srcs data dep from scripts_test; the
prebuilt-binary contract test now exercises ./scripts/ci (already a data
dep of this target) instead of ./cmd/bd, since it never builds or runs the
real package.
- Nits: removed dangling ~/beads-bazel-plan references and a nonexistent
test name from committed comments; log the resolved mingw-w64 version
when cross-compiling; removed a no-op shellcheck disable comment;
documented why run-go-test-binary.sh's BEADS_TEST_REPO_ROOT re-export
doesn't race beads_test_env_enter's unset; rewrote the pr.yml tombstone
comment for the removed macOS PR job to state the actual, narrower
tradeoff instead of an overclaiming "main.yml covers this" statement.
Verified: bazel --nohome_rc test //scripts:scripts_test passes; actionlint
clean on pr.yml/main.yml; shellcheck clean on all edited scripts (only
pre-existing, unrelated warnings remain elsewhere); make bazel-sync-check
and make ci-pr-policy both pass.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
* fix(scripts): isolate prebuilt-binary contract test from ambient hermetic env
TestTestScriptPrebuiltTestBinaryContract's "cleans up BEADS_TEST_ENV_ROOT
after the binary exits" subtest (added for F4 review finding SF-4) passed
locally but failed in CI's scripts-go-checks/scripts-test leg.
scripts/ci/scripts-go-test.sh (the CI driver for this package's `go test
./scripts/...` run) calls beads_test_env_enter in its own shell before
invoking go test, so BEADS_TEST_ENV_ACTIVE=1 and an outer
BEADS_TEST_ENV_ROOT are already present in this test binary's own
os.Environ(). runTestScriptPrebuiltBinary built the scripts/test.sh
subprocess's env from os.Environ() (minus TEST_TIMEOUT), so that ambient
state leaked through. Inside the subprocess, scripts/test.sh's own
beads_test_env_enter call (test.sh:17) saw the already-active guard and
no-opped: no new root, no new EXIT trap armed in that process - so the
fake binary observed the outer, still-alive root, and the subtest's
"directory is gone after test.sh exits" assertion failed, even though the
SF-4 fix (run the prebuilt binary as a child instead of exec'ing it) is
correct.
Every real production caller of scripts/test.sh's prebuilt path (pr.yml's
Windows liveness/worktree-remove prebuilt steps) runs it as the first
command of a fresh GitHub Actions `run:` step, never nested under an
already-entered hermetic env, so this nesting is purely an artifact of
this test binary's own ambient environment under scripts-go-test.sh, not
a real CI behavior gap.
Strip BEADS_TEST_ENV_ACTIVE/_ROOT/_DISABLE/_KEEP (alongside the existing
TEST_TIMEOUT filter) from the child env in runTestScriptPrebuiltBinary so
the subtest deterministically exercises scripts/test.sh's real top-level,
non-nested invocation regardless of what ambient hermetic-env state this
test binary itself happens to be running under.
Verified: reproduced the CI failure locally by exporting
BEADS_TEST_ENV_ACTIVE=1/BEADS_TEST_ENV_ROOT before `go test ./scripts/...`;
confirmed the fix resolves it; re-ran bazel test //scripts:scripts_test
and scripts/ci/scripts-go-test.sh directly, both pass.
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>
* test(feat): red — Fix: unbounded apt-get in CI burns the whole 15m job timeout (migration-test.yml, release.yml) (refs be-na2q)
* fix(feat): green — Fix: unbounded apt-get in CI burns the whole 15m job timeout (migration-test.yml, release.yml) (refs be-na2q)
* fix(ci): make apt-get update retry exhaustion deliberate, not a silent fall-through
After three failed `apt-get update` attempts the loop simply ended and the
step went on to `apt-get install` against a stale index, with nothing in the
log saying the index was never refreshed. That contradicted the PR body's
claim that the step "fails fast with a clear error".
Proceeding best-effort is the right behavior -- the runner image's cached
index installs these packages far more often than not, and failing here would
turn a transient mirror outage into a red build -- so make it an explicit,
logged decision instead of a fall-through:
- track whether any attempt succeeded and emit
`:⚠️:apt-get update failed after 3 attempts; proceeding with
cached index` when none did
- drop "; retrying" from the per-attempt warning, which was wrong on the
final attempt
- skip the 10s backoff after the last attempt, where there is nothing left
to wait for
The workflow tests pin both new strings, so a revert to the silent
fall-through goes red.
* fix(ci): raise apt step timeout-minutes above the retry budget they backstop
The step-level caps were tighter than the inner `timeout` calls they were
meant to backstop, so they reproduced the mid-flight kill this hardening
exists to remove -- just at 6 and 8 minutes instead of 15:
migration-test.yml worst case 3x120s + 2x10s + 180s = 560s vs cap 360s
release.yml worst case 3x120s + 2x10s + 300s = 680s vs cap 480s
Raise them to 11m and 13m, each ~100s above its own worst case, and record
the arithmetic next to the value so the next edit re-derives it. 11m also
stays under the historical-upgrades job's own 15m budget, so a stuck step
fails as a step rather than cancelling the job with no apt-specific signal.
The goreleaser job sets no job-level timeout-minutes at all, which makes its
step cap the only bound on a stuck apt there.
The workflow tests now assert the relations instead of only pinning the
minute counts:
- step timeout-minutes must exceed the step's own worst-case budget,
computed from the attempt count, per-attempt timeout, backoff and
install timeout that the same table pins against the YAML
- it must stay below the job's timeout-minutes where the job sets one
Both read the value off the workflow rather than off the table's own
constant, so they stay honest if the YAML drifts.