Skip to content

Clarify runtime validation at trust and I/O boundaries - #12

Merged
jdeurt merged 1 commit into
mainfrom
docs/clarify-boundary-validation
Oct 20, 2026
Merged

jdeurt merged 1 commit into
mainfrom
docs/clarify-boundary-validation

Conversation

@jdeurt

@jdeurt jdeurt commented Oct 20, 2026

Copy link
Copy Markdown
Owner

Clarify style rule 4D so validation happens where runtime data enters a trust or I/O boundary. The guidance now explicitly covers network responses, database results (including raw queries and JSON columns), files/storage, and user input.

Treat a shape as unestablished even when a TypeScript annotation, cast, or generic return type claims otherwise. Use Zod Mini or checked control flow to establish the guarantees the consuming code needs. Distinguish JSON decoding from schema validation, and allow already validated values or trustworthy runtime guarantees to support internal use without redundant checks.

This changes only the style reference. ESLint configuration, runtime code, existing Zod Mini guidance, and rule 6F's cloning policy are preserved.

Validation: lint with zero warnings, strict types, formatting (including the authored style reference), import validation, build, generated-output consistency, 14 existing tests, publication dry-run, and both generated client copies of the updated reference. No new permanent tests.

@jdeurt
jdeurt merged commit 522e72b into main Oct 20, 2026
2 checks passed
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