Python adapter test: interpreter probed twice can disagree on Windows (python3 vs python), failing CI at random
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 2/5
- Temps estimé
- 1-3 heures
- Accessibilité débutants
- 78/100
- Type d'issue
- Bug
- Clarté
- Clairement spécifiée
- Activité
- Active
- Stack technique
- github-actions, python, typescript
- Domaine
- ci-cd, testing-qa
Piste de recherche
Commencez par tests/repo/python-adapter.test.ts, en particulier par l’assertion sur l’interpréteur autour de la ligne 111, puis lisez src/repo/adapters/python.ts et la configuration de l’interpréteur dans le test autour de la ligne 70. Exécutez le test de l’adaptateur Python et vérifiez qu’il compare avec l’interpréteur enregistré pendant l’analyse ou, à défaut, qu’il tolère différents lanceurs Python 3 selon le répertoire de travail. Le travail est terminé lorsque l’échec sous Windows ne dépend plus de deux sondages d’interpréteur distincts.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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.
- Langage dominant
- TypeScript
- Étoiles
- 0
- Forks
- 4
- Merge moyen
- 18 h 41 min
- PR mergées (30 j)
- 48
Préparer son environnement
Lance le conteneur de développement du projet dans votre navigateur, avec votre propre compte GitHub.
- Aucun Dockerfile ni fichier Docker Compose
- Aucun modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de DiffCI/core
-
Planner: splitParts regex is quadratic on a quote followed by many backticks, so the fuzz test fails at randomPeut-être pris @FredApps l’a pris aujourd’hui. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 86/100
Les mainteneurs répondent en général sous 1 jour
-
Agent tools: changed_files lists only the new path of a renamed filePeut-être pris @FredApps l’a pris aujourd’hui. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 88/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
DiffCI/core#243 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
adapter good first issue
Difficulté 2/5 1-3 heures Accessibilité débutants 88/100
Les mainteneurs répondent en général sous 1 jour
-
adapter bug good first issue
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de DiffCI/core
Issues similaires
-
agent-ready area: ui-server priority: p3 type: test
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
schlessera/brain-kit#4249 ·
Les mainteneurs répondent en général sous 1 jour
-
documentation tool triaged
Difficulté 2/5 1-3 heures Accessibilité débutants 73/100
can1357/oh-my-pi#19608 · 2 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
dependencies tech-debt
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
bcgov/nr-waste-plus#1549 ·
Les mainteneurs répondent en général sous 1 jour
-
enhancement good first issue
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
blixvip/solana-token-meta#17 ·
-
enhancement good first issue
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
blixvip/solana-tx-parse#18 ·