beads/cmd/bd/testdata
Julian Knutsen 3e7705a2cd
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>
2026-10-10 19:24:21 +00:00
..
auto_export.txt fix(init): make JSONL auto-export opt-in (#4063) 2026-05-21 16:21:00 -07:00
blocked.txt
close.txt
close_errors.txt
comments.txt
compact-gc-fixture.go fix(bazel): remove host-go dep from compact GC test; drop frozen shard blocks (#7478) 2026-10-10 19:24:21 +00:00
config.txt
create.txt
create_errors.txt
delete.txt
delete_errors.txt
dep_add.txt
dep_errors.txt
dep_remove.txt
dep_tree.txt
events_journal_records.jsonl fix(events): journal delete and cascade dep_remove rows carry the request actor; notice when reading a disabled journal (#5985) (#6061) 2026-08-29 04:14:23 -07:00
export.txt fix: remove nonexistent -i flag from bd import references (#3200) 2026-04-11 12:31:38 -07:00
formula_help.txt fix(docs-tooling): harden the CLI-docs pipeline per PR #4722 review 2026-07-12 11:07:12 -07:00
help.txt
import.txt fix: remove nonexistent -i flag from bd import references (#3200) 2026-04-11 12:31:38 -07:00
init.txt
label.txt
lint.txt
list.txt
preflight-go.go fix(preflight): share checkout lint authority (#5780) 2026-09-30 22:41:55 -07:00
prime_content.txt
quickstart.txt
ready.txt
search.txt
show.txt
show_errors.txt
stats.txt
update.txt
update_errors.txt fix(update): exit nonzero when a multi-ID update partially fails (#4726) 2026-07-18 19:34:20 -07:00
version.txt