{"record":{"id":"6d1946f0ce8a6e47","repo":"coleam00/Archon","slug":"workflow-subrun-schema-uncompilable","errorCode":"workflow.subrun_schema_uncompilable","errorMessage":"⚠️ Node '${node.id}': its `output_format` schema could not be compiled (${schemaCompileError}), so fan-out child ${String(index)} of '${node.workflow}' was NOT validated against it. Fix the schema to enforce it.","messagePattern":"⚠️ Node '(.+?)': its `output_format` schema could not be compiled \\((.+?)\\), so fan-out child (.+?) of '(.+?)' was NOT validated against it\\. Fix the schema to enforce it\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"packages/workflows/src/dag-executor.ts","lineNumber":8685,"sourceCode":"  }\n\n  // Declared boundary contract (#2774), fan-out parity with the 1:1 asCompleted path:\n  // when the node declares `output_format`, EVERY completed child's terminal value must\n  // match it — the join aggregates children, so one invalid element would otherwise be\n  // persisted inside a \"completed\" node_completed row. Fails the node BEFORE any\n  // writeCompleted so resume re-runs into the same named failure. An uncompilable\n  // schema warn-skips like the 1:1 gate; failed/paused/cancelled children are not\n  // validated (they never contribute a payload element).\n  if (node.output_format) {\n    for (const [index, outcome] of outcomes.entries()) {\n      if (outcome.status !== 'completed') continue;\n      const logicalValue = subrunLogicalValue(outcome);\n      let schemaCompileError: string | undefined;\n      const validation = validateStructuredOutput(logicalValue, node.output_format, compileMsg => {\n        schemaCompileError = compileMsg;\n      });\n      if (schemaCompileError !== undefined) {\n        getLog().warn(\n          { nodeId: node.id, workflowRunId: parentRun.id, compileMsg: schemaCompileError },\n          'workflow.subrun_schema_uncompilable'\n        );\n        await notify(\n          `⚠️ Node '${node.id}': its \\`output_format\\` schema could not be compiled (${schemaCompileError}), so fan-out child ${String(index)} of '${node.workflow}' was NOT validated against it. Fix the schema to enforce it.`\n        );\n        continue;\n      }\n      if (!validation.valid) {\n        const errors = (validation.errors ?? ['value does not match the declared schema']).join(\n          '; '\n        );\n        const received =\n          logicalValue === null\n            ? 'null'\n            : Array.isArray(logicalValue)\n              ? 'array'\n              : typeof logicalValue;","sourceCodeStart":8667,"sourceCodeEnd":8703,"githubUrl":"https://github.com/coleam00/Archon/blob/0773b9745896ef0612e709c80845a0f7db315b19/packages/workflows/src/dag-executor.ts#L8667-L8703","documentation":"Non-fatal warning: the node's `output_format` JSON schema failed to compile, so the structured outputs of each fan-out child were NOT validated against it. The run proceeds unvalidated; the schema gives no protection until fixed.","triggerScenarios":"A fan-out node declares `output_format` whose schema cannot be compiled (invalid JSON Schema constructs); validateStructuredOutput reports the compile error via callback while validating each child's outcome.","commonSituations":"Hand-written schemas with unsupported keywords or typos; schemas generated by tooling with draft features the validator rejects; copy-pasted schemas with syntax mistakes.","solutions":["Fix the `output_format` schema so it compiles (the warning names the compile error)","Simplify to supported JSON Schema keywords","Re-run the node and confirm children are validated (warning disappears)"],"exampleFix":"# before\noutput_format:\n  type: objec   # typo\n  properties: { ok: { type: boolean } }\n# after\noutput_format:\n  type: object\n  properties: { ok: { type: boolean } }\n  required: [ok]","handlingStrategy":"validation","validationCode":"// Compile the schema before deploying the workflow\nimport Ajv from 'ajv';\nconst ajv = new Ajv();\ntry { ajv.compile(node.output_format); } catch (e) {\n  console.warn(`output_format for ${node.id} will not validate: ${String(e)}`);\n}","typeGuard":"function schemaCompiles(schema: unknown): schema is Record<string, unknown> {\n  try { new Ajv().compile(schema); return true; } catch { return false; }\n}","tryCatchPattern":"try {\n  const result = await runWorkflow(node);\n  if (!schemaCompiles(node.output_format)) {\n    console.warn(`child outputs were NOT validated for ${node.id}; fix output_format`);\n  }\n} catch (e) { /* handle run failure */ }","preventionTips":["Validate output_format schemas in CI with the same validator the engine uses","Stick to widely supported JSON Schema keywords","Add a unit test that compiles every workflow's output_format"],"tags":["workflow","schema","fan-out","validation"],"backgroundTag":"schema-uncompilable","analyzedSha":"0773b9745896ef0612e709c80845a0f7db315b19","analyzedAt":"2026-09-01T02:28:07.064Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}