Align browser-bridge socket with launcher via just demo-bridge/qa-bridge - #89
Merged
Conversation
The browser bridge resolves DECKARD_SOCKET_PATH through WalletClient::from_env, but just demo and just qa launch the app with world-specific sockets. Running the bridge in a separate terminal without that env fell back to the per-uid default socket and reported a misleading "daemon not running" error even though the supervised daemon was up on the world socket. Add just demo-bridge and just qa-bridge recipes that reuse each launcher's own socket and chain vars, so the bridge can no longer dial the wrong daemon. Promote the qa world constants to top-level qa_* vars (mirroring demo_*) and point qa/qa-vault at them with byte-identical values. The bridge now logs which socket it dials in real mode instead of always claiming dev-mock. Update docs/browser-bridge.md to use the recipes instead of the env-less command that reproduced the trap. No new dependencies. cargo fmt clean, just check green (default + tray), cargo test --workspace green (250 passed under TMPDIR=/tmp; the SUN_LEN signerd socket flake is a known env artifact unrelated to this change).
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
The browser bridge resolves
DECKARD_SOCKET_PATHthroughWalletClient::from_env, butjust demoandjust qalaunch the app with world-specific sockets, so running the bridge in a separate terminal without that env fell back to the per-uid default socket and reported a misleading "daemon not running" error even though the supervised daemon was up on the world socket. This PR addsjust demo-bridgeandjust qa-bridgerecipes that reuse each launcher's own socket and chain vars so the bridge can no longer dial the wrong daemon, promotes the qa world constants to top-levelqa_*vars (mirroringdemo_*) with byte-identical values, makes the bridge log which socket it dials in real mode instead of always claiming dev-mock, and updatesdocs/browser-bridge.mdto use the recipes instead of the env-less command that reproduced the trap.Linked issue
No tracking issue. Motivation: a local debugging session hit a confusing browser-bridge
4900because the bridge defaulted to a socket the demo/qa launchers never use. This removes that footgun by construction rather than by documentation alone.Definition of Done
cargo fmt --all --checkis cleanjust checkis green — clippy-D warningson both the default config and--features traycargo test --workspaceis greenCargo.toml/Cargo.lockserve()stderr startup line), soDESIGN.mddoes not applyZeroizingand are never logged — the new startup log prints only the socket path and chain id, never a seed/key/passphraseEvidence (paste command output here)
Notes for reviewers
WalletClient::from_env; the gap was purely operational (the launchers exported the world socket/chain to the app process only, not to the bridge's terminal). The new recipes derive the bridge'sDECKARD_SOCKET_PATH/DECKARD_CHAIN_IDfrom the samejustvars the app launch uses, so they cannot drift.cargo test --workspacemust run withTMPDIR=/tmpon macOS: without it,deckard-signerd'sresolve_accepted_on_control_channelsocket test fails with "daemon never bound its socket" because the long/var/folders/...$TMPDIRpath exceeds the 104-byteSUN_LENlimit. This is a known env artifact, not a regression from this change, and is unrelated to the touched crates.WalletClient::socket_path()getter (delegating to the existingSignerClient::path()) backs the startup log. No RPC behavior, supported-method set, or types changed.serve()is sound, the qa refactor preserves exact env values.