fix(start-client-core): safely serialize Standard Schema validation issues
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 15.1k
- Forks
- 1.9k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 143
Description
Problem
Standard Schema validators can return issue objects that cannot be serialized with JSON.stringify. This hides the original validation failure.
The same raw serialization pattern exists in server-function validation and router search validation.
Scope
Create a shared internal formatter for Standard Schema issues and use it in both paths.
The formatter must:
- Preserve issue messages.
- Handle root and nested paths without ambiguous dot-path collisions.
- Safely handle prototype-named keys such as
__proto__. - Avoid adding a public
router-coreexport unless there is a supported external use case.
Tests
- Add unit coverage for root issues, nested paths, numeric keys, special property names, and non-serializable issue objects.
- Add E2E coverage for server-function validation using multiple Standard Schema-compatible libraries, as requested in #3708.
- Verify router search validation uses the same safe formatting behavior.
- Run the relevant React Start bundle-size scenario.
Documentation
Review and update the validator documentation to describe Standard Schema compatibility and the resulting validation-error behavior where user-facing.
Related work
Supersedes stale #3708 which should be updated for the current validation architecture and cover both server-function and router search validation.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the raw JSON.stringify paths in server-function validation and router search validation, then review the current validation tests and the stale #3708 requirements. Add coverage for root and nested paths, numeric and special property names, and non-serializable issues, plus the requested server-function E2E cases. Done means both validation paths share safe formatting, user-facing validator documentation is updated, and the relevant React Start bundle-size scenario passes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- backend-api-design, documentation, testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100