Files
KArtSell.Aegis/docs/CURRENT/V13-FE-021_FORM_CONTRACT_AUDIT_NOTE.md
T
kjh2064 3f293d8aa8
deploy / deploy (push) Successful in 1m52s
deploy / notify (push) Successful in 1s
V13-FE-006: consolidate approved UI and contract hardening
2026-08-13 02:41:00 +09:00

28 lines
1.7 KiB
Markdown

# 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`.