{"record":{"id":"758f9bfb0d1bbd0e","repo":"coleam00/Archon","slug":"label-unknown-key-key-will-be-ignored-h","errorCode":null,"errorMessage":"${label}: unknown key '${key}' will be ignored.${hint}","messagePattern":"(.+?): unknown key '(.+?)' will be ignored\\.(.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"packages/workflows/src/loader.ts","lineNumber":274,"sourceCode":" *\n * `id` is the bare node or workflow id — a stable value a log consumer can\n * filter on. `label` is its human rendering (it may carry a breadcrumb, e.g.\n * `Node 'refine' → loop_group node 'check'`) and appears only inside the\n * message prose, never as a structured field.\n */\nfunction pushUnknownKeyWarning(\n  id: string,\n  label: string,\n  key: string,\n  hint: string,\n  event: string,\n  warnings: string[]\n): void {\n  const message = `${label}: unknown key '${key}' will be ignored.${hint}`;\n  warnings.push(message);\n  // Carry the prose, not just the payload: the run path (`archon workflow run`)\n  // reads this log line and never reads the warning string (#2213).\n  getLog().warn({ id, key, warning: message }, event);\n}\n\n/**\n * Warn about keys Zod silently stripped from a nested config object, recursing\n * through the sub-objects `spec` describes. `keyPath` is the dotted prefix that\n * locates the key inside the node (e.g. `approval.on_reject.`).\n */\nfunction collectUnknownConfigKeys(\n  raw: unknown,\n  spec: NestedKeySpec,\n  id: string,\n  label: string,\n  keyPath: string,\n  event: string,\n  warnings: string[]\n): void {\n  if (spec.kind === 'array') {\n    if (!Array.isArray(raw)) return;","sourceCodeStart":256,"sourceCodeEnd":292,"githubUrl":"https://github.com/coleam00/Archon/blob/0773b9745896ef0612e709c80845a0f7db315b19/packages/workflows/src/loader.ts#L256-L292","documentation":"The loader parses workflow YAML with Zod, which silently strips unrecognized keys. pushUnknownConfigKeyWarning detects stripped keys and pushes a warning naming the location (label), the ignored key, and an optional hint, so authors learn that a typo'd or misplaced field had no effect. The warning is also logged because the run path reads the log line, not the warnings array (#2213).","triggerScenarios":"parseWorkflow → collectUnknownConfigKeys / collectUnknownNodeKeys → pushUnknownConfigKeyWarning on any workflow containing a key absent from the Zod schema — a typo (e.g. `commad:` instead of `command:`), a valid field at the wrong nesting level, or a field from a newer/older Archon version than installed.","commonSituations":"Typoed YAML keys; copying a field between node types that don't support it; using fields documented for a newer release than the installed one; nesting a valid key one level too deep (hint often points to the right sub-object, e.g. `approval.on_reject.`).","solutions":["Fix or remove the unknown key named in the warning; check the workflow schema/docs for correct spelling and location.","Move the key to the correct nesting level if it belongs to a nested object — the label locates it (e.g. `approval.on_reject.` prefix).","Verify against the installed Archon version's docs; the key may not exist in your version or may come from a newer one.","Lint authored workflow YAML in CI so unknown keys block merge before a run silently misbehaves."],"exampleFix":"# before\nnodes:\n  build:\n    type: bash\n    commad: echo hi   # typo — silently ignored\n# after\nnodes:\n  build:\n    type: bash\n    command: echo hi","handlingStrategy":"validation","validationCode":"// Validate workflow YAML at author time and treat unknown-key warnings as failures:\nconst { warnings } = parseWorkflow(yamlSource);\nconst unknown = warnings.filter((w) => w.includes(\"unknown key\"));\nif (unknown.length > 0) {\n  throw new Error('Workflow config has unknown keys:\\n' + unknown.join('\\n'));\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Lint workflow YAML in CI so unknown-key warnings block merge.","Copy fields only from docs/templates matching your installed Archon version.","Check the Zod schema for the node type before inventing field names.","Watch the `archon workflow run` log line — the run path reads the log, not the warnings array (#2213)."],"tags":["workflow","yaml","config","loader","validation"],"backgroundTag":"unknown-config-key","analyzedSha":"0773b9745896ef0612e709c80845a0f7db315b19","analyzedAt":"2026-09-01T02:28:07.064Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}