# V13-FE-021 — Form contract audit ## Source / Assumption / Unknown / Decision Required - Source: `frontend/src/shared/crud/StandardCrudFormPage.vue`, `frontend/src/shared/ui/screen-types/v2/EditFormPage.vue`, `FormPageLayout.vue`, and `useOptimisticCommand.ts`. - Assumption: form rendering owns state/presentation; schema parsing and command idempotency belong at the feature submit boundary. - Unknown: approved standard Zod form adapter, 422 ProblemDetails field mapping, and per-form If-Match contract. - Decision Required: FE/BE/QA approval before introducing a shared form validation abstraction. ## Audit result - Existing form screens provide dirty/readonly state precedence, shared retry, submit event forwarding, and evidence version display. - Added `validateFormSubmission()` as an explicit feature submit-boundary helper; the generic form shell remains presentation-only. - The helper returns typed data or a stable summary plus field/form-level errors. - Added `mapProblemToFormFailure()` for server ProblemDetails `errors` without mutating the response. - Duplicate-submit protection and `Idempotency-Key`/`If-Match` forwarding exist in `useOptimisticCommand`, not in the generic form shell. - No new library or speculative abstraction was introduced because the approved form contract is missing. ## Evidence - `frontend/src/shared/ui/screen-types/tests/EditFormPage.spec.ts`: 1 file / 2 tests passed in the FE regression run. - `frontend/src/shared/crud/tests/useOptimisticCommand.spec.ts`: 1 file / 2 tests passed. - `frontend/src/shared/crud/tests/formValidation.spec.ts`: 1 file / 4 tests passed. ## Outstanding Feature-specific integration, 422 transport tests, and approved form workflow evidence remain outstanding. This WBS item remains `IN_PROGRESS`.