{"record":{"id":"1624aac4ad0a5bf3","repo":"moeru-ai/airi","slug":"inspection-errors-join","errorCode":null,"errorMessage":"inspection.errors.join(' ')","messagePattern":"inspection\\.errors\\.join\\(' '\\)","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/stage-ui-tachie/src/utils/tachie-archive.ts","lineNumber":455,"sourceCode":"    errors,\n    ignoredEntries: layout.ignoredEntries,\n    warnings,\n  }\n}\n\n/**\n * Loads and fully decodes every recognized emotion image in a Tachie ZIP.\n *\n * The returned image sources remain owned by the caller until `dispose()` is\n * called. A failed archive never returns a partially usable model.\n */\nexport async function loadTachieZip(\n  input: Blob | ArrayBuffer,\n  options: TachieArchiveLoadOptions = {},\n): Promise<TachieLoadedAssets> {\n  const inspection = await inspectTachieArchive(input, options)\n  if (!inspection.assets)\n    throw new Error(inspection.errors.join(' '))\n  return inspection.assets\n}\n\n/**\n * Validates a local `.tachie.zip` without retaining decoded image resources.\n */\nexport async function validateTachieZip(file: File): Promise<TachieValidationReport> {\n  const inspection = await inspectTachieArchive(file, {\n    fileName: file.name,\n    requireTachieSuffix: true,\n  })\n  const assets = inspection.assets\n  const report: TachieValidationReport = {\n    status: inspection.errors.length > 0\n      ? 'INVALID'\n      : inspection.warnings.length > 0\n        ? 'WARNING'\n        : 'VALID',","sourceCodeStart":437,"sourceCodeEnd":473,"githubUrl":"https://github.com/moeru-ai/airi/blob/27111382b4a79a7e983289d6e983a06af185ed0f/packages/stage-ui-tachie/src/utils/tachie-archive.ts#L437-L473","documentation":"`loadTachieZip` runs `inspectTachieArchive` which fully decodes images and collects per-entry errors. If inspection yields no `assets` (errors accumulated), `loadTachieZip` throws `new Error(inspection.errors.join(' '))`, concatenating every accumulated problem (e.g. failed image decodes, a missing neutral image). A failed archive never returns a partial model.","triggerScenarios":"A Tachie ZIP where one or more recognized emotion images failed to decode (corrupt PNG/unsupported format), or where the neutral (`DEFAULT_TACHIE_EMOTION`) image could not be decoded. `inspectTachieArchive` disposes decoded images and returns only an errors array, so the joined string is the only diagnostic.","commonSituations":"Corrupt image bytes inside the archive; an emotion image in an unsupported format; missing or unreadable neutral emotion image; partial/aborted archive creation; an image that exceeds decode limits.","solutions":["Call `validateTachieZip(file)` (or `inspectTachieArchive`) first and read `inspection.errors` / the validation report for the specific failing entry.","Replace or re-export the named failing image(s) the errors mention.","Ensure the neutral emotion image is present and decodes cleanly.","Re-create the `.tachie.zip` from source assets and retry."],"exampleFix":"// before\nconst assets = await loadTachieZip(blob)  // throws joined errors\n\n// after\nconst report = await validateTachieZip(file)\nif (!report.assets) {\n  console.error('Tachie archive rejected:', report.errors)\n  return\n}\nconst assets = await loadTachieZip(blob)","handlingStrategy":"try-catch","validationCode":"const report = await validateTachieZip(file)\nif (!report.assets) {\n  throw new Error(`Tachie archive rejected: ${report.errors.join('; ')}`)\n}\nawait loadTachieZip(blob)","typeGuard":"function isTachieValidationOk(report: TachieValidationReport): boolean {\n  return !!report.assets && report.errors.length === 0\n}","tryCatchPattern":"try {\n  await loadTachieZip(blob)\n} catch (e) {\n  if (e instanceof Error && /decode|neutral image|could not/i.test(e.message)) {\n    // surface the per-entry failures from validateTachieZip\n  } else throw e\n}","preventionTips":["Run validateTachieZip before loadTachieZip to get per-entry errors.","Re-export failing emotion images from source.","Ensure the neutral emotion image is present and decodes."],"tags":["tachie","model-loading","archive","image-decode"],"backgroundTag":null,"analyzedSha":"27111382b4a79a7e983289d6e983a06af185ed0f","analyzedAt":"2026-08-12T18:33:34.132Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}