Skip to content

refactor(build-infra): adopt fleet-canonical release-checksums variant split#123

Merged
John-David Dalton (jdalton) merged 1 commit intomainfrom
release-checksums-cascade
May 3, 2026
Merged

refactor(build-infra): adopt fleet-canonical release-checksums variant split#123
John-David Dalton (jdalton) merged 1 commit intomainfrom
release-checksums-cascade

Conversation

@jdalton
Copy link
Copy Markdown
Collaborator

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:

  • `lib/release-checksums/core.mts` — format primitives + embedded loader + verify
  • `lib/release-checksums/producer.mts` — write checksums.txt, bump release-assets.json (new shared producer surface)
  • `release-assets.schema.json` — JSON Schema for the embedded manifest

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`:

  • `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` (relative path, also re-targeted)

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

  • `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)

After this lands, sync-scaffolding against btm should report zero `optional_drift` for the release-checksums files.

…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)
@jdalton John-David Dalton (jdalton) merged commit 1453dc2 into main May 3, 2026
5 of 6 checks passed
@jdalton John-David Dalton (jdalton) deleted the release-checksums-cascade branch May 3, 2026 02:26
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