POC: discover extensions bundled with the release archive - #882
Draft
tedkahwaji wants to merge 1 commit into
Draft
tedkahwaji wants to merge 1 commit into
tedkahwaji wants to merge 1 commit into
Conversation
Lets a pup release ship first-party extensions so they work right after installing pup, with no `pup extension install` step. - Look up extensions in libexec/pup-extensions/ next to the binary or one level up (Homebrew layout); user-installed extensions still win - Bundled lookup only accepts valid extension names and regular files - Linux release config fetches a pinned pup-setup asset, verifies its SHA-256, and places it in the archive (placeholder pin and sums) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Why
Proof of concept for shipping a first-party extension inside every pup release, so
pup setupworks right after installing pup (for example, a setup extension wrapping the public@datadog/ai-setup-clipackage). This is the "everyone gets it installed" option, to compare against on-demand install viapup extension installor auto-install on first use.What
src/extensions/discovery.rs):extension_pathfalls back tolibexec/pup-extensions/pup-<name>, either next to the pup binary (tarball layout) or one level up (Homebrew'sbin/+libexec/layout). User-installed extensions still take precedence. The bundled lookup only accepts valid extension names and regular files..goreleaser-linux.yaml,scripts/fetch-bundled-extensions.sh):beforehook downloads a pinnedpup-setup-<os>-<arch>release asset per platform and verifies it against a pinned SHA-256.libexec/pup-extensions/pup-setupwith mode 0755.DataDog/pup-setup,v0.0.0) and the checksums are placeholders, since no such release exists yet.libexec/alongsidebin/pup) would follow the same pattern.docs/EXTENSIONS.md.Testing
cargo test --bin pup extensions: 121 passed, including 5 new bundled-discovery tests:../setup,Setup, empty,set/up)cargo clippy -- -D warningsandcargo fmt --checkare clean.YAML parses (
ruby -ryaml). The script passesbash -nunder both bash 5 and macOS/bin/bash3.2. goreleaser isn't installed locally, so the archive step wasn't run end to end.Local simulation, with a stub placed in
target/debug/libexec/pup-extensions/pup-setupand an emptyPUP_CONFIG_DIR:A user-installed
pup-setuptakes precedence:With the bundled stub removed:
The fetch script fails closed against the placeholder pin:
Size impact
A local release build of pup is about 68 MB. A real setup extension carries a native agent runtime. A separate POC measured a compiled setup extension on darwin-arm64:
.tar.gzSo bundling would add roughly 90 MB to every compressed pup download and about 280 MB on disk, per platform. Users who never run
pup setuppay that cost too. The agent runtime binary alone is also above the current 100 MiB per-binary limit inpup extension install.Open questions
manifest.json, sopup extension listandpup --helpdon't show them yet.libexec/is idiomatic) and left out of raw tarballs?🤖 Generated with Claude Code