Open
Conversation
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.
Description
This PR extracts engine-agnostic runtime and user-directory fixes from the Kaldi installer work into a standalone change.
It updates subprocess-based helpers to use the active runtime's hidden-console Python binary instead of a stale
paths.PYTHONWvalue fromsettings.toml, centralizes user-directory detection/reporting insettings.py, and makesbringmederive base, user, and config paths safely when those settings keys are absent.Motivation and Context
The Kaldi installer branch exposed a broader runtime bug: when Caster is launched from a repo-local virtual environment, helper processes can still start with an outdated configured
PYTHONWpath. That behavior is not Kaldi-specific, so the fix belongs in shared runtime and path handling rather than in the installer PR.This change also makes user-directory resolution explicit and consistent, which reduces path failures when optional settings entries such as
BASE_PATH,USER_DIR, orSM_BRINGME_PATHare missing.How Has This Been Tested
python -m py_compile castervoice/lib/settings.py castervoice/asynch/hmc/h_launch.py castervoice/asynch/hud_support.py castervoice/lib/navigation.py castervoice/rules/ccr/recording_rules/bringme.py tests/lib/test_settings.pypython -m unittest tests.lib.test_settingsTypes of changes
Checklist
Maintainer/Reviewer Checklist
Note
Medium Risk
Moderate risk because it changes how multiple helper subprocesses (HUD, HMC, mouse grids) are launched and how the user directory is resolved, which could affect startup on different Windows/venv setups.
Overview
Fixes helper-process launching to always use the current runtime’s hidden-console Python binary via
settings.runtime_hidden_console_binary()instead of relying on a potentially stalepaths.PYTHONWvalue.Centralizes user-directory resolution in
settings.detected_user_dir(), removesPYTHONWfrom default settings generation, and hardensbringmepath derivation to safely fall back whenBASE_PATH,USER_DIR,TERMINAL_PATH, orSM_BRINGME_PATHare missing.Adds unit tests covering the new runtime binary selection and user-dir detection behavior.
Reviewed by Cursor Bugbot for commit 8dc8993. Bugbot is set up for automated code reviews on this repo. Configure here.