mvanhorn/last30days-skill · error

engine: create %s: %w

Error message

engine: create %s: %w

What it means

Error "engine: create %s: %w" thrown in mvanhorn/last30days-skill.

Source

Thrown at mcp/internal/engine/extract.go:137

		if d.IsDir() {
			return os.MkdirAll(target, 0o755)
		}
		return copyEmbeddedFile(src, path, target)
	})
}

func copyEmbeddedFile(src fs.FS, srcPath, dst string) error {
	in, err := src.Open(srcPath)
	if err != nil {
		return fmt.Errorf("engine: open %s: %w", srcPath, err)
	}
	defer func() { _ = in.Close() }()
	if err := os.MkdirAll(filepath.Dir(dst), 0o755); err != nil {
		return fmt.Errorf("engine: ensure parent of %s: %w", dst, err)
	}
	out, err := os.OpenFile(dst, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0o644)
	if err != nil {
		return fmt.Errorf("engine: create %s: %w", dst, err)
	}
	defer func() { _ = out.Close() }()
	if _, err := io.Copy(out, in); err != nil {
		return fmt.Errorf("engine: write %s: %w", dst, err)
	}
	return nil
}

// onceRegistry serializes first-call extraction per cache directory so the
// rename in ensureLocked happens exactly once across goroutines.
var (
	onceMu       sync.Mutex
	onceRegistry = map[string]*sync.Once{}
)

func getOnce(cacheDir string) *sync.Once {
	onceMu.Lock()
	defer onceMu.Unlock()

View on GitHub (pinned to c7460f6114)

Solutions

  1. Check write permissions on the cache directory and free disk space if needed.
  2. Remove any conflicting non-writable file at the named path and retry.

When it happens

Trigger: Fires when the engine cannot create a payload file in the cache directory, typically from permission errors, a full disk, or a path collision with an existing non-file entry.

Common situations: See trigger scenarios.


AI-assisted analysis of mvanhorn/last30days-skill@c7460f6114 (2026-08-15). Data as JSON: /api/errors/3005c1ab459edca3. Report an issue: GitHub.