{"record":{"id":"400beb897f1d89a5","repo":"deepseek-ai/deepseek-harness","slug":"credential-key-value-must-be-scope-id","errorCode":null,"errorMessage":"credential key \"${value}\" must be \"<scope>/<id>\"","messagePattern":"credential key \"(.+?)\" must be \"<scope>/<id>\"","errorType":"validation","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"packages/credentials/credentials/src/index.ts","lineNumber":86,"sourceCode":"    if (!KEY_SEGMENT_PATTERN.test(segment)) {\n      throw new TypeError(`credential key segment \"${segment}\" must match ${String(KEY_SEGMENT_PATTERN)}`)\n    }\n  }\n  return `${scope}/${id}` as CredentialKey\n}\n\n/**\n * Brand a stored `<scope>/<id>` string as a {@link CredentialKey}. This is the\n * read half of {@link credentialKey}, for a provider admitting keys off disk.\n * @param value - candidate key in its joined form.\n * @returns the branded key.\n * @throws TypeError when the value is not exactly two valid segments.\n */\nexport function parseCredentialKey(value: string): CredentialKey {\n  const segments = value.split('/')\n  const [scope, id] = segments\n  if (segments.length !== 2 || scope === undefined || id === undefined) {\n    throw new TypeError(`credential key \"${value}\" must be \"<scope>/<id>\"`)\n  }\n  return credentialKey(scope, id)\n}\n\n/**\n * The owning plugin's name for one key. A record whose scope names no\n * currently registered owner is an orphan, which a configuration surface must\n * report as such rather than as a working credential.\n * @param key - the key to read.\n * @returns the scope segment.\n */\nexport function credentialKeyScope(key: CredentialKey): string {\n  // The brand's only constructors both validate two segments, so the split\n  // cannot come back short here.\n  return key.slice(0, key.indexOf('/'))\n}\n\n/**","sourceCodeStart":68,"sourceCodeEnd":104,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/credentials/credentials/src/index.ts#L68-L104","documentation":"Error \"credential key \"${value}\" must be \"<scope>/<id>\"\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/credentials/credentials/src/index.ts:86 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"}