fix(aside): the readiness probe can never detect Aside under zsh - #2824
Open
AntonioVitalic wants to merge 1 commit into
Open
fix(aside): the readiness probe can never detect Aside under zsh#2824AntonioVitalic wants to merge 1 commit into
AntonioVitalic wants to merge 1 commit into
Conversation
The probe built its deadline wrapper into `_T` and expanded it unquoted, so
`$_T aside repl …` only worked in a shell that word-splits. zsh does not: it
looked for a command literally named "gtimeout 30", the probe answered
ASIDE_NOT_RUNNING with Aside installed and ready, and every browsing skill
fell back to the bundled Chromium in silence. zsh is the macOS default and
Aside is macOS-only, so on a stock Mac the probe could never report READY.
`eval` splits in sh, bash and zsh alike. The deadline chain is unchanged and
`${_T:+$_T }` keeps the no-wrapper case clean when neither coreutils nor perl
is present. Verified READY in the three shells, with GSTACK_SKIP_ASIDE=1 still
short-circuiting to NEEDS_ASIDE.
The test pinned the broken invocation verbatim, so it now pins the eval form
and asserts the old one is gone.
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
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.
What's broken
The Aside readiness probe builds its deadline wrapper into a variable and expands it unquoted:
$_Tonly splits intogtimeout+30in a shell that word-splits unquoted expansions. zsh does not. There it looks for a command literally namedgtimeout 30:zsh is the default shell on macOS and Aside is macOS-only, so on a stock Mac the probe reports
ASIDE_NOT_RUNNINGregardless of what Aside is actually doing, and every browsing skill falls back to the bundled Chromium in silence. Measured with Aside 1.26.906.1630 installed, signed in, and answeringaside replin 5 ms. The same line under bash runs the wrapper fine, which is why it reads as correct.The fix
Keep the deadline chain exactly as it is (gtimeout → timeout → perl alarm) and route the call through
eval, which splits in sh, bash and zsh alike:${_T:+$_T }keeps the no-wrapper case clean on a stock macOS that has neither coreutils nor perl: the prefix collapses to nothing instead of leaving a stray space.Verified
READY: aside 1.26.906.1630in zsh, bash and sh, withGSTACK_SKIP_ASIDE=1still short-circuiting toNEEDS_ASIDE.Scope
scripts/resolvers/aside.ts— the change itself.SKILL.mdfiles, regenerated withbun run gen:skill-docsrather than edited by hand.test/fixtures/golden/fixtures, regenerated the same waytest/host-config.test.tsrenders them (--host codex,--host factory, plusship/SKILL.mdfor claude). Without this the golden comparison fails, since it diffs a fresh render byte for byte.test/aside-driver.test.ts— the assertion pinned the broken invocation verbatim, so it now pins the eval form and asserts$_T aside replis gone.bun test test/aside-driver.test.ts test/host-config.test.ts→ 104 pass, 0 fail.Introduced in #2810.