mvanhorn/last30days-skill · error

engine: promote tmp cache: %w

Error message

engine: promote tmp cache: %w

What it means

Error "engine: promote tmp cache: %w" thrown in mvanhorn/last30days-skill.

Source

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

	if err := os.MkdirAll(tmpDir, 0o755); err != nil {
		return fmt.Errorf("engine: create tmp cache (%s, set %s to override): %w", tmpDir, CacheEnvOverride, err)
	}
	if err := extractAll(src, tmpDir); err != nil {
		_ = os.RemoveAll(tmpDir)
		return err
	}
	sentinel := filepath.Join(tmpDir, SentinelFilename)
	if err := os.WriteFile(sentinel, []byte(version), 0o644); err != nil {
		_ = os.RemoveAll(tmpDir)
		return fmt.Errorf("engine: write sentinel: %w", err)
	}
	if err := os.RemoveAll(cacheDir); err != nil {
		_ = os.RemoveAll(tmpDir)
		return fmt.Errorf("engine: clean old cache: %w", err)
	}
	if err := os.Rename(tmpDir, cacheDir); err != nil {
		_ = os.RemoveAll(tmpDir)
		return fmt.Errorf("engine: promote tmp cache: %w", err)
	}
	return nil
}

func sentinelMatches(cacheDir, version string) bool {
	data, err := os.ReadFile(filepath.Join(cacheDir, SentinelFilename))
	if err != nil {
		return false
	}
	return string(data) == version
}

func extractAll(src fs.FS, dst string) error {
	return fs.WalkDir(src, ".", func(path string, d fs.DirEntry, err error) error {
		if err != nil {
			return err
		}
		if path == "." {

View on GitHub (pinned to c7460f6114)

Solutions

  1. On Windows, close any process that has files open inside the cache directory; rename cannot replace an in-use directory.
  2. Ensure the cache parent directory is writable and retry.
  3. If antivirus is scanning the new directory, add an exclusion or retry after a moment.

When it happens

Trigger: Fires when the engine cannot atomically promote the temporary cache directory to its final versioned location, e.g. on cross-device renames, permission denial, or a conflicting existing directory.

Common situations: See trigger scenarios.


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