{"record":{"id":"63d417307f3e885c","repo":"mvanhorn/last30days-skill","slug":"engine-last30days-py-not-found-in-cache-s-w","errorCode":null,"errorMessage":"engine: last30days.py not found in cache %s: %w","messagePattern":"engine: last30days\\.py not found in cache (.+?): %w","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"mcp/internal/engine/run.go","lineNumber":79,"sourceCode":"// receives the parent environment (so MCPB user_config env-injection\n// reaches the engine) plus ExtraEnv and a PYTHONPATH that points at the\n// cache so the engine's `from lib import ...` statements resolve.\n//\n// A missing interpreter, a non-zero exit, and a timeout each surface as\n// distinct errors so the tool handler can map them to user-facing\n// messages without re-parsing stderr.\nfunc Run(ctx context.Context, opts RunOptions) (*RunResult, error) {\n\tif opts.CacheDir == \"\" {\n\t\treturn nil, errors.New(\"engine: CacheDir is required\")\n\t}\n\tpythonPath, err := resolvePython(opts.PythonPath)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tscriptPath := filepath.Join(opts.CacheDir, \"last30days.py\")\n\tif _, err := os.Stat(scriptPath); err != nil {\n\t\treturn nil, fmt.Errorf(\"engine: last30days.py not found in cache %s: %w\", opts.CacheDir, err)\n\t}\n\n\ttimeout := resolveTimeout(opts.Timeout)\n\tsubCtx, cancel := context.WithTimeout(ctx, timeout)\n\tdefer cancel()\n\n\targs := append([]string{scriptPath}, opts.Args...)\n\tcmd := exec.CommandContext(subCtx, pythonPath, args...)\n\tcmd.Env = buildEnv(opts.CacheDir, opts.ExtraEnv)\n\n\tvar stdout, stderr bytes.Buffer\n\tcmd.Stdout = &stdout\n\tcmd.Stderr = &stderr\n\n\terr = cmd.Run()\n\tres := &RunResult{\n\t\tStdout:   stdout.Bytes(),\n\t\tStderr:   stderr.Bytes(),","sourceCodeStart":61,"sourceCodeEnd":97,"githubUrl":"https://github.com/mvanhorn/last30days-skill/blob/c7460f6114449ddfe6ea3fc2f23c3d910c0e740c/mcp/internal/engine/run.go#L61-L97","documentation":"Error \"engine: last30days.py not found in cache %s: %w\" thrown in mvanhorn/last30days-skill.","triggerScenarios":"Fires when the extracted cache directory does not contain last30days.py at the expected path, indicating a partial or corrupted extraction, a version mismatch, or manual tampering with the cache.","commonSituations":"See trigger scenarios.","solutions":["Delete the cache directory so the engine re-extracts a fresh copy on the next run.","Set LAST30DAYS_CACHE_DIR to a clean writable directory to force re-extraction."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"c7460f6114449ddfe6ea3fc2f23c3d910c0e740c","analyzedAt":"2026-08-15T03:34:49.540Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}