{"record":{"id":"0dc16e3db4d46fbd","repo":"Yeachan-Heo/oh-my-codex","slug":"blocked-ultragoal-checkpoint-codex-snapshot-is-mis","errorCode":null,"errorMessage":"Blocked ultragoal checkpoint Codex snapshot is missing objective text.","messagePattern":"Blocked ultragoal checkpoint Codex snapshot is missing objective text\\.","errorType":"validation","errorClass":"UltragoalError","httpStatus":null,"severity":"error","filePath":"src/ultragoal/artifacts.ts","lineNumber":1819,"sourceCode":"      plan.activeGoalId = goal.id;\n      plan.updatedAt = now;\n      await writePlan(cwd, plan);\n      await appendLedger(cwd, {\n        ts: now,\n        event: 'goal_blocked',\n        goalId: goal.id,\n        status: goal.status,\n        evidence: options.evidence,\n        codexGoal: options.codexGoal,\n        message: 'Codex get_goal was unavailable due to a DB/schema/context error; strict completion reconciliation is deferred until get_goal works.',\n      });\n      return plan;\n    }\n    if (!snapshot?.available) {\n      throw new UltragoalError('Blocked ultragoal checkpoints require either a get_goal snapshot for the completed legacy Codex goal that blocked create_goal, an unavailable get_goal error JSON for a Codex DB/schema/context failure, or a matching native blocked snapshot; pass --codex-goal-json.');\n    }\n    if (!snapshot.objective) {\n      throw new UltragoalError('Blocked ultragoal checkpoint Codex snapshot is missing objective text.');\n    }\n    const blockedSnapshotMatchesExpected = [expectedCodexObjective(plan, goal), ...compatibleCodexObjectives(plan)]\n      .some((objective) => normalizeObjective(objective) === normalizeObjective(snapshot.objective ?? ''));\n    if (snapshot.status === 'blocked') {\n      if (!blockedSnapshotMatchesExpected) {\n        throw new UltragoalError(\n          `Blocked ultragoal checkpoint objective mismatch: expected one of [${[expectedCodexObjective(plan, goal), ...compatibleCodexObjectives(plan)].join(' | ')}], got ${snapshot.objective}. Matching native blocked checkpoints require the expected/compatible Codex objective; finish or clear the foreign goal, or pass a matching blocked get_goal snapshot with --evidence.`,\n        );\n      }\n      const evidence = assertNonEmpty(options.evidence, '--evidence');\n      goal.updatedAt = now;\n      plan.activeGoalId = goal.id;\n      plan.updatedAt = now;\n      await writePlan(cwd, plan);\n      await appendLedger(cwd, {\n        ts: now,\n        event: 'goal_blocked',\n        goalId: goal.id,","sourceCodeStart":1801,"sourceCodeEnd":1837,"githubUrl":"https://github.com/Yeachan-Heo/oh-my-codex/blob/3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2/src/ultragoal/artifacts.ts#L1801-L1837","documentation":"The Codex snapshot supplied for a blocked checkpoint is available but contains no objective text. Objective matching is mandatory for blocked checkpoints, so an empty objective cannot be reconciled against the plan's expected/compatible objectives.","triggerScenarios":"Passing --codex-goal-json whose parsed snapshot has available: true but objective is empty/undefined.","commonSituations":"get_goal returning a sparse object; hand-written snapshot fixtures that omit the objective field; API version changes dropping the objective field.","solutions":["Re-fetch the goal with get_goal and confirm the objective field is populated before recording the checkpoint","If the upstream goal genuinely has no objective, that goal cannot be used as blocked-checkpoint evidence — fix the goal definition or use the db_schema_context_error deferral path","Update snapshot fixtures to include objective text"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"const snap = parseCodexGoalSnapshot(options.codexGoal);\nif (snap?.available && !snap.objective) throw new Error('snapshot missing objective');","typeGuard":"const snapshotHasObjective = (s: any): s is { objective: string } => typeof s?.objective === 'string' && s.objective.length > 0;","tryCatchPattern":null,"preventionTips":["Assert objective presence on every fetched snapshot","Keep snapshot fixtures in sync with the get_goal schema"],"tags":["ultragoal","codex","snapshot","objective","validation"],"backgroundTag":"schema-validation-failed","analyzedSha":"3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2","analyzedAt":"2026-08-27T22:18:39.783Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}