beads/tools/bazel
Julian Knutsen 8caa7899a8 ci(bazel): add CI analytics extraction to all lanes (S3)
tools/bazel/ci_analytics_extract.py turns a lane's BEP file, compact
execution log and JSON profile into a redacted ci-analytics-summary
(timing, per-mnemonic cache classes, cold actions, test results,
repo-fetch time): only validated labels, mnemonics, enums and numbers
leave the runner, never an endpoint, cert/key path, env value, token
or hostname. Every lane's "CI analytics summary" step runs the
extractor and uploads its output as ci-analytics-<lane>-<run_attempt>
(7-day retention); CHECK_RUN_ID uses the real job.check_run_id
context (requires actionlint >= 1.7.8), and both the summary and
upload steps are continue-on-error, the summary capped at
timeout-minutes: 3, and both gated on !cancelled() (not always(),
which also runs after a workflow cancellation).

The extractor, its 62-case unittest file, and testdata/ci_analytics/
(the real/* Bazel 9.2.0 fixtures, poisoned-bep.json, mismatch.bep.jsonl
and regen.sh) are vendored byte-identical from gascity's
ci/analytics-extractor slice (final squashed commit
00161373bc7bbfcef8d6a05ac5ce70409fc7f2ac), which is canonical for this
pair the same way tools/rbe/cache-zstd-probe.sh is a byte copy.
Fixtures are regenerated under env -i with every BEP field stripped
unless it's on an explicit allowlist, and the compact exec log is
committed decompressed (*.binpb) rather than as a zstd frame, so
nothing opaque reaches version control.

scripts/ci_analytics_extract_test.go is the thin Go wrapper:
TestCIAnalyticsExtractorIsPinnedToGascity pins both vendored files'
sha256 so local drift is caught, and TestCIAnalyticsExtractUnitTests
runs gascity's unittest file in place. scripts/ci_analytics_workflow_test.go's
TestCIAnalyticsStepsAreSafeAndBounded mirrors gascity's pin test,
adapted to beads' 8 separately-named lane jobs: continue-on-error,
timeout-minutes bounds, no raw ${{ }} expression in run:, !cancelled()
required in if:, correct per-lane upload artifact name/path, and
CHECK_RUN_ID == ${{ job.check_run_id }}, for every lane.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-07 08:58:37 +00:00
..
testdata/ci_analytics ci(bazel): add CI analytics extraction to all lanes (S3) 2026-10-07 08:58:37 +00:00
bd_releases.bzl ci(bazel): run the differential regression suite under Bazel; retire regression.yml (#7324) 2026-10-07 01:41:12 +00:00
BUILD.bazel ci(bazel): retire the docker A/B variants and pr.yml's container jobs (#7340) 2026-10-07 04:13:24 +00:00
check_shard_coverage.py ci: retire PR Risk's legacy proxied and server-Dolt tiers where the gated Bazel lanes run them (D2 step 2) (#7094) 2026-10-02 02:20:30 -07:00
check_testcases.py ci(bazel): run pr.yml's repository guards as Bazel tests (#7329) 2026-10-07 00:59:18 +00:00
ci_analytics_extract.py ci(bazel): add CI analytics extraction to all lanes (S3) 2026-10-07 08:58:37 +00:00
ci_analytics_extract_test.py ci(bazel): add CI analytics extraction to all lanes (S3) 2026-10-07 08:58:37 +00:00
critpath.py ci(bazel): advisory Bazel workflow + go test/Bazel equivalence check (#6881) 2026-09-27 23:05:21 -07:00
dolt.bzl ci(bazel): run the historical-upgrade corpus under Bazel; retire migration-test.yml (#7330) 2026-10-07 02:16:11 +00:00
dolt_version_test.sh test(bazel): run every Bazel test against a hermetic, pinned dolt CLI (#6853) 2026-09-27 14:29:49 -07:00
equivalence.py ci(bazel): nogo replaces go vet and golangci-lint (ga-96smfk.18) (#7341) 2026-10-07 05:17:22 +00:00
equivalence_allowlist.txt ci(bazel): run the scripts and source-walking tests remotely; retire their go test legs (#7320) 2026-10-06 22:20:16 +00:00
go_module_proxy.bzl ci(bazel): run the historical-upgrade corpus under Bazel; retire migration-test.yml (#7330) 2026-10-07 02:16:11 +00:00
go_srcs.py ci(bazel): nogo replaces go vet and golangci-lint (ga-96smfk.18) (#7341) 2026-10-07 05:17:22 +00:00
go_test_manifest_shard.sh ci(bazel): server-Dolt storage and proxied tiers on remote execution (#6940) 2026-09-28 23:01:40 -07:00
go_test_offline.sh ci(bazel): run the managed-local proxied lifecycle lane under Bazel; retire proxied-local-smoke.yml (#7326) 2026-10-07 00:59:14 +00:00
go_test_variant.sh test(bazel): fully green //..., tag taxonomy + docker lane, sharding, test sandbox ceiling (#6871) 2026-09-27 20:19:38 -07:00
race.bzl ci(bazel): retire the docker A/B variants and pr.yml's container jobs (#7340) 2026-10-07 04:13:24 +00:00
release_cross.bzl ci(bazel): cross-compile every release target with Bazel, retire the go build job (#7332) 2026-10-07 03:18:37 +00:00
repo_subset.bzl ci(bazel): run pr.yml's repository guards as Bazel tests (#7329) 2026-10-07 00:59:18 +00:00
shard_budget.py ci: warn-only shard-balance budget for bazel-server-storage (#7339) 2026-10-07 04:05:33 +00:00
shard_budget_test.py ci: warn-only shard-balance budget for bazel-server-storage (#7339) 2026-10-07 04:05:33 +00:00
test_env.sh ci(bazel): server-Dolt storage and proxied tiers on remote execution (#6940) 2026-09-28 23:01:40 -07:00