fix(build): move the persisted-replay research harness out of frontend/scripts; guard runtime sources against tests/ imports (BUG-1140)

The staging publish job built the web image without frontend/tests, and
next build type-checks every .ts under frontend/, so the harness importing
../tests/helpers/postgres-fixture.ts failed with TS2307. The harness depends
on the test fixture, so it now lives in frontend/tests/research; the Python
driver points there. A new test fails if src/ or scripts/ import tests/.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017eEAG8HD3mm8gsKXgk8uU8
This commit is contained in:
Jesse_Chen
2026-10-01 09:37:00 +08:00
co-authored by Claude Opus 5.5
parent 437dcecbf2
commit 96f83bb435
3 changed files with 53 additions and 16 deletions
@@ -58,7 +58,7 @@ def main() -> int:
thread.start()
try:
env = {**os.environ, "JYOTISH_API_BASE": origin}
result = subprocess.run(["node", "--import", "tsx", "scripts/rectification-segment-persisted-replay.ts"],
result = subprocess.run(["node", "--import", "tsx", "tests/research/rectification-segment-persisted-replay.ts"],
cwd=ROOT / "frontend", env=env, input=json.dumps({"rows": rows}),
text=True, encoding="utf-8", stdout=subprocess.PIPE, check=False)
payload = json.loads(result.stdout)