feat(wsl): advertise the binary path and hold the probe cache [1]#151
Open
AbysmalBiscuit wants to merge 2 commits into
Open
feat(wsl): advertise the binary path and hold the probe cache [1]#151AbysmalBiscuit wants to merge 2 commits into
AbysmalBiscuit wants to merge 2 commits into
Conversation
The probe poller collapsed a missing client and a transport error into the same None it writes for a genuine "no foreground TUI" reply, so any transient helper outage blanked every session's cached foreground name. While the helper sat in its respawn cooldown the cache stayed None, disabling FocusLeft/FocusRight passthrough for a still-running nvim/tmux until the helper came back. Overwrite the cache only on a definitive reply; on a missing client or a probe error, leave the last-known value. client() is still called every tick, so a cooled-down helper keeps getting nudged back up. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
A shell inside a distro can already find a running instance through ALACRITREE_SOCKET, but had no way to invoke the CLI: the Windows image is reachable over interop yet is not on the distro's $PATH, so callers had to hardcode a path or guess at one. Export the running image as ALACRITREE_EXE and list it in WSLENV with `/p` — the flag that has WSL rewrite the value into the distro's view of the drive, honouring whatever automount root that distro uses instead of assuming /mnt. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Two independent fixes to the WSL boundary, both about a shell inside a distro
being able to talk back to the instance that spawned it.
fix(wsl): keep the last probe when the helper is briefly downThe probe poller collapsed three different outcomes into the same
None:a genuine "no foreground TUI", a missing client, and a transport error.
Any transient helper outage therefore blanked every session's cached
foreground command name, and while the helper sat in its respawn cooldown
the cache stayed blank — disabling
FocusLeft/FocusRightpassthrough fora still-running nvim or tmux until the helper came back on its own.
The cache is now overwritten only on a definitive reply. A missing client or
a probe error leaves the last-known value in place.
client()is stillcalled every tick, so a cooled-down helper keeps getting nudged back up.
feat(ipc): advertise the binary path to WSL shellsA shell inside a distro could already find a running instance through
ALACRITREE_SOCKET, but had no way to invoke the CLI: the Windows image isreachable over interop yet is not on the distro's
$PATH, so callers had tohardcode a path or guess at one.
The running image is now exported as
ALACRITREE_EXEand listed inWSLENVwith
/p— the flag that has WSL rewrite the value into the distro's view ofthe drive, honouring whatever automount root that distro uses instead of
assuming
/mnt. It is the only one of the three exported variables thatcarries a conversion flag; a pipe name and a session id are not paths. A user
who already lists
ALACRITREE_EXEthemselves keeps their own spelling.Testing
cargo test -p alacritree— 477 pass. New coverage:ipc::tests::wslenv_lists_the_exe_path_for_conversion— the/pflag isapplied, and an existing user entry is left alone.
ipc::tests::a_client_reaches_the_listener_it_advertisesnow also assertsALACRITREE_EXEmatchescurrent_exe().The existing
wslenv_gains_*tests were updated for the third variable.