Repository navigation
Clarify runtime validation at trust and I/O boundaries - #12
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.