Repository navigation
test(python): assert the interpreter the analysis recorded, not a second probe - #310
Merged
adityankale190895 merged 1 commit intoNov 18, 2026
Merged
Conversation
…ond probe The end-to-end Python test probed for an interpreter itself at module load and pinned the planned command to that result, while the adapter probed again in the fixture directory. On Windows a slow or flaky python3 alias can make the two probes disagree (python3 vs python), failing the test though the planned command is valid (DiffCI#304). The test now reads graph.profile.pythonInterpreter, the interpreter the adapter analysed with, checks it is one of the adapter's exported PYTHON_INTERPRETER_CANDIDATES, and asserts the plan runs pytest with it. It also checks a recorded py -3 launcher reaches the planned command. The module-level probe only decides whether to skip. Fixes DiffCI#304 Signed-off-by: FredApps <[email protected]>
FredApps
marked this pull request as ready for review
November 18, 2026 00:55
FredApps
added a commit
to FredApps/core
that referenced
this pull request
Nov 18, 2026
, fixed by DiffCI#310) Signed-off-by: FredApps <[email protected]>
adityankale190895
pushed a commit
that referenced
this pull request
Nov 18, 2026
* fix(maven): ignore XML comments when reading a POM parsePom read tags with regular expressions over the raw XML, comments included. A commented-out <artifactId> before the real one became the module's identity, so dependent modules no longer linked to it and a change to it selected only its own tests. A commented-out <sourceDirectory> also triggered the custom source roots fallback. Signed-off-by: FredApps <[email protected]> * fix(maven): strip POM comments without a regex replace CodeQL flagged the comment-stripping replace as incomplete multi-character sanitization. A single left-to-right pass removes the same comments and keeps an unterminated one, as before. Signed-off-by: FredApps <[email protected]> * test: add the SPDX licence header to the new test file Signed-off-by: FredApps <[email protected]> * chore: move the release-files.json entry so it merges cleanly with #211 and #253 The manifest is an unordered set, and the PRs listed above add their entries at the same line. Moving this entry one line away lets them merge in either order without a conflict. Signed-off-by: FredApps <[email protected]> * ci: re-run checks after the Windows Python interpreter flake (#304, fixed by #310) Signed-off-by: FredApps <[email protected]> --------- Signed-off-by: FredApps <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #304
The end-to-end test in
tests/repo/python-adapter.test.tsprobed for an interpreter itself at module load (pythonInterpreter(process.cwd())) and pinned the planned pytest command to that result. The adapter probed separately in the fixture directory. On a Windows runner, a slow or flakypython3alias can make the two probes disagree (python3vspython). The test then fails even though the planned command is valid.Change: the test now uses the adapter's own result instead of a second probe.
graph.profile.pythonInterpreter, the interpreter the adapter ran the import analysis with. The test already asserts there are no adapter blockers, so that interpreter is known to work.src/repo/adapters/python.tsnow exports them asPYTHON_INTERPRETER_CANDIDATES, andpythonInterpreter()loops over that list, so its behavior is unchanged.<interpreter> -m pytest …with that recorded interpreter.py -3planspy -3 -m pytest …. This case runs the same on every OS.The docblock on
pythonInterpreter()notes that every call probes again, so callers should use the recorded interpreter.Local checks:
npm run typecheck,npm run build,npm run audit:boundaryandnpm run agent:checknpm test: 1167 passnpm run buildandnpm run package:checkBoth changed files are already in
release-files.json. No Rust-adapter files are touched.