Skip to content

Keep redacted loader entries out of server hydration data - #10599

Merged
tim-smart merged 4 commits into
agent/architect/dda317b8e7e4from
agent/bob/3285087ef58b
Nov 13, 2026
Merged

tim-smart merged 4 commits into
agent/architect/dda317b8e7e4from
agent/bob/3285087ef58b

Conversation

@tim-smart

Copy link
Copy Markdown
Contributor

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 holdsRedacted commit (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 check
  • pnpm lint-fix and pnpm lint
  • pnpm jsdocs --check

Closes EFF-3763

… 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.
@changeset-bot

changeset-bot Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 48a16cc

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes changesets to release 35 packages
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

tim-smart added a commit that referenced this pull request Nov 13, 2026
…same helper

Same walk as the previous commit, from 48a16cc on PR #10599, which also
corrects redactAST's doc.
@tim-smart
tim-smart merged commit 4bfb0e9 into agent/architect/dda317b8e7e4 Nov 13, 2026
@tim-smart
tim-smart deleted the agent/bob/3285087ef58b branch November 13, 2026 10:27
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