Release mechanics: per-build mangle-seed header, Starlark hash ports, leaner archive - #253
Merged
Merged
Conversation
The checked-in mangle-seed fallback carried a version-derived constant, so every version bump made it stale and broke hash_mangle_seed_default_test (the CI failure on release PRs, e.g. #252). Generate the header per build and stop committing it: remove internal/hash_mangle_seed.h.in and the diff test; hash_mangle.h includes the generated header directly and #errors when it is missing (clangd falls back to a stable constant under -DIS_CLANGD). A version bump no longer needs a committed regeneration, and the --//mbo/hash:mangle_seed* flags are unaffected. Also switch the version/seed fold from FNV-1a to the in-house dumbo hash (SMHasher3-proven) and add Starlark ports of dumbo and fnv1a in //mbo/hash:hash.bzl (public hash struct), kept byte-for-byte identical to the C++ prime implementation and verified against it by hash_bzl_vs_cpp_dumbo_test and hash_bzl_vs_cpp_fnv1a_test via the new //mbo/hash:hash_tool CLI. README and CHANGELOG updated. Verified: bumping 0.13.1 -> 0.13.3 rotates the generated constant and all hash tests pass; reverting restores it and all tests pass. Also condensed the 0.13.0 CHANGELOG entries to the terse, verb-first house style (presentation only; released content unchanged).
Add .trunk, .gitattributes, .gitignore (and mbo/hash/measurements) to the release_prep.sh EXCLUDES so the released tarball carries only what a consumer needs to build the library. Kept bazelmod (useful to copy for other libs), .clang-format (mope formats generated output with it), the other lint/format configs, and compile_commands-update.sh (a courtesy for consumers).
It never gated (continue-on-error), ran only on main when mbo/hash changed, did no baseline comparison, and produced noisy shared-runner artifacts nothing consumed. Reliable, comparable numbers now come from the out-of-band mbo/hash/measurements bundles. The hash_benchmark binary stays for those and for manual runs; only the CI job and its done-gate wiring are removed.
Policy is the last three majors (7, 8, 9). 9.1.1 already covers major 9, so the extra 9.0.x rung (9.0.2) was redundant; dropping it removes 4 matrix jobs. Kept 7.2.1 (the earliest working 7.x floor) and 8.7.0 (latest 8.x).
- test-clang now gates (continue-on-error: false) via the done job; the hermetic-clang coverage was informational-only before. - Reduced the clang LLVM ladder to oldest+newest (dropped 21.1.8) and dropped the fastbuild config. - Consolidated asan onto the newest clang on both OSes (dropped the redundant clang-20 asan); gcc-14 asan stays and runs early in test-gcc. - test-bcr runs the 7.x/8.x Bazel rungs on ubuntu only (platform-agnostic build-system compat); macOS keeps the default 9.1.1 for platform coverage. - test-gcc drops gcc-13 (still built at opt later by test-bcr's ubuntu+gcc). Net: 31 -> 21 test jobs, all gating.
The clang-ladder comment claimed 20.1.8 was the default pin; the pin is 22.1.8 (bazelmod/llvm.MODULE.bazel). Also align test-bcr's clang combos to that pinned default instead of 20.1.8.
22.1.8 is the default pin (not just a forward-looking rung); 21.1.8 matches macOS 26's native Apple clang 21 (a pairing that tracks Xcode). Also replaces the em-dashes with hyphens.
C++23 is used on recent compilers, so testing the cpp23 mode on the oldest clang (20.1.8) is low value; the oldest rung now just proves the minimum supported LLVM still builds (opt). Matches the asan 'newest-only' rule. test-clang 10 -> 8.
Fab-Cat
approved these changes
Jul 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes release structure, handling, and mechanics. Three related pieces:
1. Mangle-seed header: generate per build, stop committing it
Release version-bump PRs failed CI (e.g. #252). The mangle-seed constant is
version-derived, and the checked-in non-Bazel fallback
internal/hash_mangle_seed.h.inbaked that constant in, so every version bumpmade it stale and broke
hash_mangle_seed_default_test.The root cause was structural:
.h.inwas a pre-rendered copy of the header(the real template lived in the
.bzl), carried a version-derived value, and hadto be regenerated and re-committed on every bump.
Fix - generate the header per build and never commit it:
internal/hash_mangle_seed.h.inandhash_mangle_seed_default_test.hash_mangle.hnow includes the generatedhash_mangle_seed_gen.hdirectly; amissing one is a hard
#error(not a silent fallback). clangd falls back to astable constant under
-DIS_CLANGDpurely so the editor can parse thislow-level header.
--//mbo/hash:mangle_seed/--//mbo/hash:mangle_seed_bucketsflags areunaffected (the header is still generated per build).
2. dumbo/fnv1a in Starlark, verified against the C++ prime
dumbohash(SMHasher3-proven;
fnv1ais not).dumboandfnv1ain//mbo/hash:hash.bzl(publichashstruct), kept byte-for-byte identical to the C++ prime and verifiedagainst it by
hash_bzl_vs_cpp_dumbo_test/hash_bzl_vs_cpp_fnv1a_test.//mbo/hash:hash_tool, a minimal<algo> [<data>]hash CLI (plainGetHash64, no mangle) that doubles as the C++ reference for that verification.mbo/hash/README.md: added a Starlark column + a Starlark API snippet; theoverview table is now PASS/FAIL only (exact SMHasher3 scores stay in the
Results table).
3. Leaner release archive
release_prep.shnow drops dev-only files from the released tarball viaexport-ignore, so it carries only what a consumer needs to build the library:EXCLUDES:mbo/hash/measurements(dev/benchmark data, already.bazelignored),.trunk(linter orchestration),.gitattributes,.gitignore(git metadata, dead in a tarball).bazelmod(a useful template for downstream libs),.clang-format(mope formats its generated output with it), the otherlint/format configs, and
compile_commands-update.sh(a courtesy forconsumers).
4. Trimmed and tightened CI (31 -> 19 test jobs, all gating)
test-clanggating (wascontinue-on-error), so the hermetic-clangcoverage actually blocks via the
donegate.benchmarkjob - it never gated, did no baselinecomparison, and produced noisy shared-runner artifacts nothing consumed;
reliable numbers now come from the out-of-band
mbo/hash/measurementsbundles(the
hash_benchmarkbinary stays for those and manual runs).dropping the redundant
9.0.2); the 7.x/8.x rungs run on ubuntu only(build-system compat is platform-agnostic), macOS keeps the pinned default.
dropped the 21.1.8 middle rung and
fastbuild. asan and cpp23 run on thenewest rung only; the oldest (20.1.8) just proves the minimum LLVM still
builds (opt).
test-gcc) + clang-22 on both OSes;dropped the redundant clang-20 asan.
test-gccdrops gcc-13 (still built at opt later bytest-bcr'subuntu+gcc rungs).
Verification
bazel test //mbo/...(250 targets) and//mbo/hash/...(6 tests) pass.(
0x9F24EE18B4458070->0x79EC7046370E0C65) and all tests still pass;reverting to 0.13.1 restores the constant and tests pass. No committed file
changed, so the CI failure that motivated this cannot recur.
is presentation only - released content unchanged.