Skip to content

Fix metadata propagation for deduplicated nested caches - #98808

Merged
unstubbable merged 1 commit into
canaryfrom
hl/fix-nested-caches-metadata-propagation
Sep 17, 2026
Merged

unstubbable merged 1 commit into
canaryfrom
hl/fix-nested-caches-metadata-propagation

Conversation

@unstubbable

Copy link
Copy Markdown
Contributor

#94694 delayed shared metadata until handler writes settled to protect cross-request retries. Same-request consumers also awaited this promise, so an outer cache could save its result before inheriting the inner cache's root-param dependencies, tags, and lifetime.

Metadata now becomes available when collection finishes. Cross-request key verification and pending-invocation cleanup still wait for handler writes to settle.

The regression tests hold an inner write pending while both outer caches complete. They check metadata at write time and verify that a later request with different root params cannot reuse the earlier result. The fixtures disable startup preloading to isolate these tests from a separate custom-handler registration race that we'll address in a follow-up.

 #94694 delayed shared metadata until handler writes settled to protect
cross-request retries. Same-request consumers also awaited this promise,
so an outer cache could save its result before inheriting the inner
cache's root-param dependencies, tags, and lifetime.

Metadata now becomes available when collection finishes. Cross-request
key verification and pending-invocation cleanup still wait for handler
writes to settle.

The regression tests hold an inner write pending while both outer caches
complete. They check metadata at write time and verify that a later
request with different root params cannot reuse the earlier result. The
fixtures disable startup preloading to isolate these tests from a
separate custom-handler registration race that we'll address in a
follow-up.
@github-actions

github-actions Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Tests Passed

Commit: ef80bff

@vercel-security-reviewer

Copy link
Copy Markdown

Security review details

@unstubbable
unstubbable marked this pull request as ready for review September 17, 2026 10:31
@unstubbable
unstubbable merged commit d0df62e into canary Sep 17, 2026
218 of 220 checks passed
@unstubbable
unstubbable deleted the hl/fix-nested-caches-metadata-propagation branch September 17, 2026 17:50
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.

2 participants