The code index now answers which tests a change can break. Send the files you changed, and OPVS walks its stored map of your repository back to the test files that reach them, with no checkout and nothing run.
What's new in v1.12.0
- One call lists the tests behind a file.
POST /api/v1/code/{project_id}/tests-fortakes up to 200 repo-relative paths and returns, for each one, the test files that reach it, nearest first, with how many steps away each test is and how it gets there. - Tests that read a file count too. A test can reach a file by importing it, or by naming it as a path it opens at run time, such as a fixture. Both kinds of link are followed, up to six steps deep.
- An unmeasured answer never reads as "no tests". A path the index does not know comes back marked unknown. When there is no ready index, or the index is partial, the answer lists the reason first, so a client knows to run everything instead.
- The same answer from the terminal.
opvs code tests-for --remote --project <id> <paths>in@opvs-ai/cli0.27.6 or later prints each file with its tests, or the raw answer with--json.
The route needs a token with the code:read scope and a GitHub repository attached to the project.
Read the reference at https://opvs.ai/docs/opvs/api/code-index and every release note at https://opvs.ai/changelog.