Skip to content

fix: refetch an installed binary that cannot run on this host; plugin 0.9.1 - #72

Merged
backnotprop merged 3 commits into
plannotator:mainfrom
emo-eth:feat/platform-aware-binary-fetch
Oct 12, 2026
Merged

backnotprop merged 3 commits into
plannotator:mainfrom
emo-eth:feat/platform-aware-binary-fetch

Conversation

@emo-eth

@emo-eth emo-eth commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

fetch-herdr-annotate.sh and fetch-plannotator-tui.sh skip the download when bin/<name>.exe is executable and its version stamp matches the pin. A plugin directory synced from another machine passes that check with the other machine's binary, so a macOS binary stays in place on Linux.

The shortcut now also requires bin/<name>.exe --version to succeed. A binary that cannot run on this host falls through to the normal download and SHA256SUMS check.

  • Fresh installs (herdr plugin install / update), Lite, Windows Full, stage-local.sh, and the HERDR_ANNOTATE_BIN / PLANNOTATOR_TUI_BIN overrides behave as before.
  • The PowerShell fetchers are unchanged.
  • The tests put a binary for the other OS under a matching stamp and serve the release offline through a curl stub. They fail on main and pass here. The herdr-annotate test also checks that a checksum mismatch on this path is still fatal.
  • Plugin 0.9.1 in all four manifests.

refs #54

Trim the change to the runnable check in the bash fetchers: drop the
cargo fallback build, the target stamp, node/bun arch detection, the
Git Bash branches and the PowerShell changes. Test the shortcut itself
with a binary for another OS and an offline release.

refs plannotator#54
@backnotprop backnotprop changed the title feat(scripts): platform-aware binary resolution, runnable checks, and fallback build fix: refetch an installed binary that cannot run on this host; plugin 0.9.1 Oct 12, 2026
@backnotprop

Copy link
Copy Markdown
Contributor

Thanks @emo-eth, and thanks for splitting this out from #54. I pushed a trimmed version onto your branch so we can merge it now.

What I kept: the core of your fix. Before the bash fetchers say "already installed", they now run bin/<name>.exe --version. If the binary can't run on this machine (for example, a synced Mac binary on Linux), the fetcher does the normal verified download. I also added tests that put a binary for the other OS in bin/ under a matching stamp. These tests fail on main and pass here.

What I trimmed, and why:

  • The cargo fallback build. Plugin installs shouldn't compile anything or need a Rust toolchain. A fallback also turned a checksum mismatch into a silent rebuild, and a checksum failure has to stop the install.
  • The target stamp and the node/bun arch detection. The --version check already catches the synced-binary case. The node mapping could also pick x86_64 on an unknown Linux arch.
  • The Git Bash/MINGW branches and the Windows asset names in the .sh scripts. Herdr on Windows runs the PowerShell fetchers, so those paths never run (same reason as Fix plannotator-tui fetch for native Windows (Git Bash/MSYS/Cygwin) #33).
  • The PowerShell changes. The new check there didn't run the binary. Doing that properly needs real Windows test executables, so I left the .ps1 fetchers as they are for now.

herdr plugin install and update always start in a fresh directory, so normal installs work exactly as before. This only affects re-running a fetcher over an existing bin/, which is your synced setup. Plugin is now 0.9.1.

@backnotprop
backnotprop merged commit ceab050 into plannotator:main Oct 12, 2026
7 checks passed
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.

2 participants