Title: oracle-gaps: a mutant of an owner under a config whose root is a subdirectory fails with setup-error · Issue #101 · TanStack/oracles · GitHub
Open Graph Title: oracle-gaps: a mutant of an owner under a config whose root is a subdirectory fails with setup-error · Issue #101 · TanStack/oracles
X Title: oracle-gaps: a mutant of an owner under a config whose root is a subdirectory fails with setup-error · Issue #101 · TanStack/oracles
Description: Summary When a package's Vitest config sets root to a subdirectory, every mutant of an owner in that subdirectory fails with setup-error, and the report says Cannot find module '/.oracle-gaps-
Open Graph Description: Summary When a package's Vitest config sets root to a subdirectory, every mutant of an owner in that subdirectory fails with setup-error, and the report says Cannot find module '/.oracle-gaps-
X Description: Summary When a package's Vitest config sets root to a subdirectory, every mutant of an owner in that subdirectory fails with setup-error, and the report says Cannot find module '/.oracle-ga...
Opengraph URL: https://github.com/TanStack/oracles/issues/101
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"oracle-gaps: a mutant of an owner under a config whose root is a subdirectory fails with setup-error","articleBody":"## Summary\n\nWhen a package's Vitest config sets `root` to a subdirectory, every mutant of an owner in that subdirectory fails with `setup-error`, and the report says `Cannot find module '/.oracle-gaps-\u003cpid>-\u003cn>-\u003cname>.property.test.mjs'`. The gap CLI's batch copy of the owner is resolved against the config root, not the package, so the copy's module id loses its directory.\n\n## Reproduction\n\nIn `packages/oracles`, with the repository's own `oracle-gaps/vitest.config.mjs` (its `root` is `dirname(import.meta.url)`, that is the `oracle-gaps/` directory):\n\n```sh\ncd packages/oracles\nnode oracle-gaps/index.mjs --package . --config oracle-gaps/vitest.config.mjs \\\n --source oracle-gaps/contexts.mjs --only oracle-gaps/contexts.mjs:M1 --contexts 1 --out /tmp/gap-repro\n```\n\nOutput (abridged):\n\n```\noracle-gaps: gap setup-error L28 oracle-gaps/contexts.mjs:M1 ...\n - Detail: Cannot find module '/.oracle-gaps-56182-1-gap-report-contexts-oracle.property.test.mjs'\n```\n\nEvery mutant of `contexts.mjs` fails the same way, so none is judged.\n\nDiagnosis: `runBatch` builds the copy path with `join(dirname(item.file), ...)`, and `item.file` is absolute and correct. The copy id that Vitest then loads is root-relative (`/…`), and the wrapper plugin's `resolveId` does not map it back. Changing only the config's `root` to the package directory (with `include: ['oracle-gaps/*.property.test.mjs']`) makes the same mutant run to a verdict (`crashed`, `TypeError: swap is not a function`), so the copy resolution is the cause.\n\n## Impact\n\nAny project whose Vitest config sets `root` to a subdirectory gets a setup-error for every mutant of an owner under that directory. The gap report judges none of them.\n\n## Notes\n\n- Not a test-only problem: it reproduces with the `--config` a user passes, not only the repo's own oracle-gaps config.\n- Workaround used for measurement only: a scratch config with `root` set to the package directory. Not merged.\n- Observed alongside: a run without `--only` runs every oracle file of the package, including the 30-minute e2e owner.\n\nFound while building the batch-runner oracle (TanStack/oracles, branch `test/oracle-gaps-batch-runner-r2`).\n","author":{"url":"https://github.com/KyleAMathews","@type":"Person","name":"KyleAMathews"},"datePublished":"2026-11-15T07:16:17Z","url":"https://github.com/TanStack/oracles/issues/101"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:d8ee09d2-f072-acf4-3566-bbd50a7dc2db |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8C04:333850:2718DE1:337AF2D:6AF9AA9A |
| html-safe-nonce | 88c970de46c34103879604e514a0c2c44a4afff06b66ad7dfa5598bd937fe8b0 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QzA0OjMzMzg1MDoyNzE4REUxOjMzN0FGMkQ6NkFGOUFBOUEiLCJ2aXNpdG9yX2lkIjoiMzY3MjM0NjYwNzgxNTg2MjkzOCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 06a154cfd7f3b057536a180486233a680ac490804cd868e8ed0b16230004973a |
| hovercard-subject-tag | issue:6401236137 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/TanStack/oracles/101/issue_layout |
| twitter:image | https://opengraph.githubassets.com/8d4d03bfd0a1771745f2a970ab71f464e844153fa9595b2bc365a56b894203cb/TanStack/oracles/issues/101 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/8d4d03bfd0a1771745f2a970ab71f464e844153fa9595b2bc365a56b894203cb/TanStack/oracles/issues/101 |
| og:image:alt | Summary When a package's Vitest config sets root to a subdirectory, every mutant of an owner in that subdirectory fails with setup-error, and the report says Cannot find module '/.oracle-gaps- |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | KyleAMathews |
| hostname | github.com |
| expected-hostname | github.com |
| None | 612d3e6ffd693e7ea8d9fcf452370995872baef31d825b1fedef704cd3d24ac7 |
| turbo-cache-control | no-preview |
| go-import | github.com/TanStack/oracles git https://github.com/TanStack/oracles.git |
| octolytics-dimension-user_id | 72518640 |
| octolytics-dimension-user_login | TanStack |
| octolytics-dimension-repository_id | 1443546044 |
| octolytics-dimension-repository_nwo | TanStack/oracles |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1443546044 |
| octolytics-dimension-repository_network_root_nwo | TanStack/oracles |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 072e34035c13c31543fba9f025cbbbda4210dae4 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width