{"record":{"id":"e87b1ea7e114b53d","repo":"Yeachan-Heo/oh-my-codex","slug":"unknown-ultragoal-id-id","errorCode":null,"errorMessage":"Unknown ultragoal id: ${id}","messagePattern":"Unknown ultragoal id: (.+?)","errorType":"exception","errorClass":"UltragoalError","httpStatus":null,"severity":"error","filePath":"src/ultragoal/artifacts.ts","lineNumber":1202,"sourceCode":"    event: 'goal_added',\n    goalId: goal.id,\n    status: goal.status,\n    evidence: options.evidence,\n    message: goal.title,\n  });\n  return { plan, goal };\n  });\n}\n\n\nfunction proposalTargetIds(proposal: UltragoalSteeringProposal): string[] {\n  return proposal.targetGoalIds?.length ? proposal.targetGoalIds : (proposal.targetGoalId ? [proposal.targetGoalId] : []);\n}\n\nfunction steeringTargets(plan: UltragoalPlan, proposal: UltragoalSteeringProposal): UltragoalItem[] {\n  return proposalTargetIds(proposal).map((id) => {\n    const goal = plan.goals.find((candidate) => candidate.id === id);\n    if (!goal) throw new UltragoalError(`Unknown ultragoal id: ${id}`);\n    return goal;\n  });\n}\n\nfunction mentionsWeakenedCompletion(...values: Array<string | undefined>): boolean {\n  const normalized = values.filter(Boolean).join(' ').toLowerCase();\n  return /\\b(skip|bypass|weaken|remove|omit|auto[-\\s]?complete|mark complete|complete faster)\\b/.test(normalized)\n    && /\\b(test|tests|verification|review|quality gate|complete|completion)\\b/.test(normalized);\n}\n\nfunction hasProtectedSteeringPayload(value: unknown): boolean {\n  if (!value || typeof value !== 'object') return false;\n  const protectedKeys = new Set([\n    'aggregateCompletion',\n    'brief',\n    'briefPath',\n    'codexObjective',\n    'constraints',","sourceCodeStart":1184,"sourceCodeEnd":1220,"githubUrl":"https://github.com/Yeachan-Heo/oh-my-codex/blob/3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2/src/ultragoal/artifacts.ts#L1184-L1220","documentation":"A steering directive referenced a goal id that does not exist in the current plan. steeringTargets resolves every id from proposalTargetIds (targetGoalIds, or legacy targetGoalId) against plan.goals and throws on the first miss.","triggerScenarios":"Applying a steering proposal whose targetGoalIds contains an id that was removed, renamed, or belongs to a different plan; or using a stale directive captured before goals were re-created (e.g. after create-goals --force).","commonSituations":"Copy-pasting a steering directive between repos or after a plan reset; goals pruned/refactored while a directive was queued; typos or truncation in hand-written goal ids; automation reading ids from an outdated cached plan.","solutions":["Re-read the current plan and copy the exact goal ids (plan.goals.map(g => g.id)) into the directive","If the plan was reset, regenerate the directive against the new ids","Remove stale ids from targetGoalIds if those goals no longer apply","Guard automation by validating ids against the live plan before applying the directive"],"exampleFix":"// before\napplySteering(cwd, { targetGoalIds: ['goal-old-1'], ... }); // id no longer exists\n\n// after\nconst plan = await readUltragoalPlan(cwd);\nconst ids = plan.goals.map(g => g.id); // use these live ids\napplySteering(cwd, { targetGoalIds: ids.slice(0, 2), ... });","handlingStrategy":"validation","validationCode":"const plan = await readUltragoalPlan(cwd);\nconst known = new Set(plan.goals.map(g => g.id));\nconst targets = proposalTargetIds(directive).filter(id => known.has(id));\nif (targets.length) applySteering(cwd, { ...directive, targetGoalIds: targets });","typeGuard":"function isValidTargetIds(ids: string[], plan: UltragoalPlan): boolean { const known = new Set(plan.goals.map(g => g.id)); return ids.every(id => known.has(id)); }","tryCatchPattern":null,"preventionTips":["Always resolve goal ids from the live plan, never from cached output","Regenerate queued directives after any plan reset or goal pruning","Validate ids before applying steering in automation"],"tags":["ultragoal","steering","unknown-id","dangling-reference"],"backgroundTag":"unknown-entity-reference","analyzedSha":"3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2","analyzedAt":"2026-08-27T22:18:39.783Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}