fix(distribution): harden the cold user path#7
Merged
Conversation
Findings from an end-to-end cold-install audit (fresh public clone, isolated HOME, full lifecycle probe — install → init → spec lifecycle → ci init/exec all green after these fixes): - install.sh preferred the tracked prebuilt over building from the checkout — the same silent-stale trap fixed in update apply (PR #4) lived on in the installer. Inverted: cargo build first, prebuilt is a warned fallback for toolchain-less hosts. rm before cp so the installed binary always gets a fresh inode (macOS AMFI; the codesign re-sign step already present stays as belt-and-suspenders). - Plugin hooks failed with exit 127 on every session/tool-use for a marketplace install without the CLI binary. Every hook command is now guarded with an if-form "command -v s5d" check: absent binary means exit 0 (SessionStart prints a one-line install hint instead), and — deliberately if-form, not "&& ... || true" — a present binary's exit code passes through untouched so blocking enforcement hooks still block (verified both ways with a fake exit-2 binary). - All three distribution manifests (.claude-plugin, .codex-plugin, gemini-extension) still claimed version 0.3.0 against an 0.11.x binary. Synced to 0.11.0-alpha.9 and added the four version touchpoints to the release agent so the next release cannot ship stale manifests. update apply itself audited clean: fetch+pull --ff-only before rebuild, tmp+rename install (inode-safe). 193 tests green.
random1st
added a commit
that referenced
this pull request
Jun 11, 2026
The alpha.9 release assets predate `s5d update auto`, while the shipped hooks.json already calls it — a release-binary user with updated skills would get a failing SessionStart hook (the same hooks/binary desync class as the ci bootstrap paradox). Two fixes: - SessionStart hook now degrades through a fallback chain: update auto → update check --hook → true. Any hooks/binary version skew in either direction lands on the best available behavior instead of a hook error. - alpha.10 cut with all four version touchpoints synced (Cargo.toml, three distribution manifests) and the prebuilt rebuilt, per the release-agent checklist added in PR #7.
random1st
added a commit
that referenced
this pull request
Jul 1, 2026
The alpha.9 release assets predate `s5d update auto`, while the shipped hooks.json already calls it — a release-binary user with updated skills would get a failing SessionStart hook (the same hooks/binary desync class as the ci bootstrap paradox). Two fixes: - SessionStart hook now degrades through a fallback chain: update auto → update check --hook → true. Any hooks/binary version skew in either direction lands on the best available behavior instead of a hook error. - alpha.10 cut with all four version touchpoints synced (Cargo.toml, three distribution manifests) and the prebuilt rebuilt, per the release-agent checklist added in PR #7.
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.
Summary
End-to-end cold-install audit (fresh public clone, isolated HOME, full user journey probed empirically): install → init (MCP + hook) → spec lifecycle →
ci init/ci exec— all green after these fixes.Fixed
update apply, PR chore(hygiene): Node 24 actions, --version flag, update-apply install priority #4). Now: cargo build first, prebuilt = warned fallback;rmbeforecp(fresh inode for macOS AMFI; existing codesign re-sign kept).command -v s5dguard: missing binary → exit 0 + one-line install hint at SessionStart; present binary → exit code passes through untouched so blocking enforcement hooks still block (verified both directions with a fake exit-2 binary; the naive&& … || trueform would have silently disabled enforcement).Audited clean
update apply: fetch + pull --ff-only before rebuild; tmp+rename install (inode-safe). Session-start update check: works with checkout, silent no-op without one.193 tests green.
🤖 Generated with Claude Code