[TUI] One unreadable profile file blinds kept_key(): strata launch silently mints a NEW API key
Los mantenedores suelen responder en 3 días
@Nyarlathoteppppp ya está trabajando en esto.
Desde el 29/10/2026.
- #4563 de @Nyarlathoteppppp — abierto
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 72/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- python
- Área
- authentication, cli
Línea de trabajo
Empieza en kept_key() en strata_cli/launch/access.py (alrededor de la línea 342), donde el bucle lee row["source_config"] y el catch-all de alrededor de la línea 352 devuelve None. Revisa cómo profiles.list_profiles() en strata_cli/profiles.py (alrededor de las líneas 178-179) construye filas de error sin esa clave, y compáralo con el .get("source_config") defensivo de updater.py:718. Está terminado cuando un archivo de perfil dañado solo afecta a su propia fila y la clave existente sigue devolviéndose cuando otro perfil contiene api_key.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Problem: kept_key() (strata_cli/launch/access.py:342) indexes row["source_config"] for every launch profile, but profiles.list_profiles() returns {"id", "error"} rows — without that key — for every profile file that fails to load (strata_cli/profiles.py:178-179). The KeyError is swallowed by the catch-all at access.py:352 (except Exception: return None), so the WHOLE key lookup dies, not just the bad row. apply_defaults then does s.api_key = kept or access.new_key() — exactly what the function's own docstring exists to prevent ("the key an earlier launch already made, so a restart does not invalidate the apps set up with it"). Note updater.py:718 reads the same rows defensively with .get("source_config") — this loop does not.
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 at function level): three launch profiles, one damaged (echo 'NOT JSON' > ~/.config/strata/profiles/launch-bad.json), another carrying api_key in its run config: kept_key() returned None; after deleting only the damaged file it returned the stored key. End-to-end: strata launch --preset <existing> --access lan --no-tui would mint a fresh key (not run here: it would download; the branch is measured).
Expected: a damaged or foreign profile costs at most its own row; the existing key is kept.
Actual: the lookup dies, a new key is minted, and every app configured with the old key gets 401 until someone re-runs strata launch --show-key.
Reproduction status: measured at function level; end-to-end untested.
- Lenguaje dominante
- C++
- Estrellas
- 11.6k
- Forks
- 1k
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de Niko1221/Strata
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 3 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
Los mantenedores suelen responder en 3 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 3 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
Los mantenedores suelen responder en 3 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 3 días
Todos los issues de Niko1221/Strata
Issues similares
-
bug priority: low
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
chipsalliance/verible#2644 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
grafana/pyroscope-dotnet#470 ·
Los mantenedores suelen responder en 1 día
-
documentation P5 XS
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
open-astro/AlpacaBridge#1848 ·
Los mantenedores suelen responder en 1 día
-
DiskANN AnnIterator returns unconverted IP distances after the graph walk runs out of candidatesAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
zilliztech/knowhere#1933 ·
Los mantenedores suelen responder en 1 día