Skip to content

fix(plugin): install the release asset over a shipped launcher, and name the build without one - #1050

Merged
navidemad merged 1 commit into
mainfrom
fix/plugin-install-unbuilt-binary
Oct 16, 2026
Merged

navidemad merged 1 commit into
mainfrom
fix/plugin-install-unbuilt-binary

Conversation

@navidemad

@navidemad navidemad commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #1045

Summary

For a github: source, pixel install now fetches the release asset pixel-<name>-<target> even when the repository ships a file at run (the launcher the Pixel-CLI plugins commit), and replaces it only after the sha256 check. Without an asset it no longer prints a bare success: a new Binary::Shipped outcome says the repository's own run stays and prints the cargo install --git … --root <plugin dir> --force that builds the program into place.

 pixel_plugin::install::add (github:)
-  program_is_absent? → fetch_program : Binary::Present
+  fetch_program always
+    asset fetched + digest ok  → rename over run        → Binary::Downloaded
+    no asset, run shipped       → keep run               → Binary::Shipped (build command shown)
+    no asset, nothing shipped   →                          Binary::Missing (unchanged)
 fetch::download_program
-  write to dest, remove dest on failure            # would delete a shipped launcher
+  write to bin/.<file>.download, rename on success

Evidence

  • Before: pixel install github:Pixel-CLI/pixel-recall → installed plugin recall 0.1.0; next pixel recall status → the recall plugin has no pixel-recall binary installed.
  • After: cargo test -p pixel-plugin --lib → 138 passed, 4 new: a_release_asset_replaces_the_launcher_the_repository_ships, without_a_release_asset_a_shipped_launcher_stays_and_the_build_is_named, a_rejected_asset_leaves_the_shipped_launcher_in_place, a_local_source_runs_what_it_ships_without_asking_a_release. With the old fetch.rs restored, 3 of them fail.
  • cargo test -p pixel-cli --test cli plugin_cli:: → 34 passed, including install_github_runs_the_release_asset_over_a_shipped_launcher (end to end: the plugin runs the asset, not the launcher); cargo test -p pixel-cli --bin pixel plugin_cmd → 10 passed; docs_drift:: → 27 passed; fmt and clippy -p pixel-plugin -p pixel-cli --all-targets -D warnings clean.
  • --force checked locally: without it cargo refuses to overwrite the launcher.
  • Not run locally: the full workspace suite (CI), a real network install.

Merge Danger

Door: two-way: a revert restores the old detection; a plugin already installed keeps whichever file it has.

Blast radius: install. Every pixel install github:… now makes one release request even when run is shipped; a bad merge could replace a shipped program with a mismatched asset (the digest check and rename-after-check guard that).

Still needed outside this repository: a release tag on Pixel-CLI/pixel-recall, pixel-telemetry and pixel-git (their release.yml already publishes the assets and .sha256).

Docs touched

.github/changelog.d/plugin-asset-over-launcher.fixed.md; ARCHITECTURE.md (pixel-plugin row and pixel install); docs/threat-model.md (the release download now also runs when run is shipped).


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

…ame the build without one

`pixel install github:Pixel-CLI/pixel-recall` reported "installed" while the
first `pixel recall` failed: the repository commits `bin/pixel-recall`, a
launcher that only finds a separately built binary, so `add` saw the program
present, never asked the release for `pixel-recall-<target>` (which the
plugin's README and launcher expect to replace it), and printed nothing about
a build.

A github: source now always tries the release asset for `run`. The download
lands beside `run` and replaces it only once checked, so a failed or rejected
download leaves the shipped file intact. Without an asset, a shipped program
stays (Binary::Shipped) and the report prints the `cargo install --git …
--root <plugin> --force` command that builds it into the plugin; an unshipped
one is Binary::Missing as before.
@navidemad
navidemad merged commit 327df70 into main Oct 16, 2026
20 checks passed
@navidemad
navidemad deleted the fix/plugin-install-unbuilt-binary branch October 16, 2026 21:43
LivioGama pushed a commit that referenced this pull request Nov 25, 2026
…ame the build without one (#1050)

`pixel install github:Pixel-CLI/pixel-recall` reported "installed" while the
first `pixel recall` failed: the repository commits `bin/pixel-recall`, a
launcher that only finds a separately built binary, so `add` saw the program
present, never asked the release for `pixel-recall-<target>` (which the
plugin's README and launcher expect to replace it), and printed nothing about
a build.

A github: source now always tries the release asset for `run`. The download
lands beside `run` and replaces it only once checked, so a failed or rejected
download leaves the shipped file intact. Without an asset, a shipped program
stays (Binary::Shipped) and the report prints the `cargo install --git …
--root <plugin> --force` command that builds it into the plugin; an unshipped
one is Binary::Missing as before.
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.

plugin: pixel install reports success for a plugin whose shipped launcher has no binary

1 participant