Enforce stale core contracts in the worker without native startup I/O

This commit is contained in:
Jonathan Sykes
2026-10-08 10:05:38 +08:00
parent 57edb410c3
commit 97eb31e732
7 changed files with 40 additions and 13 deletions

View File

@@ -41,6 +41,9 @@
const group = Object.keys(manifest.groups).find(name => manifest.groups[name].files.includes(path));
if (!group || !previous.groups[group]?.files.includes(path) ||
manifest.groups[group].contract !== previous.groups[group].contract) return null;
// A stale core must understand every group contract in the new shell.
if (path === "/app.js" && Object.entries(manifest.groups).some(([name, entry]) =>
previous.groups[name]?.contract !== entry.contract)) return null;
return url(path, previous.files[path]);
}