Repository navigation
fix(impact): treat modelled Python files as code when resolving readers - #257
Merged
adityankale190895 merged 3 commits intoNov 18, 2026
Merged
Conversation
resolveByReference passed isSourceFilePath as isCodeFile, which does not include .py. A pytest test that reads a changed data file was therefore followed as a script; nothing names a test file, so the change selected no tests and did not fall back. Python files the adapter modelled now count as code, so the reading test is selected, and a helper that reads the file selects the tests that import it. Signed-off-by: FredApps <[email protected]>
FredApps
commented
Nov 17, 2026
FredApps
left a comment
Contributor
Author
There was a problem hiding this comment.
Cross-review of ad167c9.
Checked:
- The fix matches #255. A
.pyfile that the Python adapter modelled (profile.pythonSources) is now code forresolveFileReferences, so the chain ends at the pytest test that reads the data file, or at the module a test imports, instead of being followed as a script..pyfiles the adapter did not model keep the old behaviour. - The new test fails with
src/reverted (2 of 3 fail) and passes with the fix.tests/repo/python-test-file-readers.test.tsis listed inrelease-files.json. The commit is DCO-signed. The branch is level with main. CI is green.
Fixed: nothing.
Still open: none.
…ffCI#205, DiffCI#207 and DiffCI#209 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]>
FredApps
added a commit
to FredApps/core
that referenced
this pull request
Nov 18, 2026
…ffCI#205, DiffCI#209 and DiffCI#257 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]>
FredApps
added a commit
to FredApps/core
that referenced
this pull request
Nov 18, 2026
…ffCI#205, DiffCI#207 and DiffCI#257 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]>
…iffCI#302) Signed-off-by: FredApps <[email protected]>
FredApps
marked this pull request as ready for review
November 18, 2026 01:20
adityankale190895
pushed a commit
that referenced
this pull request
Nov 18, 2026
* fix(python): follow pytest plugins that addopts loads with -p readPytestSettings never read addopts, so a first-party plugin loaded with `addopts = -p myplugin` had no importer in the graph and a change to it selected no tests. Every test now depends on each -p plugin that resolves in the repository; an unresolved first-party plugin falls back. A triple-quoted pyproject.toml value, which the reader would take as an empty string, now marks the key unreadable. Signed-off-by: FredApps <[email protected]> * fix(python): read multi-line pyproject.toml strings instead of falling back A triple-quoted addopts (or other key) in pyproject.toml now has its contents read, so a repository with a multi-line addopts keeps selective runs. Only an unterminated multi-line string still makes the analysis fall back. Signed-off-by: FredApps <[email protected]> * chore: drop a stray node_modules link from the previous commit Signed-off-by: FredApps <[email protected]> * chore: move the release-files.json entry so it merges cleanly with #205, #209 and #257 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]> --------- Signed-off-by: FredApps <[email protected]>
adityankale190895
pushed a commit
that referenced
this pull request
Nov 18, 2026
* fix(python): expand wildcards in pytest testpaths pytest expands each testpaths entry with glob.iglob(entry, recursive=True). isPytestFile compared entries as literal directory prefixes, so with testpaths = ["tests", "pkgs/*/tests"] the tests under pkgs/*/tests were not test files, and a change they cover selected nothing. Signed-off-by: FredApps <[email protected]> * chore: move the release-files.json entry so it merges cleanly with #205, #207 and #257 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]> --------- 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 #255
resolveByReferencenow treats the.pyfiles the Python adapter modelled (profile.pythonSources) as code. A pytest test that reads the changed file is selected, and a module that reads it selects the tests that import it..pyfiles outside the model are still followed as scripts. A file nothing reads still falls back.Validation:
tests/repo/python-test-file-readers.test.ts: two cases fail onmainand pass here. The no-reader fallback case passes on both.npm run typecheck,npm test(1170 pass),npm run build,npm run audit:boundary.