Skip to content

release: 0.5.1#68

Merged
alokwhitewolf merged 5 commits into
mainfrom
release/0.5.1
Jun 11, 2026
Merged

release: 0.5.1#68
alokwhitewolf merged 5 commits into
mainfrom
release/0.5.1

Conversation

@alokwhitewolf

Copy link
Copy Markdown
Collaborator

Fixes hook exit-127 after a host plugin re-stage, where bin/evo-hook-drain is fetched from GitHub releases into the staged plugin cache only. Codex re-stages the cache from its marketplace snapshot when the snapshot changes; Claude Code re-copies the marketplace clone on claude plugin update. Both sources are git trees without the binary, so a re-stage dropped it and every hook fired exit 127, with evo doctor passing until the re-stage.

  • mirror_hook_drain_binary copies the fetched binary between plugin roots. The codex installer mirrors it into the marketplace snapshot; claude-code staging mirrors into the marketplace clone for cache-backed installs.
  • evo doctor codex / evo doctor claude-code warn when the snapshot copy is missing. Warning only, no rc bump: evo update skips hosts whose doctor fails, and update is what re-mirrors the binary.
  • Regression tests simulate the host re-stage in sandboxed CODEX_HOME / CLAUDE_CONFIG_DIR roots (tests/unit/test_hook_drain_restage.py).
  • README troubleshooting: the exit-127 section now covers both known causes (0.4.5 staging-name bug, re-stage wipe).

hooks.json is unchanged, so existing trusted-hook hashes stay valid. Already-broken installs repair with uv tool install --force evo-hq-cli && evo install <host> --force.

Version bumped to 0.5.1 via bump-version.py.

Hosts re-stage the plugin cache by copying the marketplace snapshot:
codex does it on its own when the snapshot changes, claude-code on
`claude plugin update`. The snapshot is a git tree without the release
binary, so a re-stage dropped bin/evo-hook-drain from the cache and
every hook fired exit 127, with `evo doctor` passing right up until
the re-stage.

- mirror_hook_drain_binary copies the fetched binary between plugin
  roots; codex _install_via_filecopy mirrors into the marketplace
  snapshot, claude-code staging mirrors into the marketplace clone for
  cache-backed installs
- evo doctor warns when the snapshot copy is missing, without failing:
  `evo update` skips hosts whose doctor fails, and update is what
  re-mirrors the binary
- regression tests simulate the host re-stage in sandboxed
  CODEX_HOME / CLAUDE_CONFIG_DIR roots

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 3 additional findings.

Open in Devin Review

`evo install <host>` and `evo update <host>` now finish by running the
host's doctor and return its result. An install that doctor can't
verify previously reported success and failed at hook-fire time;
verification required knowing to run `evo doctor <host>` manually.
…hooks by default

Codex re-clones its marketplace snapshot from git at session start and
re-stages the plugin cache from it, removing anything evo staged into
those directories. Mirroring the binary into the snapshot (previous
commit) therefore only survives until the next refresh.

- The fetched evo-hook-drain binary now lives at $EVO_HOME/bin
  (~/.evo/bin), outside host-managed directories, and is copied into
  the plugin cache from there.
- The plugin tree commits a shell wrapper at bin/evo-hook-drain that
  execs the stable copy and no-ops with a reinstall hint when it is
  missing. Any host re-stage restores the wrapper, so hooks keep
  working instead of firing exit 127. --from-path installs keep the
  wrapper in the source tree rather than dirtying the checkout.
- Tests and CI exec the Rust binary from the cargo target dir; the
  plugin bin/ path is the wrapper, no longer a build-artifact location.

evo install codex now trusts the plugin's hooks by default
(--no-trust-hooks defers to codex's /hooks review). Untrusted hooks
register but never fire, and trust hashes are pinned to hooks.json
content, so every release that touches a hook silently reverted codex
installs to untrusted. evo doctor codex verifies trust state: passes
when all hashes match, warns on a deliberate untrusted install, fails
when hashes are stale.
CI runners have no codex CLI and stage evo-hook-drain.exe on Windows;
the new install/doctor tests assumed both.

- TestInstallRunsDoctor satisfies codex.install's which("codex") gate
  with a PATH stub (never invoked for --from-path installs)
- TestDoctorHookBinary stages the platform binary name; doctor resolves
  evo-hook-drain.exe on Windows since a68f30e
- TestWrapperPreservation skips on Windows (sh wrapper is posix-only)
@alokwhitewolf alokwhitewolf merged commit 934cb79 into main Jun 11, 2026
30 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.

1 participant