deepseek-ai/deepseek-harness · error · Error
unsupported goal change version
Error message
unsupported goal change version ${String(value['version'])} What it means
Version guard at the top of decodeGoalChange: a value declaring kind goal/change carries a version other than GOAL_CHANGE_VERSION. The fold refuses to interpret a format it does not own rather than guessing; unrelated value kinds already returned undefined above.
Solutions
- Replay the session with a harness build matching the one that wrote the log
- Report as a version-skew bug if both builds are current
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at packages/goal/goal/src/fold.ts:137 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of deepseek-ai/deepseek-harness@b150a551b8 (2026-08-24).
Data as JSON: /api/errors/9f141b6750099c80.
Report an issue: GitHub.
Appendix: source
Thrown at packages/goal/goal/src/fold.ts:137
if (!isRecord(value) || Object.keys(value).sort().join(',') !== 'id,revision') {
throw new Error('goal clear tombstone must have exactly id and revision fields')
}
if (typeof value['id'] !== 'string' || value['id'].length === 0) {
throw new Error('goal clear tombstone id must be a non-empty string')
}
return { id: GoalId(value['id']), revision: positiveInteger(value['revision'], 'cleared.revision') }
}
/**
* Decode a value that declares itself as a goal change. Unrelated values
* return `undefined`; malformed goal changes fail replay loudly.
* @param value - candidate source change.
* @returns validated goal change or `undefined` for another value kind.
*/
export function decodeGoalChange(value: unknown): GoalChangeMeta | undefined {
if (!isRecord(value) || value['kind'] !== 'goal/change') return undefined
if (value['version'] !== GOAL_CHANGE_VERSION) {
throw new Error(`unsupported goal change version ${String(value['version'])}`)
}
if (value['operation'] === 'clear') {
const allowed = ['cleared', 'clearedAt', 'kind', 'operation', 'version']
if (Object.keys(value).sort().join(',') !== allowed.sort().join(',')) {
throw new Error(`goal clear change must have exactly ${allowed.sort().join(',')} fields`)
}
return {
kind: 'goal/change',
version: GOAL_CHANGE_VERSION,
operation: 'clear',
cleared: decodeRef(value['cleared']),
clearedAt: nonNegativeInteger(value['clearedAt'], 'clearedAt'),
} satisfies GoalClearChangeMeta
}
if (typeof value['operation'] !== 'string'
|| !SNAPSHOT_OPERATIONS.has(value['operation'] as Exclude<GoalOperation, 'clear'>)) {
throw new Error('goal change operation is invalid')
}View on GitHub (pinned to b150a551b8)