coleam00/Archon · warning

workflow.subrun_schema_uncompilable

workflow.subrun_schema_uncompilable

Error message

⚠️ 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.

What it means

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.

Source

Thrown at packages/workflows/src/dag-executor.ts:8685

  }

  // Declared boundary contract (#2774), fan-out parity with the 1:1 asCompleted path:
  // when the node declares `output_format`, EVERY completed child's terminal value must
  // match it — the join aggregates children, so one invalid element would otherwise be
  // persisted inside a "completed" node_completed row. Fails the node BEFORE any
  // writeCompleted so resume re-runs into the same named failure. An uncompilable
  // schema warn-skips like the 1:1 gate; failed/paused/cancelled children are not
  // validated (they never contribute a payload element).
  if (node.output_format) {
    for (const [index, outcome] of outcomes.entries()) {
      if (outcome.status !== 'completed') continue;
      const logicalValue = subrunLogicalValue(outcome);
      let schemaCompileError: string | undefined;
      const validation = validateStructuredOutput(logicalValue, node.output_format, compileMsg => {
        schemaCompileError = compileMsg;
      });
      if (schemaCompileError !== undefined) {
        getLog().warn(
          { nodeId: node.id, workflowRunId: parentRun.id, compileMsg: schemaCompileError },
          'workflow.subrun_schema_uncompilable'
        );
        await notify(
          `⚠️ 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.`
        );
        continue;
      }
      if (!validation.valid) {
        const errors = (validation.errors ?? ['value does not match the declared schema']).join(
          '; '
        );
        const received =
          logicalValue === null
            ? 'null'
            : Array.isArray(logicalValue)
              ? 'array'
              : typeof logicalValue;

View on GitHub (pinned to 0773b97458)

Solutions

  1. Fix the `output_format` schema so it compiles (the warning names the compile error)
  2. Simplify to supported JSON Schema keywords
  3. Re-run the node and confirm children are validated (warning disappears)

Example fix

# before
output_format:
  type: objec   # typo
  properties: { ok: { type: boolean } }
# after
output_format:
  type: object
  properties: { ok: { type: boolean } }
  required: [ok]
Defensive patterns

Strategy: validation

Validate before calling

// Compile the schema before deploying the workflow
import Ajv from 'ajv';
const ajv = new Ajv();
try { ajv.compile(node.output_format); } catch (e) {
  console.warn(`output_format for ${node.id} will not validate: ${String(e)}`);
}

Type guard

function schemaCompiles(schema: unknown): schema is Record<string, unknown> {
  try { new Ajv().compile(schema); return true; } catch { return false; }
}

Try / catch

try {
  const result = await runWorkflow(node);
  if (!schemaCompiles(node.output_format)) {
    console.warn(`child outputs were NOT validated for ${node.id}; fix output_format`);
  }
} catch (e) { /* handle run failure */ }

Prevention

When it happens

Trigger: 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.

Common situations: Hand-written schemas with unsupported keywords or typos; schemas generated by tooling with draft features the validator rejects; copy-pasted schemas with syntax mistakes.

Related errors


AI-assisted analysis of coleam00/Archon@0773b97458 (2026-09-01). Data as JSON: /api/errors/6d1946f0ce8a6e47. Report an issue: GitHub.