{"record":{"id":"3ad5ff67ad8d2879","repo":"deepseek-ai/deepseek-harness","slug":"credentials-local-filename-declares-version","errorCode":null,"errorMessage":"credentials-local: ${filename} declares version ${JSON.stringify(fields['version'])}; this build reads version ${DOCUMENT_VERSION}","messagePattern":"credentials-local: (.+?) declares version (.+?); this build reads version (.+?)","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/credentials/credentials-local/src/index.ts","lineNumber":216,"sourceCode":"  }\n  const root: unknown = document.toJS() ?? {}\n  if (typeof root !== 'object' || root === null || Array.isArray(root)) {\n    throw new TypeError(`credentials-local: ${filename} must be a mapping`)\n  }\n  const fields = root as Record<string, unknown>\n  const keys = Object.keys(fields)\n  // An empty (or comment-only) document is the empty store and needs no\n  // version: there is nothing in it a later layout could have meant.\n  if (keys.length === 0) return { refs: new Map(), records: new Map() }\n  if (!('version' in fields)) {\n    throw new Error(\n      `credentials-local: ${filename} uses the pre-release flat layout. Add \\`version: ${DOCUMENT_VERSION}\\``\n      + ` and nest the existing ${keys.length} ${keys.length === 1 ? 'entry' : 'entries'} under \\`refs:\\`.`\n      + ' No values need to change.',\n    )\n  }\n  if (fields['version'] !== DOCUMENT_VERSION) {\n    throw new Error(\n      `credentials-local: ${filename} declares version ${JSON.stringify(fields['version'])};`\n      + ` this build reads version ${DOCUMENT_VERSION}`,\n    )\n  }\n  for (const key of keys) {\n    if (key !== 'version' && key !== 'refs' && key !== 'records') {\n      throw new Error(`credentials-local: unknown top-level key \"${key}\" in ${filename}`)\n    }\n  }\n  return { refs: parseRefs(fields['refs'], filename), records: parseRecords(fields['records'], filename) }\n}\n\n/**\n * Render the version-1 layout for a pre-release flat document, or `undefined`\n * for anything else. The flat layout is recognized exactly — a non-empty\n * top-level mapping of addressable reference names to non-empty string\n * scalars, with no `version` key and no document directives — and the rewrite\n * nests the original lines verbatim under `refs:` at two spaces' indent, so","sourceCodeStart":198,"sourceCodeEnd":234,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/credentials/credentials-local/src/index.ts#L198-L234","documentation":"Error \"credentials-local: ${filename} declares version ${JSON.stringify(fields['version'])}; this build reads version ${DOCUMENT_VERSION}\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/credentials/credentials-local/src/index.ts:216 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b150a551b8d465e31e418e1b2eaf5e79bbb7d28e","analyzedAt":"2026-08-24T18:12:29.105Z","schemaVersion":2},"datasetVersion":"2026-08-24T22:17:12.610Z"}