{"record":{"id":"51fc209c22d605f0","repo":"stablyai/orca","slug":"renderer-entry-sourceentry-executes-entry-dep","errorCode":null,"errorMessage":"Renderer entry ${sourceEntry} executes entry ${dependency}","messagePattern":"Renderer entry (.+?) executes entry (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"config/scripts/project-renderer-web-client.mjs","lineNumber":44,"sourceCode":"      .map(([key]) => key)\n  )\n\n  for (const sourceEntry of entryKeys) {\n    const visited = new Set()\n    const pending = [sourceEntry]\n    while (pending.length > 0) {\n      const key = pending.pop()\n      if (visited.has(key)) {\n        continue\n      }\n      visited.add(key)\n      const entry = manifest[key]\n      if (!entry || typeof entry !== 'object') {\n        throw new Error(`Renderer manifest is missing entry: ${key}`)\n      }\n      for (const dependency of [...(entry.imports ?? []), ...(entry.dynamicImports ?? [])]) {\n        if (entryKeys.has(dependency) && dependency !== sourceEntry) {\n          throw new Error(`Renderer entry ${sourceEntry} executes entry ${dependency}`)\n        }\n        pending.push(dependency)\n      }\n    }\n  }\n}\n\nfunction addOutputPath(outputPath) {\n  if (\n    typeof outputPath !== 'string' ||\n    outputPath.length === 0 ||\n    outputPath.startsWith('/') ||\n    /^[A-Za-z]:/.test(outputPath) ||\n    outputPath.includes('\\\\') ||\n    outputPath.split('/').includes('..')\n  ) {\n    throw new Error(`Invalid renderer output path: ${String(outputPath)}`)\n  }","sourceCodeStart":26,"sourceCodeEnd":62,"githubUrl":"https://github.com/stablyai/orca/blob/1136503c6a231a16dce8f921f6fadb63d181e8db/config/scripts/project-renderer-web-client.mjs#L26-L62","documentation":"assertEntryIsolation's core invariant: no Vite entry may import or dynamically import ANOTHER entry. Each entry is meant to be an isolated web-client page; cross-entry execution would bundle the wrong graph when projecting. Detected by checking whether any dependency in the import graph is itself in the entryKeys set.","triggerScenarios":"Two entry points (entry.isEntry === true) where one imports or dynamicImports the other, directly or transitively. Vite emits both as entries (isEntry true), so the dependency appears in entryKeys.","commonSituations":"Adding a new web-client entry that re-exports from an existing entry; an index.html per page where one page's module imports another page's module; refactoring shared code into a file that Vite then promotes to an entry.","solutions":["Extract the shared code into a non-entry module that both entries import instead of entry-to-entry","Move the shared code to a chunk that is not marked isEntry (configure rollupOptions.input or manualChunks)","Audit src/renderer entry HTML files to confirm each loads a distinct, non-overlapping module graph","If the cross-entry import is intentional, reconsider whether both should be entries or one should be a dynamic chunk"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"function assertNoEntryCrossImports(manifest) {\n  const entryKeys = new Set(Object.entries(manifest).filter(([, e]) => e?.isEntry).map(([k]) => k))\n  for (const k of entryKeys) {\n    for (const dep of [...(manifest[k].imports ?? []), ...(manifest[k].dynamicImports ?? [])]) {\n      if (entryKeys.has(dep)) throw new Error(`entry ${k} imports entry ${dep}`)\n    }\n  }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep each web-client entry's module graph disjoint; share code via non-entry chunks","Use manualChunks for shared code rather than entry-to-entry imports","Audit new index.html entry files against existing entries before adding them"],"tags":["build","vite","manifest","entry-isolation","architecture"],"backgroundTag":null,"analyzedSha":"1136503c6a231a16dce8f921f6fadb63d181e8db","analyzedAt":"2026-08-12T23:15:58.167Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}