Skip to content

Add zvelte-check-bin 0.2.0 - #509

Open
bryan-minimal wants to merge 2 commits into
mainfrom
bryan/homebrew-import
Open

Add zvelte-check-bin 0.2.0#509
bryan-minimal wants to merge 2 commits into
mainfrom
bryan/homebrew-import

Conversation

@bryan-minimal

@bryan-minimal bryan-minimal commented Jul 22, 2026

Copy link
Copy Markdown
Member

A fast Svelte diagnostic tool written in Zig, from the ampcode/homebrew-tap Homebrew formula.

First package produced by pkgmgr import homebrew (pkgmgr-rs#567) — this PR is partly a test that the importer produces something a reviewer would accept by hand.

What was verified rather than trusted

  • Both sha256 values were recomputed from the downloaded bytes, not copied out of the formula. The tap is a cross-check, never the root of trust for the one value anchoring this package's integrity.
  • strip_prefix is absent because the archives are genuinely flat — read off the real tarball (tar -tzf → one entry, zvelte-check). Homebrew auto-strips a single leading directory before def install and minimal does not, so this is unknowable from formula text and a guess would surface at build time as a missing file.
  • Provenance is derived from the artifact URLs, which are literally github.com/ampcode/zvelte-check/releases/…, and cross-checked against the homepage. Never from the homepage alone — that conflation is how chromium-bin came to name microsoft/playwright for an artifact served out of Google's bucket. This buys real CPE identity (not a dark package) and free version checking via the GitHub tier.

One thing I want to flag rather than bury

This is prebuilt, and zig IS packaged. pkgs CLAUDE.md prefers a source build when the toolchain exists. Prebuilt was chosen only because pkgmgr has no Zig BuildFlavor yet — not because the toolchain is missing, and I didn't want the build.ncl header to imply otherwise.

Mitigating: these are upstream's own release binaries, not a third-party redistribution, and we verify the hashes ourselves. A source-built zvelte-check can take the bare name later, which is why this carries -bin.

No reviewer TODOs

Licence, provenance, outputs and deps all resolved mechanically. Requires no stdlib bump and touches nothing else in the repo.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Added the zvelte-check command-line tool as an installable package.
    • Provides prebuilt binaries for x86_64 and ARM64 Linux systems.
    • Installs the executable for direct use from the system command line.
    • Bundles version 0.2.0 and uses verified downloads to improve installation reliability across supported architectures.

A fast Svelte diagnostic tool written in Zig, from the ampcode/homebrew-tap
Homebrew formula. First package produced by `pkgmgr import homebrew`.

Prebuilt per-arch binaries from upstream's own GitHub releases. Both
sha256 values were RECOMPUTED from the downloaded bytes rather than
copied out of the formula, so the tap is a cross-check and not the root
of trust for the only value anchoring this package's integrity.

`strip_prefix` is absent because the archives are genuinely flat — read
off the real tarball (`tar -tzf` lists one entry, `zvelte-check`), not
guessed. Homebrew auto-strips a single leading directory before
`def install` and minimal does not, so this is unknowable from the
formula text.

Provenance is derived from the ARTIFACT URLs, which are literally
github.com/ampcode/zvelte-check/releases/..., and cross-checked against
the homepage. That buys real CPE identity (not a dark package) and free
version checking via the GitHub tier.

NOT a source build, and worth stating plainly: `zig` IS packaged, and
pkgs CLAUDE.md prefers building from source when the toolchain exists.
Prebuilt was chosen only because pkgmgr has no Zig BuildFlavor yet — not
because the toolchain is missing. Mitigating: these are upstream's own
release binaries, not a third-party redistribution, and we verify their
hashes ourselves. A source-built `zvelte-check` can take the bare name
later, which is why this one carries the `-bin` suffix.

No reviewer TODOs: licence, provenance, outputs and deps were all
resolved mechanically.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: d0143311-b0f0-4274-ac79-9203e0a608d0

📥 Commits

Reviewing files that changed from the base of the PR and between e60a2e7 and 760e160.

📒 Files selected for processing (1)
  • packages/zvelte-check-bin/build.ncl

📝 Walkthrough

Walkthrough

Adds a zvelte-check-bin package that downloads architecture-specific prebuilt archives, verifies checksums, and installs the zvelte-check executable under usr/bin.

Changes

zvelte-check binary packaging

Layer / File(s) Summary
Prebuilt binary package and installation
packages/zvelte-check-bin/build.ncl, packages/zvelte-check-bin/build.sh
The package definition pins version-specific architecture archives and checksums, configures build inputs and output metadata, and invokes the install script to extract and install the executable.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: adding zvelte-check-bin version 0.2.0.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch bryan/homebrew-import

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai 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.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/zvelte-check-bin/build.ncl`:
- Around line 3-4: Update the build dependency declaration in build.ncl to
include the repository’s tar package directly in build_deps. Ensure every
affected build configuration block, including the ranges noted in the review,
provides tar explicitly rather than relying on transitive dependencies.

In `@packages/zvelte-check-bin/build.sh`:
- Around line 1-4: Update the build script header to use the Bash interpreter
and replace the current shell options with Bash strict mode, specifically
ensuring the script starts with the required shebang and uses set -euo pipefail.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 1596b005-4708-446d-a54b-56985af90efc

📥 Commits

Reviewing files that changed from the base of the PR and between b043aad and e60a2e7.

📒 Files selected for processing (2)
  • packages/zvelte-check-bin/build.ncl
  • packages/zvelte-check-bin/build.sh

Comment thread packages/zvelte-check-bin/build.ncl Outdated
Comment on lines +3 to +4
let base = import "../base/build.ncl" in
let glibc = import "../glibc/build.ncl" in

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.

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Declare tar as a build dependency.

The build script invokes tar, but build_deps only provides build.sh, the selected archive, and base. Add the repository’s tar package directly to build_deps instead of relying on it being present transitively.

Proposed fix
 let glibc = import "../glibc/build.ncl" in
+let tar = import "../tar/build.ncl" in
@@
     } target,
     base,
+    tar,
   ],

Also applies to: 14-29

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/zvelte-check-bin/build.ncl` around lines 3 - 4, Update the build
dependency declaration in build.ncl to include the repository’s tar package
directly in build_deps. Ensure every affected build configuration block,
including the ranges noted in the review, provides tar explicitly rather than
relying on transitive dependencies.

Source: Coding guidelines

Comment on lines +1 to +4
#!/bin/sh
# Imported from the Homebrew formula `ampcode/homebrew-tap/zvelte-check` by `pkgmgr import homebrew`.
# Prebuilt vendor binary: unpacked and installed, never compiled.
set -ex

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.

🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win

Use the required Bash strict mode.

The build script must start with #!/bin/bash and set -euo pipefail; the current /bin/sh and set -ex combination does not satisfy that contract and does not fail immediately when required variables are unset.

Proposed fix
-#!/bin/sh
+#!/bin/bash
@@
-set -ex
+set -euo pipefail
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
#!/bin/sh
# Imported from the Homebrew formula `ampcode/homebrew-tap/zvelte-check` by `pkgmgr import homebrew`.
# Prebuilt vendor binary: unpacked and installed, never compiled.
set -ex
#!/bin/bash
# Imported from the Homebrew formula `ampcode/homebrew-tap/zvelte-check` by `pkgmgr import homebrew`.
# Prebuilt vendor binary: unpacked and installed, never compiled.
set -euo pipefail
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/zvelte-check-bin/build.sh` around lines 1 - 4, Update the build
script header to use the Bash interpreter and replace the current shell options
with Bash strict mode, specifically ensuring the script starts with the required
shebang and uses set -euo pipefail.

Source: Coding guidelines

Refined against the real built tree with
`pkgmgr import homebrew … --from-build`, which reads the installed ELF
instead of guessing.

The binary is statically linked (`file`: "ELF 64-bit LSB executable,
ARM aarch64 … statically linked"), so it needs no runtime_deps at all.
The discovery-mode `[glibc]` was a template default, not an observation.

Verified by rebuilding: the package produces a new content-addressed
tree and a real 5 MB aarch64 binary at usr/bin/zvelte-check.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
{
upstream_version = version,
license_spdx = "MIT",
source_provenance = {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If this is truly a binary fetch, drop source provenance and set binary_from. Also if its closed source you need closed_source = true.

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.

3 participants