{"record":{"id":"e8a924bfd236c1f3","repo":"Egonex-AI/Understand-Anything","slug":"no-unresolved-symbol-files-eligible-for-a-targeted","errorCode":null,"errorMessage":"No unresolved symbol files eligible for a targeted retry; inspect the symbol report","messagePattern":"No unresolved symbol files eligible for a targeted retry; inspect the symbol report","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"understand-anything-plugin/skills/understand/prepare-symbol-retry.mjs","lineNumber":35,"sourceCode":"async function main() {\n  if (process.argv.length !== 3) throw new Error('Usage: node prepare-symbol-retry.mjs <projectRoot>');\n  const projectRoot = realpathSync(process.argv[2]);\n  const intermediateDir = await getIntermediateDir(projectRoot);\n  const { plan, baseline } = loadSymbolContext(projectRoot, intermediateDir);\n  if (!['PARTIAL_UPDATE', 'ARCHITECTURE_UPDATE'].includes(plan.action)) {\n    throw new Error('Symbol retry requires a partial or architecture incremental update');\n  }\n  const retryPath = join(intermediateDir, 'incremental-symbol-retry.json');\n  if (existsSync(retryPath)) {\n    const retry = readJson(retryPath);\n    if (retry.baseCommit === plan.baseCommit && retry.headCommit === plan.headCommit && retry.attempt === 1) {\n      throw new Error('Symbol retry already used for these commits; stop without advancing the baseline');\n    }\n  }\n  // Do not trust an old report or a caller-supplied list of files to replace.\n  const report = await validateIncrementalSymbols(projectRoot, { intermediateDir });\n  if (report.ok || report.unresolvedFiles.length === 0) {\n    throw new Error('No unresolved symbol files eligible for a targeted retry; inspect the symbol report');\n  }\n  const paths = new Set(report.unresolvedFiles);\n  const changedFilesPath = join(intermediateDir, 'incremental-symbol-retry-files.json');\n  const batchesPath = join(intermediateDir, 'incremental-symbol-retry-batches.json');\n  atomicWriteJson(changedFilesPath, [...paths]);\n  const skillDir = dirname(fileURLToPath(import.meta.url));\n  const batching = spawnSync(process.execPath, [\n    join(skillDir, 'compute-batches.mjs'), projectRoot,\n    `--changed-files=${changedFilesPath}`, `--output=${batchesPath}`,\n  ], { encoding: 'utf8', maxBuffer: 64 * 1024 * 1024 });\n  if (batching.stderr) process.stderr.write(batching.stderr);\n  if (batching.status !== 0) throw new Error(`Retry batching failed: ${batching.error ?? batching.status}`);\n  const batches = readJson(batchesPath).batches;\n  const scheduled = batches.flatMap(batch => batch.files.map(file => file.path));\n  if (JSON.stringify([...scheduled].sort()) !== JSON.stringify([...paths].sort())) {\n    throw new Error('Retry batches do not cover exactly the affected files');\n  }\n  for (const batch of batches) {","sourceCodeStart":17,"sourceCodeEnd":53,"githubUrl":"https://github.com/Egonex-AI/Understand-Anything/blob/07edf82a04371b6f69779b067bdc8a1a8753a9db/understand-anything-plugin/skills/understand/prepare-symbol-retry.mjs#L17-L53","documentation":"After re-validating symbols from scratch (never trusting old reports), the script checks whether there is actually anything to retry: if the report is ok or has zero unresolvedFiles, there are no eligible files for a targeted retry, so it throws. This guards against preparing empty retry batches that would silently do nothing.","triggerScenarios":"Running prepare-symbol-retry.mjs when the fresh validateIncrementalSymbols() run finds no unresolved files — e.g. the symbols recovered on their own, the previous failure was fixed by another means, or the unresolved list is empty because validation never recorded failures.","commonSituations":"A prior step already fixed the broken symbols; developer runs retry defensively without an actual failure; stale failure reports cleared by a rebuild between runs; validation succeeded this time because the offending file changed.","solutions":["Inspect the symbol validation report in the intermediate directory — if report.ok is true, no retry is needed; proceed with the normal incremental flow.","Confirm the symbol failure still reproduces (re-run validate-incremental-symbols.mjs) before invoking the retry script.","If validation passes, continue with the standard incremental merge instead of forcing a retry."],"exampleFix":"// before\nnode prepare-symbol-retry.mjs .\n// Error: No unresolved symbol files eligible for a targeted retry; inspect the symbol report\n// after: verification first\nnode validate-incremental-symbols.mjs .   # shows ok: true → skip retry, run normal update","handlingStrategy":"validation","validationCode":"import { execFileSync } from 'node:child_process';\nconst report = JSON.parse(execFileSync('node', ['validate-incremental-symbols.mjs', projectRoot, '--json']).toString());\nif (report.ok || report.unresolvedFiles.length === 0) {\n  console.log('No unresolved symbols; skip retry and run normal incremental update.');\n}","typeGuard":"const hasRetryableFiles = (report) =>\n  Boolean(report) && !report.ok && Array.isArray(report.unresolvedFiles) && report.unresolvedFiles.length > 0;","tryCatchPattern":"try {\n  await runRetry(projectRoot);\n} catch (e) {\n  if (e.message.includes('No unresolved symbol files eligible')) {\n    // validation passed; continue the normal incremental flow\n  } else throw e;\n}","preventionTips":["Always run validate-incremental-symbols.mjs first and only retry when unresolvedFiles is non-empty.","Do not run the retry script defensively after unrelated fixes.","Check the symbol report before assuming symbols are still broken."],"tags":["retry","empty-result-set","validation","symbols"],"backgroundTag":"empty-result-set","analyzedSha":"07edf82a04371b6f69779b067bdc8a1a8753a9db","analyzedAt":"2026-09-07T23:20:10.829Z","contentChangedAt":"2026-09-07T23:20:10.829Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}