Skip to content

test(bazel): add module-vs-package version-parity guard (TIN-2668)#17

Merged
Jess Sullivan (Jesssullivan) merged 1 commit into
mainfrom
test/tin-2668-version-parity-guard
Jul 9, 2026
Merged

test(bazel): add module-vs-package version-parity guard (TIN-2668)#17
Jess Sullivan (Jesssullivan) merged 1 commit into
mainfrom
test/tin-2668-version-parity-guard

Conversation

@Jesssullivan

Copy link
Copy Markdown
Collaborator

Problem

TIN-2668: recurrence prevention. tinyland-auth PR #21 found and fixed a
version-authority skew between MODULE.bazel, the npm_package() target
in BUILD.bazel, and package.json, then added a guard test so the class
of bug cannot recur. fingerprint, otel, and auth-pg currently match
their tags but had no equivalent guard.

Current state (verified before writing the guard)

  • MODULE.bazel module() version: 0.2.4
  • BUILD.bazel npm_package() version: 0.2.4
  • package.json version: 0.2.4

All three already agree; no skew found, no version values changed.

Fix

Add src/__tests__/package-authority.test.ts (this repo's tests live
under src/tests, per vitest.config.ts's include pattern; no
existing package/release-authority test to extend). It extracts the
version from the module() block of MODULE.bazel and the npm_package()
target of BUILD.bazel and asserts both the packaged version and
package.json match the module SSOT, mirroring tinyland-auth PR #21's
guard shape.

Validation (offline, no remote cache required)

  • pnpm test: 3 files / 41 tests pass, 2 files / 5 tests skipped (the
    testcontainers-backed Postgres smoke tests, which skip automatically
    with no Docker/Podman runtime available) — new guard included in the
    passing set.
  • Guard proven to catch skew: with BUILD.bazel version mutated to
    9.9.9, the assertion fails as intended (reverted before commit).
  • pnpm typecheck: clean.

Port the version-parity guard from tinyland-auth PR #21 as recurrence
prevention. MODULE.bazel (0.2.4), the npm_package() target in
BUILD.bazel (0.2.4), and package.json (0.2.4) already agree, but
nothing asserted that. Extracts the version from the module() block
of MODULE.bazel and the npm_package() target of BUILD.bazel and
asserts both it and package.json match the module SSOT.

Guard proven to catch skew: with BUILD.bazel version mutated to
9.9.9, the assertion fails as intended.
@Jesssullivan Jess Sullivan (Jesssullivan) merged commit 3e6c090 into main Jul 9, 2026
4 checks passed
@Jesssullivan Jess Sullivan (Jesssullivan) deleted the test/tin-2668-version-parity-guard branch July 9, 2026 01:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant