Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[TUI] running_launches(): prof is read outside the try that binds it — traceback, or the wrong launch's config

Open Beginner friendly
#4,395 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 3 days

@Nyarlathoteppppp is already working on this.

Since Oct 29, 2026.

  • #4562 by @Nyarlathoteppppp — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
66/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
cli

Research direction

The bug is in running_launches() in strata_cli/launch/cmd.py, lines 612-620: prof is bound only inside the try, but line 620 reads prof.get("source_config") after it. Start there, then reproduce by stubbing runtime.status to ready with one profile whose overrides.port is a string, which should raise UnboundLocalError. Done means a damaged profile costs only its own row, and a later bad row no longer inherits the previous profile's source_config.

Written by the indexing model from the issue text.

Description

Problem: in strata_cli/launch/cmd.py:612-619, prof is bound inside the try and the except sets only ov = {} — but line 620 reads prof.get("source_config") AFTER the try, unguarded. If profiles.load() raises for a profile whose RUNTIME state is ready/starting (status comes from the runtime state file, independent of the profile file): the first such row raises UnboundLocalError — a NameError, not a ValueError — which escapes both run_launch's handlers and _run's (ValueError/BrokenPipeError/OSError/ClientError/KeyboardInterrupt) → raw traceback from strata launch --status, --show-key, connect. On a LATER bad row, prof still holds the PREVIOUS profile's dict, so the row reports another launch's source_config — and launch_info() reads the API key from that wrong config.

Environment:
Strata Version: 0.2.7 (source checkout at tag v0.2.7, commit 5e8a4cca; the file discussed is byte-identical to the tag)
OS: Linux x86-64
Runtime: Python 3.14
Reported from the Strata-Mnemosyne fork's merged tree; the offending code is upstream's own.

Reproduce (measured): with runtime.status stubbed to ready and exactly one profile present whose overrides are invalid (e.g. overrides.port as a string — profiles are owner-editable by design, and validate_overrides demands int): UnboundLocalError: cannot access local variable 'prof' where it is not associated with a value.

Expected: one damaged profile costs at most that row (or a clean one-line error).
Actual: traceback, or another launch's config reported for this row.

Reproduction status: crash measured at function level; the mis-attribution case read from the code. An AST sweep of strata_cli/ + strata_control/ (~34k lines) for this try-binding pattern found this as the only hit in scope.

Dominant language
C++
Stars
11.6k
Forks
1k
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Niko1221/Strata

All issues in Niko1221/Strata

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.