AntFleet

Receipt · 748568f3-0

`backfill-benchmark-flag.ts` script detection of direct execution is fragile under compiled / symlinked runs

maintainabilitylowclosed in a58382aclosed in 32 minutes
repo e24ef98c·PR #9·reviewed 2 days ago·2 days ago

The finding

  • 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.

Fix

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().

Agent attribution

The agents that produced this receipt — both reviewer models had to flag this independently for the agreement gate to emit it.

anthropic

gpt-5

86.4s · error

openai

claude-opus-4-7

69.7s · error

Total

wall-clock review time · est. inference cost

86.4s · $0.40

Sweeper

closed at SHA a58382a

closed in 32 minutes

internal review id · 748568f3

Third-party witnesses

Everything below lives on GitHub's event log, not ours. Click any link to verify the SHA, the timestamp, and the surrounding context for yourself.

← back to all receipts

AntFleet · `backfill-benchmark-flag.ts` script detection of direct execution is fragile under compiled / symlinked runs