Python adapter test: interpreter probed twice can disagree on Windows (python3 vs python), failing CI at random
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 78/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- github-actions, python, typescript
- Área
- ci-cd, testing-qa
Línea de trabajo
Empieza por tests/repo/python-adapter.test.ts, especialmente por la aserción del intérprete alrededor de la línea 111; después, lee src/repo/adapters/python.ts y la configuración del intérprete en la prueba alrededor de la línea 70. Ejecuta la prueba del adaptador de Python y comprueba que compara con el intérprete registrado durante el análisis o que, en su defecto, tolera distintos lanzadores de Python 3 según el directorio de trabajo. El objetivo se cumple cuando el error de Windows ya no depende de dos consultas de intérprete independientes.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
tests/repo/python-adapter.test.ts ("selects the pytest files a change reaches and runs them with the interpreter it found") failed once on check (windows-latest, 24) for the docs-only PR #291 (run 44200296961, job 134452346206). The other three check jobs in that run passed:
AssertionError [ERR_ASSERTION]: Expected values to be strictly deep-equal:
+ executable: 'python3'
- executable: 'python'
at TestContext.<anonymous> (D:\a\core\core\tests\repo\python-adapter.test.ts:111:14)
Why it can disagree. The test and the adapter each probe for an interpreter, in different directories and at different times:
- The test computes the expected interpreter once at module load:
const interpreter = pythonInterpreter(process.cwd());(L70). - The adapter calls
pythonInterpreter()again, with the fixture's temp directory ascwd, when it builds the graph. pythonInterpreter()(src/repo/adapters/python.tsL74) triespython3, thenpython, thenpy -3, each with a 10 sspawnSynctimeout, and takes the first that prints3.
On Windows runners, python3 is often the App Execution Alias stub or a slow first start. One probe can fail or time out on python3 and fall through to python, while the next probe succeeds with python3. The command the adapter writes is valid either way, but the assertion pins the test's own probe result.
This is not the known Rust temp-dir EBUSY/EPERM flake (#235); the failing test and the error are different. Recent Windows failures on other PRs were all the Rust one, so this looks rare.
Expected: the test asserts the interpreter the analysis recorded (or any working Python 3 launcher), not a second independent probe. Alternatively, pythonInterpreter() gives the same answer for the whole process, so one run cannot get two different interpreters.
- Lenguaje dominante
- TypeScript
- Estrellas
- 0
- Forks
- 4
- Merge medio
- 18 h 41 min
- PR fusionados (30 d)
- 48
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
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 DiffCI/core
-
Planner: splitParts regex is quadratic on a quote followed by many backticks, so the fuzz test fails at randomPosiblemente ocupada @FredApps la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
Los mantenedores suelen responder en 1 día
-
Agent tools: changed_files lists only the new path of a renamed filePosiblemente ocupada @FredApps la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
DiffCI/core#243 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
adapter good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día
-
adapter bug good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día
Todos los issues de DiffCI/core
Issues similares
-
agent-ready area: ui-server priority: p3 type: test
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
schlessera/brain-kit#4249 ·
Los mantenedores suelen responder en 1 día
-
documentation tool triaged
Dificultad 2/5 1-3 horas Aptitud para principiantes 73/100
can1357/oh-my-pi#19608 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
dependencies tech-debt
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
bcgov/nr-waste-plus#1549 ·
Los mantenedores suelen responder en 1 día
-
enhancement good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
blixvip/solana-token-meta#17 ·
-
enhancement good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
blixvip/solana-tx-parse#18 ·