Skip to content

[codex] Runtime launch and user-dir fixes#26

Open
kendonB wants to merge 3 commits intomasterfrom
runtime-launch-path-pr-20260331
Open

[codex] Runtime launch and user-dir fixes#26
kendonB wants to merge 3 commits intomasterfrom
runtime-launch-path-pr-20260331

Conversation

@kendonB
Copy link
Copy Markdown
Owner

@kendonB kendonB commented Mar 31, 2026

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.PYTHONW value from settings.toml, centralizes user-directory detection/reporting in settings.py, and makes bringme derive 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 PYTHONW path. 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, or SM_BRINGME_PATH are 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.py
  • python -m unittest tests.lib.test_settings

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue or bug)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Renamed existing command phrases (we discourage this without a strong rationale).

Checklist

  • I have read the CONTRIBUTING document.
  • My code follows the code style of this project.
  • I have checked that my code does not duplicate functionality elsewhere in Caster.
  • My code implements all the features I wish to merge in this pull request.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests pass.

Maintainer/Reviewer Checklist

  • Basic functionality has been tested and works as claimed.
  • New documentation is clear and complete.
  • Code is clear and readable.

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 stale paths.PYTHONW value.

Centralizes user-directory resolution in settings.detected_user_dir(), removes PYTHONW from default settings generation, and hardens bringme path derivation to safely fall back when BASE_PATH, USER_DIR, TERMINAL_PATH, or SM_BRINGME_PATH are 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.

@kendonB kendonB marked this pull request as ready for review March 31, 2026 06:19
@kendonB kendonB changed the title [codex] Split runtime launch and user-dir fixes from Kaldi changes [codex] Runtime launch and user-dir fixes Mar 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant