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
Body-based variants of the compute operations that take in-memory input and return full results (no server-side files):
POST /plan — accept a WindDefinition JSON body → return the full PlanResultincluding the G-code commands (today's /plan/from-file returns only a count + a server path).
POST /simulate — accept {commands} or raw gcode → SimulationResult.
POST /validate — accept a WindDefinition body → ok/errors.
POST /plot (new — missing today) — accept {commands, scale} → PNG (render_plot(...).to_png_bytes()).
Why
The core is already fully model-based and in-memory (plan_wind(WindDefinition), simulate_program(lines), render_plot(lines).to_png_bytes()), so each route is ~5–10 lines of glue. The current /from-file shape is a remote/shared-filesystem assumption the desktop GUI doesn't need.
Acceptance
The GUI can plan/simulate/validate/preview entirely via request bodies; no temp files cross the boundary.
Plan-review verdict (2026-06-25): SIMPLIFY. Body-only. Delete /from-file (×3), /stream, and path_policy.py as explicit acceptance criteria — do not maintain a path-API and a body-API. Output uses the shared versioned schema #198 (kill the hand-rename DTOs at schemas.py:24-27). Decide /plan output: an artifact/job reference, not the 243k-line G-code inline.
Activity
CameronBrooks11 commentedon Jun 26, 2026
Plan-review verdict (2026-06-25): SIMPLIFY. Body-only. Delete
/from-file(×3),/stream, andpath_policy.pyas explicit acceptance criteria — do not maintain a path-API and a body-API. Output uses the shared versioned schema #198 (kill the hand-rename DTOs atschemas.py:24-27). Decide/planoutput: an artifact/job reference, not the 243k-line G-code inline.refactor(api): make compute routes body-only and add /plot (#201)