{"record":{"id":"7eb7b61c069d2405","repo":"EveryInc/compound-engineering-plugin","slug":"ignoring-unreadable-pi-install-manifest-at-manif","errorCode":null,"errorMessage":"Ignoring unreadable Pi install manifest at ${manifestPath}.","messagePattern":"Ignoring unreadable Pi install manifest at (.+?)\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/targets/pi.ts","lineNumber":355,"sourceCode":"      const promptsRoot = paths?.promptsDir ?? managedDir\n      const extensionsRoot = paths?.extensionsDir ?? managedDir\n      const agentsRoot = paths?.agentsDir ?? managedDir\n      // `agents` was added in v2.69+; accept missing/omitted to stay\n      // backward-compatible with v2.x manifests that only tracked skills,\n      // prompts, and extensions. Drop non-array values defensively.\n      const rawAgents = Array.isArray(parsed.agents) ? parsed.agents : []\n      return {\n        version: 1,\n        pluginName,\n        skills: filterSafePiManifestEntries(parsed.skills, skillsRoot, manifestPath, \"skills\"),\n        prompts: filterSafePiManifestEntries(parsed.prompts, promptsRoot, manifestPath, \"prompts\"),\n        extensions: filterSafePiManifestEntries(parsed.extensions, extensionsRoot, manifestPath, \"extensions\"),\n        agents: filterSafePiManifestEntries(rawAgents, agentsRoot, manifestPath, \"agents\"),\n      }\n    }\n  } catch (err) {\n    if ((err as NodeJS.ErrnoException).code !== \"ENOENT\") {\n      console.warn(`Ignoring unreadable Pi install manifest at ${manifestPath}.`)\n    }\n  }\n  return null\n}\n\nfunction filterSafePiManifestEntries(\n  entries: unknown[],\n  rootDir: string,\n  manifestPath: string,\n  group: string,\n): string[] {\n  const safe: string[] = []\n  for (const entry of entries) {\n    if (isSafeManagedPath(rootDir, entry)) {\n      safe.push(entry)\n    } else {\n      console.warn(\n        `Dropping unsafe Pi install-manifest entry in ${manifestPath} (group \"${group}\"): ${JSON.stringify(entry)}`,","sourceCodeStart":337,"sourceCodeEnd":373,"githubUrl":"https://github.com/EveryInc/compound-engineering-plugin/blob/c9c10f8c75412c7232cb2bd663e5fd1cea98d84e/src/targets/pi.ts#L337-L373","documentation":"Emitted by the Pi target's readInstallManifest when the Pi install manifest exists but fails to parse or read with an error other than ENOENT. Like the managed variant, the function swallows the error, warns, and returns null so Pi installation continues without stale owned-file tracking. ENOENT is silently treated as 'no manifest yet'.","triggerScenarios":"Calling readPiInstallManifest / readInstallManifestWithLegacyFallback / owned when the Pi manifest at manifestPath contains invalid JSON, is unreadable due to permissions, or fails I/O with a non-ENOENT errno.","commonSituations":"Manifest truncated by an interrupted Pi install; hand-edited JSON; permission mismatch after copying a home directory; format drift from an older plugin version.","solutions":["Delete the unreadable Pi manifest so the next run starts clean (ENOENT path).","Fix the JSON syntax or permissions on manifestPath.","Reinstall the Pi plugin target to regenerate the manifest.","Check for concurrent installs that may have raced while writing the manifest."],"exampleFix":"// before\nPi manifest with a trailing comma -> warning on every run\n// after\nrm <manifestPath> && reinstall  // fresh valid manifest\n","handlingStrategy":"fallback","validationCode":"const raw = await readFile(manifestPath, \"utf8\").catch(() => null);\nconst valid = raw !== null && (() => { try { JSON.parse(raw); return true; } catch { return false; } })();","typeGuard":null,"tryCatchPattern":"const manifest = await readPiInstallManifest(manifestPath);\nif (manifest === null) {\n  // absent or unreadable: treat as fresh install, manifest will be rewritten\n}","preventionTips":["Avoid concurrent Pi installs racing on the same manifest.","Validate JSON after any manual edit (jq . manifest.json).","Keep manifest file permissions intact when syncing home directories.","Delete rather than partially repair a broken manifest."],"tags":["manifest","filesystem","pi-target"],"backgroundTag":"corrupt-manifest-file","analyzedSha":"c9c10f8c75412c7232cb2bd663e5fd1cea98d84e","analyzedAt":"2026-08-31T15:18:07.959Z","schemaVersion":2},"datasetVersion":"2026-08-31T19:17:28.585Z"}