{"record":{"id":"fa0fd87459128c63","repo":"affaan-m/ECC","slug":"seed-path-does-not-exist-in-reporoot-seedpath","errorCode":null,"errorMessage":"Seed path does not exist in repoRoot: ${seedPath}","messagePattern":"Seed path does not exist in repoRoot: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"scripts/lib/tmux-worktree-orchestrator.js","lineNumber":94,"sourceCode":"      continue;\n    }\n\n    seen.add(normalizedPath);\n    normalized.push(normalizedPath);\n  }\n\n  return normalized;\n}\n\nfunction overlaySeedPaths({ repoRoot, seedPaths, worktreePath }) {\n  const normalizedSeedPaths = normalizeSeedPaths(seedPaths, repoRoot);\n\n  for (const seedPath of normalizedSeedPaths) {\n    const sourcePath = path.join(repoRoot, seedPath);\n    const destinationPath = path.join(worktreePath, seedPath);\n\n    if (!fs.existsSync(sourcePath)) {\n      throw new Error(`Seed path does not exist in repoRoot: ${seedPath}`);\n    }\n\n    fs.mkdirSync(path.dirname(destinationPath), { recursive: true });\n    fs.rmSync(destinationPath, { force: true, recursive: true });\n    fs.cpSync(sourcePath, destinationPath, {\n      dereference: false,\n      force: true,\n      preserveTimestamps: true,\n      recursive: true\n    });\n  }\n}\n\nfunction buildWorkerArtifacts(workerPlan) {\n  const seededPathsSection = workerPlan.seedPaths.length > 0\n    ? [\n        '',\n        '## Seeded Local Overlays',","sourceCodeStart":76,"sourceCodeEnd":112,"githubUrl":"https://github.com/affaan-m/ECC/blob/01e15490f04e29cfefe3896951f43db46994d8ee/scripts/lib/tmux-worktree-orchestrator.js#L76-L112","documentation":"Thrown by overlaySeedPaths() when a normalized seed path (already validated to be inside repoRoot) does not exist on the source side. The function copies each seed path from repoRoot into the freshly-created worktree; a missing source means there is nothing to overlay, so it aborts before leaving the worktree half-seeded.","triggerScenarios":"config.seedPaths: ['.env.local'] when .env.local is gitignored and never created in this checkout; seedPaths referencing a directory the user deleted; pointing at a path that exists in a different branch than baseRef; case-sensitivity mismatch on Linux (the path was created as .Env.local).","commonSituations":"A new contributor runs the orchestrator before creating the local env file that the team's seedPaths expects; CI checkout excludes gitignored files; the path was valid on macOS (case-insensitive) but fails on Linux CI; seedPaths was updated but the file was never committed.","solutions":["Create the missing file or directory at repoRoot/<seedPath> before invoking executePlan.","If the file is optional, remove it from seedPaths or split into required vs optional lists and pre-check existence for the required set.","Verify the path with fs.existsSync(path.join(repoRoot, seedPath)) before building the plan.","On case-sensitive filesystems, confirm the casing matches exactly."],"exampleFix":"// before\nbuildOrchestrationPlan({ repoRoot, seedPaths: ['.env.local'], workers });\n// .env.local does not exist -> Seed path does not exist in repoRoot: .env.local\n\n// after\nconst fs = require('fs');\nconst seedPaths = ['.env.local'].filter(p => fs.existsSync(path.join(repoRoot, p)));\nbuildOrchestrationPlan({ repoRoot, seedPaths, workers });","handlingStrategy":"validation","validationCode":"const fs = require('fs');\nconst path = require('path');\n\nfunction filterExistingSeedPaths(entries, repoRoot) {\n  return (entries || []).filter(entry =>\n    typeof entry === 'string' &&\n    entry.trim().length > 0 &&\n    fs.existsSync(path.join(repoRoot, entry))\n  );\n}\n\nconfig.seedPaths = filterExistingSeedPaths(config.seedPaths, config.repoRoot);","typeGuard":"function seedPathExists(entry, repoRoot) {\n  return typeof entry === 'string' &&\n    entry.trim().length > 0 &&\n    fs.existsSync(path.join(repoRoot, entry));\n}","tryCatchPattern":"try {\n  executePlan(plan);\n} catch (error) {\n  if (/Seed path does not exist in repoRoot/.test(error.message)) {\n    plan.seedPaths = filterExistingSeedPaths(plan.seedPaths, plan.repoRoot);\n    executePlan(plan);\n    return;\n  }\n  throw error;\n}","preventionTips":["Pre-check every seedPath with fs.existsSync before building the plan.","On case-sensitive filesystems, verify casing matches exactly.","If a seedPath is optional, separate required from optional lists and only pre-check the required set.","Document that seedPaths must be committed (or otherwise present) at the repo root."],"tags":["orchestration","filesystem","validation","configuration"],"backgroundTag":null,"analyzedSha":"01e15490f04e29cfefe3896951f43db46994d8ee","analyzedAt":"2026-08-13T00:31:08.655Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}