This repository was archived by the owner on Jul 24, 2026. It is now read-only.
launch: discover smalltalk hooks in a packaged layout (<pkg>/lib/smalltalk) - #86
Draft
schickling-assistant wants to merge 1 commit into
Draft
launch: discover smalltalk hooks in a packaged layout (<pkg>/lib/smalltalk)#86schickling-assistant wants to merge 1 commit into
<pkg>/lib/smalltalk)#86schickling-assistant wants to merge 1 commit into
Conversation
…ltalk)
`discoverSmalltalkDir` derives a candidate from the `st` binary as
`<smalltalk>/bin/st` -> grandparent. That holds for a git checkout, but a
PACKAGED install puts `st` at `<pkg>/bin/st` while the repo itself lives at
`<pkg>/lib/smalltalk`. The grandparent is then `<pkg>` — one level ABOVE
`examples/claude-code/hooks`, so `hasHooks` misses.
The hooks ship in the package; they are just undiscoverable. On a Nix box
with a correct install and nothing misconfigured, that surfaces as a
BLOCKING doctor failure:
✗ smalltalk hooks NOT found — set SMALLTALK_DIR or put `st` on PATH
✗ 1 blocking issue
which reads as "convoy is broken" on a working setup, and is only worked
around by exporting SMALLTALK_DIR — something a new adopter has no way to
guess. It also fails the pre-init friendly-first-command UX, since the
blocking check keeps `doctor --quick` at rc=1.
Try each candidate BOTH as the repo root and as `<candidate>/lib/smalltalk`.
Additive: discovery already tolerates four layouts, this is a fifth real
one, and the root is still checked first so a checkout keeps winning.
Verified against the real package with SMALLTALK_DIR unset:
discovered: /nix/store/...-smalltalk-0.3.0/lib/smalltalk
Tests: two cases — hooks found under `<pkg>/lib/smalltalk`, and the root
still preferred when both carry hooks.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GFGkKcB3iojR4TtFaCgPDF
agent-session-id: 7a700216-dccd-4fa8-b12b-9c713ee61e93
agent-tool: Claude Code
agent-tool-version: 2.1.215
agent-model: claude-opus-4-8
agent-runtime-profile: /nix/store/0f9xcsqcqq0gaa3pz4pqhlicckigyhmh-coding-agent-runtime-profile/share/coding-agents/profile.json
agent-skills-manifest: /nix/store/isfy3lpiqjmxz4r0gwxw38nk2s9469hz-agent-skills-corpus/share/agent-skills/manifest.json
tooling-profile: dotfiles@b831303
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
The bug
discoverSmalltalkDirderives a candidate from thestbinary as<smalltalk>/bin/st→ grandparent (launch.ts:62). That holds for a git checkout. But a packaged install putsstat<pkg>/bin/stwhile the repo lives at<pkg>/lib/smalltalk:The grandparent lands on
<pkg>, one level above the hooks, sohasHooksmisses. The hooks ship in the package — they're just undiscoverable.Why it matters
On a Nix box with a correct install and nothing misconfigured, this surfaces as a blocking doctor failure:
That reads as "convoy is broken" on a working setup. The only workaround is exporting
SMALLTALK_DIR, which a new adopter has no way to guess. It also defeats the friendly-first-command UX from #63 — the blocking check keeps evendoctor --quickat rc=1 on a fresh machine.I hit this adopting convoy: every green result depended on an env var set by hand.
The fix
Try each candidate both as the repo root and as
<candidate>/lib/smalltalk. Additive — discovery already tolerates four layouts (SMALLTALK_DIR,ST_BIN,ston PATH, sibling checkout); this is a fifth real one. The root is still checked first, so a checkout keeps winning.Verification
Against the real package with
SMALLTALK_DIRunset:Two tests added: hooks found under
<pkg>/lib/smalltalk, and the candidate root still preferred when both carry hooks.npm test -- launch.test.ts→ 28 passed.One pre-existing failure at
launch.test.ts:543is unrelated — it's a sandbox git-identity guard on my machine (git config user.email t@t), not this change.🤖 Generated with Claude Code
Posted on behalf of @schickling
agent_nameagent_session_idagent_toolagent_tool_versionagent_runtimeagent_modelruntime_profileskills_manifestworktreemachinetooling_profile