Home

mweinbach / agent-coworker

publicmweinbach/agent-coworker
Overview Code History Branches Pull requestsIssuesInsights
main
HomeOverview Code PRsIssues

Handle failed migration and dereference symlinks

4 months ago

d15dff6
Authored
Max Weinbach6/5/2026, 1:05:14 PM
Add 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

4 files changed
  • src/artifactRuntime/ensureReady.ts+2−0
  • src/artifactRuntime/migrate.ts+37−19
  • src/artifactRuntime/types.ts+2−1
  • test/artifactRuntime.test.ts+65−0