- GET /api/lab/result: Starlette's JSONResponse uses allow_nan=False,
so NaN/Infinity floats from simulation output cause a ValueError crash.
Add _sanitize_floats() to replace non-finite floats with null before
returning. Also wrap json.load in try/except for better error reporting.
- POST /api/lab/precons/install-batch: Frontend sends {"names": [...]}
but backend expected {"fileNames": [...]}. Accept both field names.
- POST /api/lab/precons/install: Same mismatch — frontend sends {"name"}
but backend expected {"fileName"}. Accept both field names.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>