Parent: #266. Related epics: #264, #227.
Proven gap
On exact WebScene main a759ff3a008e362708b6b281ebb7c2742921eb53, normal text-resource loading derives its persistent/process cache key from resource kind, resolved URL, initiator origin, and cookie representation. Parser speculative prefetch instead looks up the same cache using only resource kind and resolved URL.
That key mismatch bypasses an already-fresh admitted script or stylesheet before normal loading can consume it. The current native regression consequently performs duplicate host reads across engine generations (document and script bodies were not reused from the process resource cache and the related four-engine single-flight request-count failure). This directly affects repeated Markdown/webview parser resources after the Service Worker cache-continuity work in #376/#378.
Scope
- Derive speculative-prefetch cache lookups from the same origin/cookie-partitioned representation key as normal loading.
- Reuse only entries that are already fresh under the existing expiry metadata. Preserve existing validator revalidation and stale-fallback behavior for non-fresh entries.
- Keep resource kind, resolved URL, initiator origin, cookie, credentials, admission, and host callback boundaries unchanged and fail closed.
- Add a browser/WPT-derived freshness oracle plus native exact-key, validator, duplicate-read, 100-cycle latency/memory, and teardown gates.
Exclusions
No new filesystem or network authority; no CacheStorage durability or cross-origin sharing; no change to Service Worker registration, localResourceRoots, localhost mapping, CSP, AppScene, File System Access #248, consolidation #76, or vscode-demo.
Acceptance
Parent: #266. Related epics: #264, #227.
Proven gap
On exact WebScene main
a759ff3a008e362708b6b281ebb7c2742921eb53, normal text-resource loading derives its persistent/process cache key from resource kind, resolved URL, initiator origin, and cookie representation. Parser speculative prefetch instead looks up the same cache using only resource kind and resolved URL.That key mismatch bypasses an already-fresh admitted script or stylesheet before normal loading can consume it. The current native regression consequently performs duplicate host reads across engine generations (
document and script bodies were not reused from the process resource cacheand the related four-engine single-flight request-count failure). This directly affects repeated Markdown/webview parser resources after the Service Worker cache-continuity work in #376/#378.Scope
Exclusions
No new filesystem or network authority; no CacheStorage durability or cross-origin sharing; no change to Service Worker registration, localResourceRoots, localhost mapping, CSP, AppScene, File System Access #248, consolidation #76, or vscode-demo.
Acceptance