Opus
`backfill-benchmark-flag.ts` script detection of direct execution is fragile under compiled / symlinked runs
- apps/web/scripts/backfill-benchmark-flag.ts:196-204
The guard string-matches the `.ts` filename. If the script is ever compiled to `.js` (via tsc/esbuild) and run as e.g. `node dist/scripts/backfill-benchmark-flag.js`, the guard will not fire and main() will not run. Conversely, any other path ending in that exact filename (e.g. test fixtures named identically) would trigger main() during import. Since vitest config includes `**/*.test.ts` only, tests are safe today, but the heuristic is brittle.
Recommendation
Use `import.meta.url` compared against `pathToFileURL(process.argv[1]).href` for a robust entrypoint check, or invert: have a separate thin bin script that calls into the exported main().