refactor(build-infra): adopt fleet-canonical release-checksums variant split#123
Merged
John-David Dalton (jdalton) merged 1 commit intomainfrom May 3, 2026
Merged
Conversation
…t split Replaces the single-file packages/build-infra/lib/release-checksums.mts with the fleet-canonical variant layout from SocketDev/socket-repo-template (PR #5): - lib/release-checksums/core.mts — format primitives + embedded loader + verify (was the bulk of the old file). - lib/release-checksums/producer.mts — write checksums.txt, bump release-assets.json (new shared producer surface). - release-assets.schema.json — JSON Schema for release-assets.json. btm is the **producer archetype**: it generates GH release artifacts and ships checksums.txt; consumers (socket-addon, socket-cli) verify against the embedded SHAs btm publishes here. Accordingly btm now ships core + producer (no consumer.mts — btm doesn't *consume* sibling releases). Importer migrations (5 files): - packages/bin-infra/lib/build-stubs.mts - packages/curl-builder/scripts/build.mts - packages/libpq-builder/scripts/build.mts - packages/lief-builder/scripts/build.mts - packages/build-infra/scripts/update-checksums.mts All five now import from `build-infra/lib/release-checksums/core` (or `../lib/release-checksums/core.mts` for the relative-path one). release-assets.json `$schema` field switches from the freeform description string to the actual schema path (`./release-assets.schema.json`). update-checksums.mts canonical-output block updated to match so running it doesn't revert the change. The producer.mts surface (writeChecksumsFile, hashDirectory, updateReleaseAssets) is **available** but not yet adopted by update-checksums.mts. Refactoring update-checksums.mts to consume the new helpers is a follow-up — current behavior is preserved. Verified: - pnpm install - pnpm run check --all (lint + tsgo + path-hygiene + 8 other btm checks all green) - pnpm --filter build-infra run test (249 tests passing)
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.
Summary
Cascades btm to the fleet-canonical `release-checksums/` variant layout adopted in `SocketDev/socket-repo-template#5`.
Old single-file `packages/build-infra/lib/release-checksums.mts` becomes:
btm is the producer archetype — it generates GH release artifacts and ships `checksums.txt`. Consumers (socket-addon, socket-cli) verify against the embedded SHAs btm publishes here. So btm now ships core + producer; no `consumer.mts` (btm doesn't consume sibling releases).
Importer migrations (5 files)
All updated from `build-infra/lib/release-checksums` to `build-infra/lib/release-checksums/core`:
Schema reference
`release-assets.json`'s `$schema` field switches from the freeform description string to the actual schema path (`./release-assets.schema.json`). The hardcoded canonical-output block in `update-checksums.mts` is updated to match so re-running the script doesn't revert.
Not done in this PR
The new `producer.mts` surface (`writeChecksumsFile`, `hashDirectory`, `updateReleaseAssets`) is available but not yet adopted by `update-checksums.mts`. Refactoring it to consume those helpers is a follow-up — current behavior preserved here.
Verification
After this lands, sync-scaffolding against btm should report zero `optional_drift` for the release-checksums files.