{"record":{"id":"944ad9b621da6e49","repo":"deepseek-ai/deepseek-harness","slug":"agent-presets-preset-id-presetid-must-match","errorCode":null,"errorMessage":"agent-presets: preset id ${presetId} must match /^[a-z0-9][a-z0-9-]*$/ — the id is a directory name, so anything else could escape the preset root","messagePattern":"agent-presets: preset id (.+?) must match /\\^\\[a-z0-9\\]\\[a-z0-9-\\]\\*\\$/ — the id is a directory name, so anything else could escape the preset root","errorType":"validation","errorClass":"InvalidPresetIdError","httpStatus":null,"severity":"error","filePath":"packages/preset/agent-presets/src/authoring.ts","lineNumber":142,"sourceCode":" * `order` are not — a copy presenting itself identically to its source, or\n * sorted into the shipped set's declared order, would make the roster stop\n * distinguishing them. With no name given and no description to keep, the\n * file is removed so the copy publishes nothing rather than a blank.\n * @param roots - the configured roots; the first `user` one receives the copy.\n * @param source - the resolved preset the copy starts from.\n * @param id - the new preset's id, which becomes its directory name.\n * @param name - display name for the copy; omitted falls back to the id.\n * @returns the absolute path of the new preset directory.\n * @throws when the id is unusable or already occupied on disk, or the\n * deployment configures no writable root.\n */\nexport async function copyComposition(\n  roots: readonly PresetRoot[],\n  source: AgentPreset,\n  id: string,\n  name?: string,\n): Promise<string> {\n  if (!PRESET_ID.test(id)) throw new InvalidPresetIdError(id)\n  const dir = join(writableRoot(roots), id)\n  // The roster check upstream only sees discovered presets; a directory with\n  // no composition file still occupies the name and deserves a readable\n  // refusal rather than a filesystem error code.\n  if (await occupied(dir)) throw new PresetExistsError(id)\n  try {\n    await cp(dirname(source.path), dir, {\n      recursive: true, dereference: true, force: false, errorOnExist: true,\n    })\n    await tightenModes(dir)\n    const rendered = renderPresetMetadata({\n      ...name === undefined ? {} : { name },\n      ...source.description === undefined ? {} : { description: source.description },\n    })\n    const metadataPath = join(dir, METADATA_FILE)\n    if (rendered === undefined) {\n      await rm(metadataPath, { force: true })\n    } else {","sourceCodeStart":124,"sourceCodeEnd":160,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/preset/agent-presets/src/authoring.ts#L124-L160","documentation":"Error \"agent-presets: preset id ${presetId} must match /^[a-z0-9][a-z0-9-]*$/ — the id is a directory name, so anything else could escape the preset root\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/preset/agent-presets/src/authoring.ts:142 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a preset id matching /^[a-z0-9][a-z0-9-]*$/."],"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"}