beads/internal/httpapi/spec/BUILD.bazel
Julian Knutsen b1fe68e63a
ci(bazel): run pr.yml's repository guards as Bazel tests (#7329)
fast-checks, PR Policy, and the Linux leg of check-doc-freshness-platforms
ran repository guards on GitHub runners. They now run as Bazel tests in
bazel.yml's `test` lane (remote, cached), each over only the files it reads:

- tools/bazel/repo_subset.bzl picks a narrow, path-selected slice of
  //:repo_files at analysis time. scripts/repochecks/run_check.sh copies that
  slice into a throwaway git checkout and runs the unchanged guard there.
- //scripts/repochecks: build_tags, workflow_tags, go_install_guidance,
  winget_portable_alias, migration_hygiene (checks A and B),
  fmt (registered SDK gofmt), doc_freshness, workapi_frontend_boundary,
  types_gen_drift (`make api-check` drift, oapi-codegen from go.mod).
- //scripts:doc_freshness_required_test (integration lane, -required-suite)
  and //scripts/gitattributespolicy:gitattributespolicy_required_host_test
  cover the Linux doc-freshness leg.
- check-versions stays covered by //internal/versioncheck:versioncheck_test.
  check-testing-short stays covered by //scripts:scripts_test.

pr-policy-wrapper is deleted. fast-checks keeps only the two checks that
need the PR base: migration hygiene's delta half (MIGRATION_HYGIENE_SCOPE=
delta) and the .beads diff. check-doc-flags stays, because it builds bd from
the pinned release tag. The example Go modules leave .bazelignore so gofmt
and the grep guards see them. check_testcases.py now accepts --not-go
//pkg:all.

Refs: ga-96smfk.20

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-07 00:59:18 +00:00

46 lines
1.3 KiB
Python

load("@rules_go//go:def.bzl", "go_library")
go_library(
name = "spec",
srcs = ["embed.go"],
embedsrcs = ["openapi.v0.yaml"],
importpath = "github.com/steveyegge/beads/internal/httpapi/spec",
visibility = ["//:__subpackages__"],
)
# //internal/httpclient/encode:encode_test's bijection gate reads the wire
# contract's published parameter set. It reads it through spec.OpenAPIV0()
# (the go:embed above), not a relative os.ReadFile path, so no `data`
# dependency on this file is actually needed for that one read -- this export
# stays as defense in depth for any other reader of the raw YAML that package
# gains. //scripts/repochecks:types_gen_drift_test regenerates the wire
# types from it.
exports_files(
["openapi.v0.yaml"],
visibility = [
"//internal/httpclient/encode:__pkg__",
"//scripts/repochecks:__pkg__",
],
)
# --- begin repo_files (managed by tools/bazel/go_srcs.py; run `make bazel-sync`) ---
filegroup(
name = "repo_files",
srcs = glob(
["**"],
exclude = [
"**/*.db",
"**/*.exe",
"**/*.out",
"**/*.prof",
"**/*.pyc",
"**/*.test",
"**/__pycache__/**",
"**/node_modules/**",
],
),
visibility = ["//:__pkg__"],
)
# --- end repo_files ---