Title: fix(scripts): make the specifier audit path-separator agnostic by waleedlatif1 · Pull Request #6355 · simstudioai/sim · GitHub
Open Graph Title: fix(scripts): make the specifier audit path-separator agnostic by waleedlatif1 · Pull Request #6355 · simstudioai/sim
X Title: fix(scripts): make the specifier audit path-separator agnostic by waleedlatif1 · Pull Request #6355 · simstudioai/sim
Description: Summary Follow-up to #6351. Cursor Bugbot raised this on that PR after it had already merged, so it lands separately. isGeneratedPath split the repo-relative path on /, but path.relative returns backslashes on Windows — so .source and node_modules never matched a segment and generated output was treated as scannable source. The repo does support Windows development (scripts/setup/* branches on win32). The finding named one site; there were three isGeneratedPath — the reported one. isCompiledSource compared against 'apps/sim/scripts/' with the same assumption, so the test/script exclusions silently stopped applying. workspaceFor matched `${w.dir}/` against an absolute path. On Windows that never matches, dropping every file out of its own workspace — which disables tsconfig paths resolution entirely rather than erroring, so @/… specifiers would be reported as unverifiable instead of being checked. That is the worst of the three: a guard that quietly stops guarding. Changes All path comparisons go through a repoPath() helper that normalizes to /; workspaceFor uses path.sep against absolute paths. Reported paths use it too, so output is byte-identical on either platform. spec.split('/') is deliberately left alone — import specifiers are always /-separated regardless of host. Type of Change Bug fix Testing Simulated win32 separators through the same predicates: "apps\docs\.source\server.ts" -> generated: true "apps\sim\lib\x.ts" -> generated: false "packages\utils\node_modules\y.ts" -> generated: true scripts filter on "apps\sim\scripts" -> true posix behaviour unchanged: 37,437 first-party specifiers across 11,243 files still resolve clean biome check clean No Windows machine was available to run this end-to-end, so the verification is at the predicate level rather than a real win32 run. Checklist Code follows project style guidelines Self-reviewed my changes Relevant tests are passing No new warnings introduced
Open Graph Description: Summary Follow-up to #6351. Cursor Bugbot raised this on that PR after it had already merged, so it lands separately. isGeneratedPath split the repo-relative path on /, but path.relative returns ba...
X Description: Summary Follow-up to #6351. Cursor Bugbot raised this on that PR after it had already merged, so it lands separately. isGeneratedPath split the repo-relative path on /, but path.relative returns ba...
Opengraph URL: https://github.com/simstudioai/sim/pull/6355
X: @github
Domain: github.com
| 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 | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:476dab1a-da2d-28d5-27c6-555d3f13a2b6 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | C022:19FA2E:86B016:BF2E95:6AFB4DFF |
| html-safe-nonce | cdaa62c4d38866be59073e9213cf17cf9d360b690510f1669ee292c644016420 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMDIyOjE5RkEyRTo4NkIwMTY6QkYyRTk1OjZBRkI0REZGIiwidmlzaXRvcl9pZCI6IjUzMjM2MjcyMjA5MTA2ODk3OTEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | a0d9c7650a963c5bea23d1d874e4c408e8551d37b4638199bb1a6c9594cfcf11 |
| hovercard-subject-tag | pull_request:4224602484 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,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/simstudioai/sim/pull/6355/files |
| twitter:image | https://avatars.githubusercontent.com/u/40672544?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/40672544?s=400&v=4 |
| og:image:alt | Summary Follow-up to #6351. Cursor Bugbot raised this on that PR after it had already merged, so it lands separately. isGeneratedPath split the repo-relative path on /, but path.relative returns ba... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | acf7616d06cc051644705b379878c9bb13dc5e70ecf4ffd9b34140f8ac01d7e1 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/simstudioai/sim git https://github.com/simstudioai/sim.git |
| octolytics-dimension-user_id | 199344406 |
| octolytics-dimension-user_login | simstudioai |
| octolytics-dimension-repository_id | 912559512 |
| octolytics-dimension-repository_nwo | simstudioai/sim |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 912559512 |
| octolytics-dimension-repository_network_root_nwo | simstudioai/sim |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 26504db649b58525278f77a52b80ba5f10d5f4de |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width