Problem
`electron/main.ts:validateRenderStartPayload` is the last line of defense for the render IPC contract, but it has no unit tests. Its boundary behavior (max dimensions, presets allowlist, parallelism clamp) regresses silently if someone refactors it.
Expected
- Extract `validateRenderStartPayload` (and its helpers) into a pure module that can be imported by Vitest.
- Cover: happy path, invalid encode, unknown preset, NaN / out-of-range numbers, workers above hardware parallelism.
Acceptance
- A new `electron/render-payload.test.ts` (or similar) is exercised by `npm test`.
- Tests pass on CI.
Problem
`electron/main.ts:validateRenderStartPayload` is the last line of defense for the render IPC contract, but it has no unit tests. Its boundary behavior (max dimensions, presets allowlist, parallelism clamp) regresses silently if someone refactors it.
Expected
Acceptance