You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
chore(server): move or remove the manual smoke scripts under src/ #240
Two manual smoke scripts live inside the server's production source tree but are never imported by the app:
server/src/test-tracking.js — runs a prompt through the OpenAI Responses API (web_search) and the response parser.
server/src/test-volumes.js — exercises DataForSEO search-volume lookups and an ai/generateObject keyword step.
Both are run by hand (node src/test-tracking.js) and are not referenced anywhere — no import, no package.json script. A grep over server/src confirms nothing pulls them in.
Why it matters
They sit next to real application modules, so they read as part of the runtime — a contributor can't tell at a glance that they're throwaway smoke tests.
Each one calls live, paid third-party APIs (OpenAI, DataForSEO). Running them by accident costs money.
They blur the line the repo already draws between application code and tooling (server/src/scripts/ already exists, e.g. backfill-shopping-cards.js).
Suggested fix
Either is acceptable; moving is preferred because it keeps the scripts available for debugging and matches the existing layout:
Option A — Move (recommended). Relocate both into the existing server/src/scripts/ directory and wire them as explicit, named scripts:
Resolved — no code needed. Both manual smoke scripts were removed in #256 ("Resolves the remaining server-side gaps from #125", shipped in v0.1.4): server/src/test-tracking.js and server/src/test-volumes.js are gone from the source tree, and neither server/src nor server/src/scripts/ contains them anymore.
Rather than just relocating them, #256 replaced their purpose with proper mocked Vitest tests — server/src/lib/tracking-pipeline.test.js and server/src/lib/volumes-pipeline.test.js — which exercise the same tracking/volume pipelines with the third-party calls (OpenAI / DataForSEO) mocked, so they run in CI with no live, paid API calls. That removes the original concern (throwaway scripts next to runtime code that cost money if run by accident) entirely.
Activity
gkhngyk commentedon Jun 23, 2026
Resolved — no code needed. Both manual smoke scripts were removed in #256 ("Resolves the remaining server-side gaps from #125", shipped in v0.1.4):
server/src/test-tracking.jsandserver/src/test-volumes.jsare gone from the source tree, and neitherserver/srcnorserver/src/scripts/contains them anymore.Rather than just relocating them, #256 replaced their purpose with proper mocked Vitest tests —
server/src/lib/tracking-pipeline.test.jsandserver/src/lib/volumes-pipeline.test.js— which exercise the same tracking/volume pipelines with the third-party calls (OpenAI / DataForSEO) mocked, so they run in CI with no live, paid API calls. That removes the original concern (throwaway scripts next to runtime code that cost money if run by accident) entirely.Closing as completed.