Skip to content

Release 0.8.3: fix DOB-carrier enrollment (date_of_birth nulled on submit) - #107

Merged
fuhrysteve merged 1 commit into
masterfrom
release/0.8.3
Jul 29, 2026
Merged

Release 0.8.3: fix DOB-carrier enrollment (date_of_birth nulled on submit)#107
fuhrysteve merged 1 commit into
masterfrom
release/0.8.3

Conversation

@fuhrysteve

Copy link
Copy Markdown
Contributor

Release of 0.8.3. Single fix; dev PR is LakeEriePartners/stream-connect-js-sdk#8.

Fix: carriers that ask for Date of Birth could never be connected

A member connecting a carrier whose credential form includes a Date of Birth field — Medical Mutual and SimplePay Health — could not complete enrollment. Whatever they typed was discarded before the request left the browser, the backend rejected the submission as missing a required field (HTTP 422), and the form came back with a red validation error. No input format worked, because the value never reached the server.

EnterCredentials.onSubmit spread the carrier's form values and then re-pinned SDK-controlled fields on top, including date_of_birth: values.dateOfBirth || null. Carrier form values are keyed by their JSON-schema property name — date_of_birth, snake_case — so the camelCase lookup was always undefined and the || null overwrote the member's input.

That line was inherited from 0.7.x, which spread ...formData last so the member's value won. 0.8.0 inverted the spread order so carrier schemas can't clobber payer_id / accept / tenants_accept, which silently promoted a dead line into data loss. The re-pin is gone; the payer_id / consent guards are unchanged.

Date fields also render as a native date input now. Carrier schemas mark them {"type": "string", "format": "date"}, which 0.8.x rendered as a bare text box with no format hint even though the backend's WTForms DateField only parses ISO YYYY-MM-DD.

The React Native hook (stream-connect-sdk-hook) kept the 0.7.x spread order and was never affected.

Impact

Introduced in 0.8.0 (2026-05-17), so roughly ten weeks in the field. It stayed invisible because the backend only validates the onboard form when creating a new policy holder — reconnecting an existing one was unaffected.

Measured on Medical Mutual: new policy holders carrying a date of birth ran 100% Jan–Apr (6/6, 7/7, 7/7, 3/3), then fell to 0/3 in May, 6/59 in June, 2/57 in July — the cliff lands on the 0.8.0 release. 184 SDK submissions over the last 60 days across four customers were affected.

Verification

npm run test (biome + tsc) passes. The affected carriers' generated schemas were confirmed to emit date_of_birth: {type: "string", format: "date", required: true}, so the new date branch fires. Both spread orders were replayed against the real value shape to confirm the regression reproduces and the fix corrects it, with the payer_id guard intact.

Members could not connect any carrier whose credential form includes a
Date of Birth field (Medical Mutual, SimplePay Health). The value they
typed was discarded client-side, the backend rejected the submit as
missing a required field with a 422, and the form returned a red
validation error. No input format worked because the value never left
the browser.

EnterCredentials' onSubmit spread the carrier form values and then
re-pinned SDK-controlled fields on top, including
`date_of_birth: values.dateOfBirth || null`. Carrier form values are
keyed by their JSON-schema property name (`date_of_birth`), so the
camelCase lookup was always undefined and the `|| null` overwrote what
the member entered. The line came from 0.7.x, which spread `...formData`
LAST so the real value won; 0.8.0 inverted the order to stop carrier
schemas clobbering payer_id/accept/tenants_accept, which silently turned
this into data loss. Drop the re-pin -- `...values` already carries
date_of_birth -- and keep the payer_id/accept guards.

Also render `format: "date"` properties as a native date input. The
backend's WTForms DateField only parses ISO YYYY-MM-DD, and 0.8.x showed
a bare text box with no format hint.

The React Native hook kept the 0.7.x spread order and is unaffected.

Verified: Medical Mutual's generated schema emits
date_of_birth {type: string, format: date, required: true}; prod nginx
logs show POST /sdk-api/policy_holder_sdk/policy_holder returning 422 on
every attempt, with the view log recording date_of_birth: null on each.
New Medical Mutual policy holders carrying a DOB fell from 100%
(Jan-Apr) to 0/3 in May, 6/59 in June, 2/57 in July -- the cliff lands
on the 0.8.0 release.
@fuhrysteve
fuhrysteve merged commit 5ed8adc into master Jul 29, 2026
4 checks passed
@fuhrysteve
fuhrysteve deleted the release/0.8.3 branch July 29, 2026 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant