mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #4563] [TUI] kept_key: skip unreadable profiles instead of minting a new API key #5087
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#5087
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/4563
Author: @Nyarlathoteppppp
Created: 10/29/2026
Status: 🔄 Open
Base:
main← Head:fix/4396-kept-key-bad-row📝 Commits (1)
5f202d7launch: one unreadable profile no longer hides the kept API key from the others (#4396)📊 Changes
2 files changed (+14 additions, -2 deletions)
View changed files
📝
strata_cli/launch/access.py(+5 -2)📝
tests/terminal/test_tui_stress.py(+9 -0)📄 Description
Problem and result
kept_key()instrata_cli/launch/access.pyfalls back to the newest launch profile that holds a key.profiles.list_profiles()returns{"id", "error"}for a profile it cannot read, and the loop indexesrow["source_config"]. TheKeyErrorescapes to the outerexcept Exception: return None, so one unreadable launch profile makes the whole lookup returnNoneandstrata launchmints a new API key, even when another launch profile has one.After the change, rows without
source_configare skipped and the other profiles are still searched.Related discussion
Fixes #4396. Focused fix, no scope change.
Approach
Read
row.get("source_config")once andcontinuewhen it is missing. The outer guard stays, so the lookup still never blocks a launch.Validation
Passed:
python -m pytest tests/terminal/test_tui_stress.py -k KeptKey: the new test (damaged row before and after a valid launch row, as subtests) fails on46c152a(returnsNone) and passes with the fix; whole file 12 passed.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: 203 passed, 5 failed. The same 5 fail on46c152awithout this change (202 passed).46c152a.Failed:
none observed beyond the 5 pre-existing failures above.
Not run:
full test suite, Windows/Linux, a real launch with an unreadable profile file.
Limits
none known.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.