Skip to content

ci(upgrade): adopt BYK/binpatch action for delta patch generation/publish - #1330

Merged
BYK merged 3 commits into
mainfrom
chore/adopt-binpatch-action
Aug 1, 2026
Merged

BYK merged 3 commits into
mainfrom
chore/adopt-binpatch-action

Conversation

@BYK

@BYK BYK commented Aug 1, 2026

Copy link
Copy Markdown
Member

Replaces the hand-rolled ~250 lines of generate-patches and publish-nightly bash in .github/workflows/ci.yml with the BYK/binpatch/action@v0.4.1 composite action. The action handles:

  • ORAS CLI install + GHCR login
  • Previous-nightly discovery (with the same-series filter that fixes the cross-major nightly tag confusion)
  • zig-bsdiff invocation + patch size gate (50% ratio)
  • Binary + versioned-tag + patch manifest push with from-version annotation threaded via action outputs

This eliminates the divergence bug we hit twice:

Also bumps the binpatch runtime dep from ^0.3.1 to ^0.4.1 for the new openSync/writeSync/closeSync output path (which avoids the ETXTBSY race when chaining into a spawn(tempPath)).

Files

  • .github/workflows/ci.yml: -220 lines of hand-rolled shell, +10 lines of action wiring
  • packages/cli/package.json: binpatch ^0.3.1 → ^0.4.1
  • pnpm-lock.yaml: regenerated

Diff

.github/workflows/ci.yml                           | 347 +++++++-------
packages/cli/package.json                          |   2 +-
pnpm-lock.yaml                                     |  10 +-

Verification

  • node -e 'require("yaml").parse(...)' parses cleanly
  • pnpm --filter sentry run typecheck: clean
  • pnpm --filter sentry run lint: clean
  • Lint passes (no shell-script lint script; YAML is the only surface)

…lish

Replaces the hand-rolled ~250 lines of `generate-patches` and
`publish-nightly` bash in `.github/workflows/ci.yml` with the
`BYK/binpatch/action@v0.4.1` composite action. The action handles:

- ORAS CLI install + GHCR login
- Previous-nightly discovery (with the same-series filter that
  fixes the cross-major nightly tag confusion)
- zig-bsdiff invocation + patch size gate (50% ratio)
- Binary + versioned-tag + patch manifest push with `from-version`
  annotation threaded via action outputs

This eliminates the divergence bug we hit twice:
- The PREV_TAG recomputation divergence between generate-patches
  and publish-nightly (PR #1327 fixed this in the hand-rolled
  shell; the action solves it generically by exposing
  `generate-ghcr.outputs.from-version` and consuming it as a
  `publish-ghcr` input — see BYK/binpatch#40)
- The cross-major nightly tag confusion (PR #1329 fixed this in
  the hand-rolled shell; the action's `validateChainStep` does
  the equivalent check at chain-resolution time)

Also bumps the `binpatch` runtime dep from `^0.3.1` to `^0.4.1`
for the new `openSync`/`writeSync`/`closeSync` output path
(which avoids the ETXTBSY race when chaining into a
`spawn(tempPath)`).

Files:
- .github/workflows/ci.yml: -220 lines of hand-rolled shell,
  +10 lines of action wiring
- packages/cli/package.json: binpatch ^0.3.1 → ^0.4.1
- pnpm-lock.yaml: regenerated
Comment thread .github/workflows/ci.yml Outdated
Comment thread .github/workflows/ci.yml
BYK/binpatch#44 ported the same-series filter from #1329
into the binpatch action's prev-ghcr step, so consumers adopting
`generate-ghcr` no longer need to re-implement this safeguard.

This bumps both the runtime dep (`binpatch` ^0.4.1 → ^0.4.2) and
the action ref (BYK/binpatch/action@0.4.1 → @0.4.2) so the
migration actually picks up the action's own fix.
Comment thread .github/workflows/ci.yml

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 079ea28. Configure here.

Comment thread .github/workflows/ci.yml
@BYK
BYK merged commit 59be27e into main Aug 1, 2026
32 checks passed
@BYK
BYK deleted the chore/adopt-binpatch-action branch August 1, 2026 01:04
@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-08-01 01:04 UTC

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