[PR #4562] [TUI] running_launches: an unreadable launch profile no longer reports the previous launch's config #5088

Open
opened 2026-11-07 16:32:36 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/4562
Author: @Nyarlathoteppppp
Created: 10/29/2026
Status: 🔄 Open

Base: main ← Head: fix/4395-running-launches-prof


📝 Commits (1)

  • 4bef7cb launch: a running launch whose profile cannot be read reports no config instead of the previous launch's (#4395)

📊 Changes

2 files changed (+30 additions, -0 deletions)

View changed files

📝 strata_cli/launch/cmd.py (+1 -0)
📝 tests/terminal/test_dsv41_tui_items.py (+29 -0)

📄 Description

Problem and result

running_launches() in strata_cli/launch/cmd.py binds prof inside the try that loads a launch profile, but reads prof.get("source_config") after it. When profiles.load() raises for a ready/starting launch:

  • if it is the first such row: UnboundLocalError;
  • if an earlier row loaded: the failing row reports the previous launch's source_config (and that config's key downstream).

After the change the unreadable row reports config: None with the default port and host, like it already did for overrides.

Fixes #4395. Focused fix, no scope change.

Approach

Set prof = {} in the same except branch that sets ov = {}. One line; nothing else changes.

Validation

Passed:

  • python -m pytest tests/terminal/test_dsv41_tui_items.py -k RunningLaunches: the two new tests (failed load on the only row; failed load after a good row) fail on 46c152a (UnboundLocalError / inherited config) and pass with the fix.
  • python -m pytest tests/terminal/test_launch.py tests/terminal/test_launch_dsv41.py tests/terminal/test_tui_stress.py tests/terminal/test_tui_stress_launch.py tests/terminal/test_dsv41_tui_items.py tests/terminal/test_dsv41_engine.py tests/terminal/test_launch_show_key_setup.py: 204 passed, 5 failed. The same 5 fail on 46c152a without this change (202 passed).
  • Environment: macOS 26 (Darwin 25.5) arm64, Apple M1 Pro, Python 3.14.7 venv with requirements.txt + pytest, base 46c152a.

Failed:
none observed beyond the 5 pre-existing failures above.

Not run:
full test suite, Windows/Linux, a real launch with a damaged profile file.

Limits

none known.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/4562 **Author:** [@Nyarlathoteppppp](https://github.com/Nyarlathoteppppp) **Created:** 10/29/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/4395-running-launches-prof` --- ### 📝 Commits (1) - [`4bef7cb`](https://github.com/Niko1221/Strata/commit/4bef7cbfe760042301eebfa005fac8f43ecce54a) launch: a running launch whose profile cannot be read reports no config instead of the previous launch's (#4395) ### 📊 Changes **2 files changed** (+30 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `strata_cli/launch/cmd.py` (+1 -0) 📝 `tests/terminal/test_dsv41_tui_items.py` (+29 -0) </details> ### 📄 Description ## Problem and result `running_launches()` in `strata_cli/launch/cmd.py` binds `prof` inside the `try` that loads a launch profile, but reads `prof.get("source_config")` after it. When `profiles.load()` raises for a ready/starting launch: - if it is the first such row: `UnboundLocalError`; - if an earlier row loaded: the failing row reports the **previous** launch's `source_config` (and that config's key downstream). After the change the unreadable row reports `config: None` with the default port and host, like it already did for `overrides`. ## Related discussion Fixes #4395. Focused fix, no scope change. ## Approach Set `prof = {}` in the same `except` branch that sets `ov = {}`. One line; nothing else changes. ## Validation **Passed:** - `python -m pytest tests/terminal/test_dsv41_tui_items.py -k RunningLaunches`: the two new tests (failed load on the only row; failed load after a good row) fail on `46c152a` (UnboundLocalError / inherited config) and pass with the fix. - `python -m pytest tests/terminal/test_launch.py tests/terminal/test_launch_dsv41.py tests/terminal/test_tui_stress.py tests/terminal/test_tui_stress_launch.py tests/terminal/test_dsv41_tui_items.py tests/terminal/test_dsv41_engine.py tests/terminal/test_launch_show_key_setup.py`: 204 passed, 5 failed. The same 5 fail on `46c152a` without this change (202 passed). - Environment: macOS 26 (Darwin 25.5) arm64, Apple M1 Pro, Python 3.14.7 venv with requirements.txt + pytest, base `46c152a`. **Failed:** none observed beyond the 5 pre-existing failures above. **Not run:** full test suite, Windows/Linux, a real launch with a damaged profile file. ## Limits none known. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#5088
No description provided.