Skip to content

nsh: add the missing Homebrew formula - #15

Merged
huacnlee merged 2 commits into
mainfrom
fix/nsh-homebrew-installation
Oct 19, 2026
Merged

huacnlee merged 2 commits into
mainfrom
fix/nsh-homebrew-installation

Conversation

@huacnlee

@huacnlee huacnlee commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

Summary

Fixes longbridge/nsh#96.

  • Add the missing nsh 0.1.1 formula using the official macOS ARM64 and Linux x86_64 release archives and verified SHA-256 checksums.
  • Keep the entire distribution in libexec, with bin/nsh symlinked so bundled runtimes remain discoverable. Unsupported architectures get an explicit requirement error.
  • Test --version, app initialization, and web packaging through the installed command. Document supported platforms and add narrowly scoped, read-only Apple-silicon PR CI.

Validation

  • Downloaded both release archives and independently matched their published checksums; inspected executable formats, modes, and runtime layout.
  • Ruby syntax, brew style --formula longbridge/tap/nsh, and brew audit --strict --formula longbridge/tap/nsh pass.
  • Homebrew formula loading/requirements checked for macOS and Linux on both architecture families.
  • Linux release CLI initialization and web packaging pass. Full local brew install is blocked by this container's socket(2) restriction; no local macOS executor was available.
  • Apple-silicon CI passed on macos-15 ARM64: formula style, strict audit, real Homebrew installation/checksum verification, CLI version, app initialization, and web-runtime packaging. Native GUI/SDK integration is outside this smoke test.

Release publishing follow-up

This restores the missing formula for the existing release. The upstream Packages workflow failure still needs its intended HOMEBREW_TAP_TOKEN restored by a maintainer. Before the next generated update, mirror the formula's guards/tests/style fixes in the upstream template, which otherwise overwrites this file. This PR does not change credentials or release workflows.

Implemented by ChatGPT on behalf of @huacnlee.

Keep release runtimes beside the CLI, guard supported architectures, and
exercise Homebrew installation and web packaging on Apple silicon.

Fixes longbridge/nsh#96.

Implemented by ChatGPT on behalf of @huacnlee.
Keep a default URL so unsupported architectures reach their requirement
error while conforming to Homebrew's formula component rules. Let the
version be inferred from the release URL.

Implemented by ChatGPT on behalf of @huacnlee.
@huacnlee
huacnlee marked this pull request as ready for review October 19, 2026 07:39
@huacnlee
huacnlee merged commit 7d83bdd into main Oct 19, 2026
1 check passed
@huacnlee
huacnlee deleted the fix/nsh-homebrew-installation branch October 19, 2026 07:39
huacnlee added a commit to longbridge/nsh that referenced this pull request Oct 19, 2026
## Description

Complete the existing release-to-Homebrew update path. The v0.1.1
[Packages
run](https://github.com/longbridge/nsh/actions/runs/39103961583/job/117605768907)
failed because its intended `HOMEBREW_TAP_TOKEN` was unavailable. The
formula added in longbridge/homebrew-tap#15 now installs correctly, but
the upstream template would overwrite its architecture guards and
runtime smoke test on the next release.

- Keep the generated formula identical to the fixed tap formula:
official macOS ARM64/Linux x86_64 assets, explicit architecture
requirements, complete `libexec` distribution, and CLI/web-runtime
tests.
- Validate published stable tags, exact checksum filenames and SHA-256
values; download and verify both archives. Install, audit and test the
generated formula on Apple silicon before writing the tap.
- Run read-only generation/Homebrew checks on package PRs and main
pushes. Only published stable releases and explicit Packages dispatches
can reach the tap writer.
- Serialize writers, reject version downgrades, leave identical reruns
without a commit, and retain non-force pushes. Add a clear missing-token
failure and maintainer recovery instructions.
- Limit future distribution builds to the Scoop template used by
Release; Homebrew files now have their own focused checks. This PR still
triggers distribution CI because it changes the release workflow's path
filter.

## Required maintainer setup

The existing `HOMEBREW_TAP_TOKEN` secret must be available to
`longbridge/nsh`, with Contents read/write on `longbridge/homebrew-tap`
and access allowed by its branch rules. This PR does not create, read,
or modify credentials or permissions. The built-in workflow token
remains read-only.

After merge and credential setup, a new Packages dispatch on main can
sync an existing published stable tag. No release or publishing workflow
was dispatched for this PR. An authenticated cross-repository write
remains unverified until that maintainer step.

## Validation

- All 7 Python regression tests pass: tag/release rejection, exact asset
checksums, missing sidecars, safe output on failure,
runtime/architecture template content, idempotence and numerical
downgrade prevention.
- Generated v0.1.1 formula is byte-for-byte identical to the merged tap
formula; both actual release archive SHA-256 checks and generated Ruby
syntax pass.
- YAML parsing and every inline Bash syntax check pass. Actionlint
1.7.12 passes apart from its unrecognized `concurrency.queue` key;
`queue: max` is supported by [current GitHub
documentation](https://docs.github.com/en/actions/how-tos/write-workflows/choose-when-workflows-run/control-workflow-concurrency).
The actual Packages workflow was accepted and passed by GitHub.
- Independent review found no blocking defects.
- [Apple-silicon Homebrew CI
passed](https://github.com/longbridge/nsh/actions/runs/39218399342/job/117947623348)
on head `9d9afcaccd97e372a6c6017a57714d8ea571450a`: generator tests,
both archive checksums, style, strict audit, real installation and
CLI/web-runtime tests. The tap writer correctly skipped this PR.
- The three-platform [distribution
build](https://github.com/longbridge/nsh/actions/runs/39218399271)
remains in progress. Full Rust tests could not run locally because this
executor has no Cargo; no Rust implementation changed.

Implemented by ChatGPT on behalf of @huacnlee.
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.

installation via homebrew fails on mac

1 participant