fix(bazel): remove host-go dep from compact GC test; drop frozen shard blocks (#7478)

* fix(bazel): remove host-go dep from compact GC test; drop frozen shard blocks

Replace the ungated `go build` in compact_gc_target_test.go's dolt-stand-in
fixture with a Bazel-built go_binary (cmd/bd:compact_gc_fixture) wired via
rlocationpath env + data, mirroring the existing preflight_go_fixture
pattern. Falls back to `go build` only when not running under Bazel
(bazeltest.IsBazel()). Also gate test_repo_beads_guard_test.go's `go env
GOCACHE`/`GOMODCACHE` probes on !bazeltest.IsBazel(), since they previously
ran unconditionally in every cmd/bd TestMain.

Separately, delete the legacy 20-shard embedded-cmd and 15-shard
proxied-cmd "frozen" manifest blocks in .github/scripts/*-test-shards.txt:
their only consumers were pr-risk.yml fork/push jobs that have since
migrated to bazel.yml. Update gen_embedded_cmd_shard_manifest.py and
gen_proxied_shard_manifest.py to drop the frozen-block rendering/guard
logic and default to the live Bazel-only shard counts (100 and 34),
and refresh stale comments/docs (cmd/bd/BUILD.bazel,
scripts/shard_manifest_test.go, engdocs/TESTING.md,
engdocs/CI_REQUIRED_CHECK_TOPOLOGY.md) that still described the deleted
blocks. Verified no other BUILD/.github/scripts references read them.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* build(bazel): auto-sync BUILD files

Applied from the bazel-sync-patch artifact of https://github.com/gastownhall/beads/actions/runs/38069936930
(`make bazel-sync`: gazelle, tools/bazel/go_srcs.py, bazel mod tidy).
Only BUILD.bazel, MODULE.bazel and MODULE.bazel.lock are ever pushed; see
scripts/bazel-autofix-push.sh.

* fix(bazel): gate remaining host-go calls; fix shard-manifest --weights footgun

Address PR #7478 review findings (bee-ghosttrack):

- scripts/ci/lib/test-env.sh: skip the GOCACHE/GOMODCACHE `go env` probes
  when TEST_SRCDIR is set, so scripts/test.sh's beads_test_env_enter never
  shells out to a bare `go` when reached from a Bazel-run go_test (e.g.
  //scripts:shell_scripts_test's TestTestScriptPrebuiltTestBinaryContract),
  where a farm masks host go/dolt to exit 127. Nothing on that path needs a
  cache directory.
- scripts/ci/fmt-check.sh: describe_gofmt() no longer calls a PATH `go`
  under Bazel. It now resolves BEADS_TEST_GO (the hermetic SDK go already
  wired into scripts/prlintmake:prlintmake_test's env) via TEST_SRCDIR, and
  skips the version-reporting arm entirely when that isn't set (e.g.
  scripts/repochecks:fmt_test), rather than ever touching a possibly-masked
  PATH `go`.
- Verified with a PATH stub (go/dolt scripts that log and exit 127) via
  `bazel --nohome_rc test --config=prcore //scripts/... //cmd/bd:bd_test
  --test_env=PATH=<stubdir>:/usr/bin:/bin:/usr/local/bin`: 26/26 targets
  pass, zero stub invocations logged.
- gen_proxied_shard_manifest.py / gen_embedded_cmd_shard_manifest.py:
  default --weights to duration now that the manifests' only remaining
  blocks are duration-packed (the legacy inits-packed blocks were deleted
  alongside the PR Risk fork/push jobs that read them). Previously the bare
  `--write` default (inits) silently clobbered the live block's duration
  header and repacked with the wrong cost model; --check couldn't see it.
  Added TestProxiedShardManifestBareWriteIsIdempotent and
  TestEmbeddedCmdShardManifestBareWriteIsIdempotent to pin a bare --write
  as a no-op against the committed files.
- cmd/bd/compact_gc_target_test.go: resolve the non-Bazel fallback fixture
  path from this file's own directory (runtime.Caller) instead of the test
  binary's working directory.
- Refresh stale comments in .github/workflows/bazel.yml,
  scripts/shard_manifest_test.go, scripts/pr_risk_bazel_coverage_test.go,
  and scripts/embedded_shard_count_test.go that still described the deleted
  legacy 20/15-shard blocks and their retired fork/push jobs in the present
  tense.
- Confirmed cmd/bd/BUILD.bazel's compact_gc_fixture go_binary (implicit
  pure/race defaults) still passes TestRunCompactDoltTargetsOnlyAuthorizedActiveDatabase
  under `bazel test //cmd/bd:bd_test`.

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

---------

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
Julian Knutsen 2026-10-10 19:24:21 +00:00 • committed by GitHub
commit 3e7705a2cd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 382 additions and 634 deletions

View file

@ -1,161 +1,3 @@
# Embedded cmd test shard manifest.
#
# Format: <total_shards> <shard_number> <top_level_test_name>
#
# There is no committed recent duration artifact for these tests. This manifest
# pins a conservative even split for the 20-shard CI matrix while
# embedded-test-shard.sh continues to hash-distribute newly-added tests that are
# not listed here.
20 1 TestEmbeddedBackup
20 2 TestEmbeddedBackupConcurrent
20 3 TestEmbeddedBlocked
20 4 TestEmbeddedBlockedConcurrent
20 6 TestEmbeddedBootstrapConcurrent
20 7 TestEmbeddedBranch
20 8 TestEmbeddedBranchConcurrent
20 10 TestEmbeddedChildrenConcurrent
20 11 TestEmbeddedCloseGuardsAndEpics
20 12 TestEmbeddedCloseConcurrent
20 13 TestEmbeddedComments
20 14 TestEmbeddedCommentsCLI
20 15 TestEmbeddedCommentsCLIConcurrent
20 16 TestEmbeddedCompact
20 17 TestEmbeddedCompactConcurrent
20 18 TestEmbeddedConfig
20 19 TestEmbeddedConfigConcurrent
20 20 TestEmbeddedConfigNoWorkspaceStoreFreeCommands
20 1 TestEmbeddedConfigValidateJSONNoWorkspaceWritesStdout
20 2 TestEmbeddedContext
20 3 TestEmbeddedContextConcurrent
20 5 TestEmbeddedCount
20 6 TestEmbeddedCountConcurrent
20 7 TestEmbeddedCreateScalarAndRelationships
20 7 TestEmbeddedCreateGraphAndBulk
20 8 TestEmbeddedCreateCommitPending
20 9 TestEmbeddedCreateConcurrent
20 10 TestEmbeddedCreateCrossRepo
20 11 TestEmbeddedCreateCrossRepoUninit
20 12 TestEmbeddedCreateCrossRepoWithParent
20 13 TestEmbeddedCreateWithGitRemote
20 14 TestEmbeddedDefer
20 15 TestEmbeddedDeferConcurrent
20 18 TestEmbeddedDepConcurrent
20 19 TestEmbeddedDiff
20 20 TestEmbeddedDiffConcurrent
20 1 TestEmbeddedDoltBlockedAndCommit
20 1 TestEmbeddedDoltRemoteAndPush
20 2 TestEmbeddedDoltConcurrent
20 3 TestEmbeddedDuplicate
20 4 TestEmbeddedDuplicateConcurrent
20 6 TestEmbeddedDuplicatesConcurrent
20 7 TestEmbeddedEpicStatus
20 7 TestEmbeddedEpicCloseEligibleReasonFlag
20 7 TestEmbeddedEpicCloseEligibleReasonOutput
20 8 TestEmbeddedEpicConcurrent
20 9 TestEmbeddedExportFormats
20 9 TestEmbeddedExportFlags
20 10 TestEmbeddedExportConcurrent
20 11 TestEmbeddedFederationPeers
20 11 TestEmbeddedFederationStatus
20 12 TestEmbeddedFederationConcurrent
20 13 TestEmbeddedFindDuplicates
20 14 TestEmbeddedFindDuplicatesConcurrent
20 15 TestEmbeddedFlatten
20 16 TestEmbeddedFlattenConcurrent
20 18 TestEmbeddedGCConcurrent
20 20 TestEmbeddedGateConcurrent
20 2 TestEmbeddedGetDependencies
20 3 TestEmbeddedGraph
20 4 TestEmbeddedGraphConcurrent
20 5 TestEmbeddedHistory
20 6 TestEmbeddedHistoryConcurrent
20 7 TestEmbeddedHooks
20 8 TestEmbeddedHooksConcurrent
20 10 TestEmbeddedHumanConcurrent
20 11 TestEmbeddedImportFromSources
20 11 TestEmbeddedImportUpsertAndPrefixSync
20 12 TestEmbeddedImportConcurrent
20 13 TestEmbeddedInfo
20 14 TestEmbeddedInfoConcurrent
20 15 TestEmbeddedInitC
20 16 TestEmbeddedInitConcurrent
20 17 TestEmbeddedKV
20 18 TestEmbeddedKVConcurrent
20 19 TestEmbeddedLabelPropagateRename
20 20 TestEmbeddedLabelConcurrent
20 1 TestEmbeddedLint
20 2 TestEmbeddedLintConcurrent
20 4 TestEmbeddedListConcurrent
20 13 TestEmbeddedMaxRowsListBasic
20 13 TestEmbeddedMaxRowsListLimitInteraction
20 11 TestEmbeddedMaxRowsDepTreeAndDuplicates
20 12 TestEmbeddedMaxRowsDoctorAndConfig
20 14 TestEmbeddedMaxRowsGraph
20 15 TestEmbeddedMaxRowsReady
20 16 TestEmbeddedMaxRowsReadyMerge
20 5 TestEmbeddedMemory
20 6 TestEmbeddedMemoryConcurrent
20 7 TestEmbeddedMigrate
20 8 TestEmbeddedMigrateConcurrent
20 9 TestEmbeddedOnboard
20 10 TestEmbeddedOnboardConcurrent
20 11 TestEmbeddedOrphans
20 12 TestEmbeddedOrphansConcurrent
20 13 TestEmbeddedPrime
20 14 TestEmbeddedPrimeConcurrent
20 15 TestEmbeddedPromote
20 16 TestEmbeddedPromoteCLI
20 17 TestEmbeddedPromoteCLIConcurrent
20 18 TestEmbeddedPruneSafetyAndScope
20 18 TestEmbeddedPruneDryRunAndFilters
20 19 TestEmbeddedPurgeBasics
20 19 TestEmbeddedPurgeFiltered
20 20 TestEmbeddedPurgeConcurrent
20 1 TestEmbeddedQuery
20 2 TestEmbeddedQueryConcurrent
20 3 TestEmbeddedQuick
20 4 TestEmbeddedQuickConcurrent
20 5 TestEmbeddedQuickstart
20 6 TestEmbeddedQuickstartConcurrent
20 8 TestEmbeddedReadyConcurrent
20 9 TestEmbeddedRenamePrefixBasic
20 9 TestEmbeddedRenamePrefixEdgeCases
20 10 TestEmbeddedRenamePrefixConcurrent
20 11 TestEmbeddedReopen
20 12 TestEmbeddedReopenConcurrent
20 13 TestEmbeddedRestore
20 14 TestEmbeddedRestoreConcurrent
20 16 TestEmbeddedSearchConcurrent
20 17 TestEmbeddedSetup
20 18 TestEmbeddedSetupConcurrent
20 19 TestEmbeddedShip
20 20 TestEmbeddedShipConcurrent
20 1 TestEmbeddedShowBasicsAndJSON
20 2 TestEmbeddedShowConcurrent
20 3 TestEmbeddedStale
20 4 TestEmbeddedStaleConcurrent
20 5 TestEmbeddedState
20 6 TestEmbeddedStateConcurrent
20 7 TestEmbeddedStatus
20 8 TestEmbeddedStatusConcurrent
20 9 TestEmbeddedSupersede
20 10 TestEmbeddedSupersedeConcurrent
20 12 TestEmbeddedSwarmConcurrent
20 13 TestEmbeddedTodo
20 14 TestEmbeddedTodoConcurrent
20 15 TestEmbeddedTypes
20 16 TestEmbeddedTypesConcurrent
20 17 TestEmbeddedUndefer
20 18 TestEmbeddedUndeferConcurrent
20 20 TestEmbeddedUpdateConcurrent
20 1 TestEmbeddedVCStatusAndCommit
20 1 TestEmbeddedVCCommitVariantsAndMerge
20 2 TestEmbeddedVCConcurrent
20 3 TestEmbeddedVersion
20 4 TestEmbeddedVersionConcurrent
20 5 TestEmbeddedWhere
20 6 TestEmbeddedWhereConcurrent
# Embedded-Dolt cmd/bd test shard manifest.
#
# Format: <total_shards> <shard_number> <top_level_test_name>

View file

@ -1,235 +1,3 @@
# Proxied-server cmd test shard manifest.
#
# Format: <total_shards> <shard_number> <top_level_test_name>
#
# 15-shard split, bin-packed longest-processing-time-first by
# estimated cost (bd-init count; per-init migration chains dominate), as of
# the test set that existed when this block was last generated.
# Regenerating it (scripts/ci/gen_proxied_shard_manifest.py 15 --write) is
# deliberately NOT part of normal maintenance: this block is frozen for
# pr-risk.yml's/main.yml's legacy fork/push jobs (see engdocs/TESTING.md),
# so every TestProxiedServer*/TestServerMode* function added since it was
# last generated hash-distributes via proxied-test-shard.sh (cksum(name) %
# total) instead of being explicitly listed here. Only reweight it on
# purpose, and expect the shard assignments below to change substantially
# if you do (a fresh run packs every currently-discovered test, not just
# the ones already listed here).
#
# Deliberate exception (Oct 2026): four tests that had been hash-placed
# onto the two shards closest to the 15m -test.timeout are pinned here
# by hand, onto shards whose measured CI job time was lowest; nothing
# that was already listed moved. TestProxiedServerStorageClass and
# TestProxiedServerServeRefusesAStaleCheckpointWithGone (discovered
# from #7129 on) had hashed onto shard 5, which then hit the timeout on
# most Main runs; pinning them returns shard 5 to its earlier test set.
# TestProxiedServerListComments and
# TestProxiedServerServeRefusesAStreamOnADisabledJournal had hashed
# onto shard 3, which runs within about a minute of the timeout. An
# incremental --write keeps pinned lines where they are; a pin is a
# reviewed choice, not a regeneration of this block.
#
# TestProxiedServerOutageReconnectAcceptanceMatrix is pinned to shard 1
# (the lightest in recent Main runs, ~6.5 min) instead of hashing onto
# shard 14, which already runs ~13.5 min of the 15m timeout. These jobs
# have no socat, so today it skips here; the pin keeps shard 14 safe if
# socat is ever installed.
#
# TestProxiedServerClose3 (shard 13) and TestProxiedServerClose4 (shard 2)
# are the two parents gastownhall/beads#7173 split off TestProxiedServerClose
# to pull shard 5 (15m+) back under the timeout, pinned onto the two
# lightest shards of that PR's own run other than shard 5 itself (6m51s
# and 7m57s; shard 5 ran 5m50s only because their 12 subtests had just
# left it, and putting Close3 back would recreate most of the set that
# timed out) rather than hashed; the lines are listed under their shards
# like every other pin.
#
# This file is generated: notes added here are erased by the next
# regeneration. Add them to the generator instead. Known blind spots
# of the cost proxy (it counts inits, not the work done per init):
#
# TestProxiedServerListSortRetiresTheWalk is the most expensive
# entry and one of the cheapest-looking: off a single init it seeds
# 1400 rows and walks the listing three ways. It is the measurement
# behind the claim that sort=priority retires the client-side walk,
# so it has to run on PRs.
#
# TestProxiedServerServeReadParity is the CLI/HTTP read parity
# oracle, the behavioural half of the anti-drift claim. It being in
# this lane, and this lane being required by the PR Risk CI gate,
# is what makes that claim enforced on PRs rather than asserted in
# a doc comment.
15 1 TestProxiedServerBlocked
15 1 TestProxiedServerCompactDolt
15 1 TestProxiedServerCreate
15 1 TestProxiedServerDep2
15 1 TestProxiedServerDepConcurrent
15 1 TestProxiedServerListSortRetiresTheWalk
15 1 TestProxiedServerMolLastActivity
15 1 TestProxiedServerOutageReconnectAcceptanceMatrix
15 1 TestProxiedServerReopenConcurrent
15 1 TestProxiedServerServeReadParity
15 1 TestProxiedServerServeRefusesAStreamOnADisabledJournal
15 1 TestProxiedServerUpdateConcurrentClaim
15 2 TestProxiedServerClose4
15 2 TestProxiedServerCompactHistory
15 2 TestProxiedServerCreate2
15 2 TestProxiedServerDepListSingleIDWarnsOnDroppedExternalEdge
15 2 TestProxiedServerFindDuplicates
15 2 TestProxiedServerListWatchCountsTheOffsetIntoMaxRows
15 2 TestProxiedServerReady2
15 2 TestProxiedServerSQL
15 2 TestProxiedServerServeReadRevision
15 2 TestProxiedServerUpdateConcurrentMetadata
15 2 TestProxiedServerUpdateIfGuards
15 3 TestProxiedServerCascadeParity
15 3 TestProxiedServerDoltLifecycle
15 3 TestProxiedServerMolBurn
15 3 TestProxiedServerMolStale
15 3 TestProxiedServerMoleculeFrontDoorDirectServerProxyParity
15 3 TestProxiedServerSQLDatabaseFlag
15 3 TestProxiedServerServeRelatedIssues
15 3 TestProxiedServerTag
15 3 TestProxiedServerUpdate
15 3 TestProxiedServerWispCreateRejectsEnumViolatingVar
15 4 TestProxiedServerCreateInfraTypeRoutesToWisps
15 4 TestProxiedServerEdit
15 4 TestProxiedServerListComments
15 4 TestProxiedServerMoleculeFrontDoorWriteParity
15 4 TestProxiedServerPour
15 4 TestProxiedServerReassignFence
15 4 TestProxiedServerServeAddComment
15 4 TestProxiedServerServeRelease
15 4 TestProxiedServerUpdate2
15 4 TestProxiedServerUpdateHooks
15 5 TestProxiedServerClose
15 5 TestProxiedServerConfigConcurrent
15 5 TestProxiedServerExport
15 5 TestProxiedServerGateLifecycle
15 5 TestProxiedServerMolReadyGated
15 5 TestProxiedServerMultiStatementSQL
15 5 TestProxiedServerServeAddDependencies
15 5 TestProxiedServerServeRemoveDependency
15 5 TestProxiedServerWispCreate
15 6 TestProxiedServerClose2
15 6 TestProxiedServerContext
15 6 TestProxiedServerExternalCreate
15 6 TestProxiedServerLink
15 6 TestProxiedServerNote
15 6 TestProxiedServerRelate
15 6 TestProxiedServerServeBatchClose
15 6 TestProxiedServerServeSettingsWrites
15 6 TestProxiedServerWispList
15 7 TestProxiedServerAssign
15 7 TestProxiedServerBackupRefusedOnExternalTopology
15 7 TestProxiedServerCount
15 7 TestProxiedServerGC
15 7 TestProxiedServerList
15 7 TestProxiedServerOrphans
15 7 TestProxiedServerReady
15 7 TestProxiedServerServeClaim
15 7 TestProxiedServerServeRefusesAStaleCheckpointWithGone
15 7 TestProxiedServerServeUpdate
15 7 TestProxiedServerState
15 8 TestProxiedServerBatchParity
15 8 TestProxiedServerCountIncludeInfra
15 8 TestProxiedServerDoltRemoteRemove
15 8 TestProxiedServerGateCreateInheritsRepoMetadata
15 8 TestProxiedServerLabel
15 8 TestProxiedServerMolBond
15 8 TestProxiedServerPathHelpers
15 8 TestProxiedServerRecomputeBlocked
15 8 TestProxiedServerServeClaimNext
15 8 TestProxiedServerSetState
15 9 TestProxiedServerChildren
15 9 TestProxiedServerComment
15 9 TestProxiedServerDeferAutoWake
15 9 TestProxiedServerGateFrontDoorDirectServerProxyParity
15 9 TestProxiedServerMemory
15 9 TestProxiedServerPing
15 9 TestProxiedServerPrune
15 9 TestProxiedServerReopen
15 9 TestProxiedServerServeClose
15 9 TestProxiedServerStale
15 10 TestProxiedServerCleanDatabases
15 10 TestProxiedServerDeferUndefer
15 10 TestProxiedServerDuplicates
15 10 TestProxiedServerGraph
15 10 TestProxiedServerPourRejectsEnumViolatingVar
15 10 TestProxiedServerSearch
15 10 TestProxiedServerServeCount
15 10 TestProxiedServerShow
15 10 TestProxiedServerStatuses
15 10 TestProxiedServerUpdateWisp
15 11 TestProxiedServerDelete
15 11 TestProxiedServerDep
15 11 TestProxiedServerGateCheck
15 11 TestProxiedServerGateList
15 11 TestProxiedServerHeartbeat
15 11 TestProxiedServerMolProgress
15 11 TestProxiedServerPriority
15 11 TestProxiedServerPromote
15 11 TestProxiedServerServeCreate
15 11 TestProxiedServerSwarm
15 12 TestProxiedServerDeleteBlockedJSONSingleDoc
15 12 TestProxiedServerHistory
15 12 TestProxiedServerKV
15 12 TestProxiedServerMolShow
15 12 TestProxiedServerQuery
15 12 TestProxiedServerQuick
15 12 TestProxiedServerServeDelete
15 12 TestProxiedServerShow2
15 12 TestProxiedServerTypes
15 12 TestProxiedServerUpdateClosePolicy
15 13 TestProxiedServerClose3
15 13 TestProxiedServerDeleteConcurrent
15 13 TestProxiedServerInfo
15 13 TestProxiedServerMolSquash
15 13 TestProxiedServerReadyClaimConcurrent
15 13 TestProxiedServerReadyWisp
15 13 TestProxiedServerServeEdgeCounts
15 13 TestProxiedServerShow3
15 13 TestProxiedServerStatus
15 13 TestProxiedServerUnclaim
15 13 TestProxiedServerWispGC
15 14 TestProxiedServerCleanDatabasesPurgeDropped
15 14 TestProxiedServerConfig
15 14 TestProxiedServerConfigSetMany
15 14 TestProxiedServerDeleteForceOrphans
15 14 TestProxiedServerImport
15 14 TestProxiedServerInitIfMissing
15 14 TestProxiedServerMolDistill
15 14 TestProxiedServerPrime
15 14 TestProxiedServerReadyConcurrent
15 14 TestProxiedServerServeLifecycle
15 14 TestProxiedServerStorageClass
15 14 TestProxiedServerUnclaimIfAssigneeParity
15 15 TestProxiedServerCloseConcurrent
15 15 TestProxiedServerDeleteWisp
15 15 TestProxiedServerEpic
15 15 TestProxiedServerHuman
15 15 TestProxiedServerLint
15 15 TestProxiedServerMolCurrent
15 15 TestProxiedServerReclaim
15 15 TestProxiedServerServeModeGate
15 15 TestProxiedServerTodo
15 15 TestProxiedServerUpdate3
15 15 TestProxiedServerUpdateConcurrentAppendNotes
# Proxied-server cmd test shard manifest.
#
# Format: <total_shards> <shard_number> <top_level_test_name>