mirror of
https://github.com/vercel/next.js.git
synced 2026-09-20 02:25:18 +08:00
d0df62e826
#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.