{"record":{"id":"e3d0e8cb7e90ce96","repo":"coleam00/Archon","slug":"cannot-generate-dry-run-stub-for-node-node-id-e3d0e8","errorCode":null,"errorMessage":"Cannot generate dry-run stub for node '${node.id}': output_format produced a placeholder of an unsupported type","messagePattern":"Cannot generate dry-run stub for node '(.+?)': output_format produced a placeholder of an unsupported type","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/workflows/src/dry-run.ts","lineNumber":195,"sourceCode":"    value[node.loop.until_field] = true;\n  }\n\n  let compileError: string | undefined;\n  const validation = validateStructuredOutput(value, node.output_format, message => {\n    compileError = message;\n  });\n  if (compileError !== undefined) {\n    throw new Error(\n      `Cannot generate dry-run stub for node '${node.id}': output_format could not be compiled (${compileError})`\n    );\n  }\n  if (!validation.valid) {\n    throw new Error(\n      `Cannot generate schema-valid dry-run stub for node '${node.id}': ${validation.errors.join('; ')}`\n    );\n  }\n  if (!isStubValue(value)) {\n    throw new Error(\n      `Cannot generate dry-run stub for node '${node.id}': output_format produced a placeholder of an unsupported type`\n    );\n  }\n  return value;\n}\n\nfunction stubSatisfiesNode(node: DagNode, stub: DryRunStubValue): boolean {\n  if (node.output_format !== undefined) {\n    const validation = validateStructuredOutput(stub, node.output_format);\n    if (!validation.valid) return false;\n  }\n  if (isLoopNode(node)) {\n    return loopIterationCompletes(node.loop, completedOutput(node, stub)).kind !== 'incomplete';\n  }\n  return true;\n}\n\nfunction collectsStub(node: DagNode): boolean {","sourceCodeStart":177,"sourceCodeEnd":213,"githubUrl":"https://github.com/coleam00/Archon/blob/0773b9745896ef0612e709c80845a0f7db315b19/packages/workflows/src/dry-run.ts#L177-L213","documentation":"Thrown by generatedStubFor after a schema compiles and validates, when the generated placeholder value itself has a type the stub machinery cannot represent (isStubValue returns false). This is an internal guard: some schema shapes yield placeholders (e.g. deeply exotic types) outside the supported stub value set.","triggerScenarios":"Dry-run stub generation where `output_format` compiles and validates but the placeholder is an unsupported runtime type — e.g. a schema resolving to null-only or an unsupported top-level type.","commonSituations":"`output_format: { type: \"null\" }`, schemas that degenerate to non-serializable placeholder kinds, or library/version changes where the stub generator's supported type set shrank relative to schemas users wrote.","solutions":["Restructure `output_format` to a supported shape (typically `object` with primitive/array properties).","Supply a manual stub file for the node to bypass placeholder generation.","Check for a library update or change in supported placeholder types if this previously worked."],"exampleFix":"// before\noutput_format:\n  type: \"null\"\n// after\noutput_format:\n  type: object\n  properties: {}","handlingStrategy":"fallback","validationCode":"const SUPPORTED_TOP_TYPES = new Set([\"object\", \"array\", \"string\", \"number\", \"boolean\"]);\nfunction stubRepresentable(schema: { type?: string }): boolean {\n  return !schema.type || SUPPORTED_TOP_TYPES.has(schema.type);\n}","typeGuard":"function isStubRepresentable(v: unknown): v is string | number | boolean | object | unknown[] {\n  return v !== null && v !== undefined && typeof v !== \"function\" && typeof v !== \"symbol\";\n}","tryCatchPattern":"let stub: unknown;\ntry {\n  stub = generatedStubFor(node);\n} catch (err) {\n  if (err instanceof Error && err.message.includes(\"placeholder of an unsupported type\")) {\n    stub = manualStubs[node.id] ?? {};\n  } else throw err;\n}","preventionTips":["Model outputs as objects with primitive/array properties rather than null-only or exotic top-level types.","Review the library's supported placeholder type list after upgrades.","Provide manual stubs for nodes with unusual schemas.","Add a smoke test that stubs every node in the workflow."],"tags":["dry-run","json-schema","workflow"],"backgroundTag":"unsupported-schema-placeholder-type","analyzedSha":"0773b9745896ef0612e709c80845a0f7db315b19","analyzedAt":"2026-09-01T02:28:07.064Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}