Repository navigation
Keep redacted loader entries out of server hydration data - #10599
Merged
Merged
Conversation
… history stateCodecOf treats a component whose Model or loader slots Schema holds a Schema.Redacted as unserialisable: it encodes and decodes nothing, so the server defers the instance (and warns once per component), history keeps no entry for it, and stored state isn't adopted.
|
| Name | Type |
|---|---|
| effect | Patch |
| @effect/opentelemetry | Patch |
| @effect/vitest | Patch |
| @effect/ai-amazon-bedrock | Patch |
| @effect/ai-anthropic | Patch |
| @effect/ai-cloudflare | Patch |
| @effect/ai-openai-compat | Patch |
| @effect/ai-openai | Patch |
| @effect/ai-openrouter | Patch |
| @effect/ai-typesafe | Patch |
| @effect/atom-react | Patch |
| @effect/atom-solid | Patch |
| @effect/atom-vue | Patch |
| @effect/platform-browser | Patch |
| @effect/platform-bun | Patch |
| @effect/platform-cloudflare | Patch |
| @effect/platform-deno | Patch |
| @effect/platform-node-shared | Patch |
| @effect/platform-node | Patch |
| @effect/sql-clickhouse | Patch |
| @effect/sql-d1 | Patch |
| @effect/sql-libsql | Patch |
| @effect/sql-mssql | Patch |
| @effect/sql-mysql2 | Patch |
| @effect/sql-pg | Patch |
| @effect/sql-pglite | Patch |
| @effect/sql-sqlite-bun | Patch |
| @effect/sql-sqlite-do | Patch |
| @effect/sql-sqlite-node | Patch |
| @effect/sql-sqlite-react-native | Patch |
| @effect/sql-sqlite-wasm | Patch |
| @effect/docgen | Patch |
| @effect/doctest | Patch |
| @effect/graphql-generator | Patch |
| @effect/openapi-generator | Patch |
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
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.
Fix
Exclude loader cache entries from server dehydration when their args, success or error Schema holds
Schema.Redacted. The check is static, so absent optional secrets and successful reads with a redacted error schema are excluded too. Ordinary entries retain normal hydration.The regression first reproduced args, success and error secrets in
~loader. It now checks the complete serialized page state and HTML, including keyed reads, and verifies that the client fetches all six omitted entries. Existing non-redacted hydration coverage still passes. API docs and the existing loader changeset describe the rule. The spec addendum is delivered on EFF-3763; Nelson will fold it into EFF-3762’s consolidated draft.Dependencies and review
Targets the integration branch for #10483, not main. Includes Nelson’s shared
holdsRedactedcommit (3f797195a8) and component-state exclusion (e93b6dde91) from EFF-3762. Both boundaries are needed for full-page secrecy; this issue’s change is the final commit. The dependency commits can drop from this diff once EFF-3762 integrates.Validation
Through
nix develop -c:pnpm test --run packages/effect/test/ui packages/effect/test/reactivity/Loader.test.ts packages/effect/test/reactivity/LoaderHydration.test.ts: 604 tests passed.pnpm checkpnpm lint-fixandpnpm lintpnpm jsdocs --checkCloses EFF-3763