4 months ago
d15dff6Add robust handling for legacy artifact runtime migration: migrateLegacyArtifactRuntime now catches errors and returns a status of "failed" with an optional reason, logs the failure, and cleans up partially-copied data so startup never crashes. fs.cp is called with dereference: true when copying payload entries to copy symlink targets (avoids Windows EPERM on pnpm-style junctions). Types updated to include the new "failed" migration status and reason, and ensureArtifactRuntimeReady now accounts for a migrated.status === "failed". Tests added to verify symlink dereferencing behavior and that migration failures are reported without throwing.
Parenta96cee2