{"record":{"id":"7013d758f727df05","repo":"coleam00/Archon","slug":"dry-run-failed-missing-stubs-blockingmissingst","errorCode":null,"errorMessage":"Dry-run failed; missing stubs: ${blockingMissingStubs.join(', ')} / Dry-run failed. See the trace for details.","messagePattern":"Dry-run failed; missing stubs: (.+?) / Dry-run failed\\. See the trace for details\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/cli/src/commands/workflow.ts","lineNumber":1809,"sourceCode":"      execCode: options.execCode,\n      defaultStubs: options.defaultStubs,\n      pauseAtGates: options.pauseAtGates,\n      config: dryRunConfig,\n      aiProfile: applyResolvedRunModelOverrides(dryRunBaseProfile, dryRunModelOverrides),\n    });\n    if (options.json) {\n      await writeJsonLine(result);\n    } else {\n      await writeStdout(`${formatDryRunTrace(result)}\\n`);\n    }\n    if (result.outcome === 'failed') {\n      // Same filter `checkFixture` applies: a stub an `all_done` join tolerated\n      // never blocked anything, so naming it as a cause of this failure points\n      // the reader at the wrong node (#2869).\n      const blockingMissingStubs = result.missingStubs.filter(\n        nodeId => !result.toleratedMissingStubs.includes(nodeId)\n      );\n      throw new Error(\n        blockingMissingStubs.length > 0\n          ? `Dry-run failed; missing stubs: ${blockingMissingStubs.join(', ')}`\n          : 'Dry-run failed. See the trace for details.'\n      );\n    }\n    return;\n  }\n\n  // Validate mutually exclusive flags (defensive — cli.ts checks these for UX, but\n  // workflowRunCommand is the authoritative boundary for programmatic callers)\n  if (options.branchName !== undefined && options.noWorktree) {\n    throw new Error(\n      '--branch and --no-worktree are mutually exclusive.\\n' +\n        '  --branch creates an isolated worktree (safe).\\n' +\n        '  --no-worktree runs directly in your repo (no isolation).\\n' +\n        'Use one or the other.'\n    );\n  }","sourceCodeStart":1791,"sourceCodeEnd":1827,"githubUrl":"https://github.com/coleam00/Archon/blob/0773b9745896ef0612e709c80845a0f7db315b19/packages/cli/src/commands/workflow.ts#L1791-L1827","documentation":"A dry-run simulation failed. If any missing stubs actually blocked nodes (excluding ones an `all_done` join tolerated, per #2869), the error names them; otherwise it points the operator at the trace. Thrown after result.missingStubs is filtered against toleratedMissingStubs.","triggerScenarios":"`archon workflow run wf --dry-run --stubs ...` where the simulation reached a node with no stub value that was required to proceed.","commonSituations":"Incomplete stub file for a new node added to the workflow; stub node ids renamed after a YAML refactor; genuine workflow failure unrelated to stubs.","solutions":["Add stub entries for the named node ids and re-run the dry-run","If no stubs are named, inspect the run trace to find the failing node and fix the workflow or inputs","Check whether stub node ids still match the current YAML node names"],"exampleFix":"// before (stubs.yaml)\nbuild: ok\n// after (add the missing node)\nbuild: ok\ntest: ok","handlingStrategy":"try-catch","validationCode":"const stubs = parseStubsFile(stubsPath);\nconst nodeIds = workflow.nodes.map(n => n.id);\nconst missing = nodeIds.filter(id => !(id in stubs));\nif (missing.length) console.warn('Nodes without stubs:', missing.join(', '));","typeGuard":null,"tryCatchPattern":"try {\n  await runDryRun(args);\n} catch (e) {\n  const m = String(e.message).match(/missing stubs: (.*)$/);\n  if (m) {\n    for (const nodeId of m[1].split(', ').map(s => s.trim())) addStub(nodeId);\n    return runDryRun(args);\n  }\n  throw e; // no stubs named: inspect the trace\n}","preventionTips":["Regenerate stub files whenever node ids change in the YAML","Run dry-runs with --stubs-init to seed a fresh stub file","Check the trace on failures without named stubs"],"tags":["cli","dry-run","stubs","workflow"],"backgroundTag":"missing-stub-dry-run","analyzedSha":"0773b9745896ef0612e709c80845a0f7db315b19","analyzedAt":"2026-09-01T02:28:07.064Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}