{"record":{"id":"2070aa72e516f18e","repo":"deepseek-ai/deepseek-harness","slug":"credentials-local-the-value-for-key-in-fil-2070aa","errorCode":null,"errorMessage":"credentials-local: the value for \"${key}\" in ${filename} is empty; remove the key instead","messagePattern":"credentials-local: the value for \"(.+?)\" in (.+?) is empty; remove the key instead","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/credentials/credentials-local/src/index.ts","lineNumber":282,"sourceCode":"  const body = text.split('\\n').map(line => (line.length === 0 ? line : `  ${line}`)).join('\\n')\n  return `version: ${DOCUMENT_VERSION}\\nrefs:\\n${body}${text.endsWith('\\n') ? '' : '\\n'}`\n}\n\n/** Admit a `refs` section: POSIX-identifier keys over non-empty string values. */\nfunction parseRefs(section: unknown, filename: string): Map<string, string> {\n  const entries = new Map<string, string>()\n  for (const [key, value] of Object.entries(asSection(section, 'refs', filename))) {\n    // credentialRef throws on anything that is not a POSIX identifier, which\n    // is exactly the constraint a stored reference must satisfy to be\n    // addressable through the seam.\n    credentialRef(key)\n    // The key name is quoted, never the value: a wrong-typed entry is still a\n    // secret the user meant to store.\n    if (typeof value !== 'string') {\n      throw new TypeError(`credentials-local: the value for \"${key}\" in ${filename} must be a string`)\n    }\n    if (value.length === 0) {\n      throw new Error(`credentials-local: the value for \"${key}\" in ${filename} is empty; remove the key instead`)\n    }\n    entries.set(key, value)\n  }\n  return entries\n}\n\n/** Admit a `records` section: `<scope>/<id>` keys over tagged record mappings. */\nfunction parseRecords(section: unknown, filename: string): Map<string, CredentialRecord> {\n  const entries = new Map<string, CredentialRecord>()\n  for (const [key, value] of Object.entries(asSection(section, 'records', filename))) {\n    parseCredentialKey(key)\n    entries.set(key, parseRecord(key, value, filename))\n  }\n  return entries\n}\n\n/**\n * Refuse an api-key record the read path could not admit, before it is","sourceCodeStart":264,"sourceCodeEnd":300,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/credentials/credentials-local/src/index.ts#L264-L300","documentation":"Error \"credentials-local: the value for \"${key}\" in ${filename} is empty; remove the key instead\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/credentials/credentials-local/src/index.ts:282 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"}