{"record":{"id":"dad862f881c8f69f","repo":"abhigyanpatwari/GitNexus","slug":"source-branch-name-must-not-contain","errorCode":null,"errorMessage":"${source}: branch name must not contain \"..\".","messagePattern":"(.+?): branch name must not contain \"\\.\\.\"\\.","errorType":"validation","errorClass":"GitNexusRcError","httpStatus":null,"severity":"warning","filePath":"gitnexus/src/cli/analyze-config.ts","lineNumber":185,"sourceCode":"  }\n  if (trimmed.length > BRANCH_MAX_LENGTH) {\n    throw new GitNexusRcError(`${source}: branch name is too long (max ${BRANCH_MAX_LENGTH}).`);\n  }\n  assertNoHiddenChars(trimmed, source);\n  if (/\\s/.test(trimmed)) {\n    throw new GitNexusRcError(`${source}: branch name must not contain whitespace.`);\n  }\n  // git ref-name rules (subset): reject characters git itself forbids in refs.\n  if (/[~^:?*[\\\\]/.test(trimmed)) {\n    throw new GitNexusRcError(\n      `${source}: branch name contains characters not allowed in a git ref (~ ^ : ? * [ \\\\).`,\n    );\n  }\n  if (trimmed.startsWith('-')) {\n    throw new GitNexusRcError(`${source}: branch name must not start with \"-\".`);\n  }\n  if (trimmed.includes('..')) {\n    throw new GitNexusRcError(`${source}: branch name must not contain \"..\".`);\n  }\n  // Git permits a backtick in a ref, but the branch is embedded inside a\n  // Markdown inline-code span in the generated AGENTS.md/CLAUDE.md regression\n  // example, where a backtick would close the span early and let the rest of\n  // the template render as instruction text. Reject it at this single\n  // chokepoint so all three tiers (CLI flag, .gitnexusrc, auto-detect via\n  // sanitizeDetectedBranch) are covered (#1996 tri-review P1).\n  if (trimmed.includes('`')) {\n    throw new GitNexusRcError(\n      `${source}: branch name must not contain a backtick (it would break the generated Markdown).`,\n    );\n  }\n  return trimmed;\n}\n\n/**\n * Best-effort validation for an auto-detected branch (from git). Never throws —\n * returns `undefined` for anything unusable so the resolver falls back to the","sourceCodeStart":167,"sourceCodeEnd":203,"githubUrl":"https://github.com/abhigyanpatwari/GitNexus/blob/52924ef12c2290ceee4612526a828ec4cdf2047f/gitnexus/src/cli/analyze-config.ts#L167-L203","documentation":"On Windows with a non-ASCII path, both the 8.3 short-name conversion and the main-thread junction fallback failed to produce an ASCII-safe form, so the original path is passed through and LadybugDB may fail with \"Cannot open file.\" This is the terminal degradation of toNativeSafePath — every mitigation was attempted.","triggerScenarios":"tryShortPath(p) returns null AND tryJunction(targetDir, leaf) fails or the target dir does not exist, on the main thread with a NON_ASCII_RE-matching path — 8.3 generation disabled and junction creation blocked (permissions, volume type, path length).","commonSituations":"CJK/emoji/extended-Unicode repo paths on volumes with 8.3 naming stripped; locked-down machines where creating junctions is denied; storage roots on network shares that do not support junctions or short names.","solutions":["Move the repo to a path without CJK/Unicode characters — the message's primary recommendation","Or enable 8.3 short names: fsutil 8dot3name set 0 (admin), then place/copy files anew so short names are generated","Verify short names now resolve: fsutil file queryshortname <file>","If LadybugDB still errors 'Cannot open file.' after this warn, the path is being used verbatim — relocation is the reliable fix"],"exampleFix":":: before\nC:\\Users\\太田\\repos\\my-repo> npx gitnexus analyze\n\n:: after\nC:\\src\\my-repo> npx gitnexus analyze\n:: or, on the original volume (admin):\nfsutil 8dot3name set 0","handlingStrategy":"validation","validationCode":"import fs from 'node:fs';\nimport { execSync } from 'node:child_process';\nconst NON_ASCII_RE = /[^\\x00-\\x7f]/;\n// fail fast with an actionable message before analysis starts\nexport const assertAsciiSafePath = (p: string): void => {\n  if (process.platform !== 'win32' || !NON_ASCII_RE.test(p)) return;\n  let shortNamesEnabled = false;\n  try {\n    shortNamesEnabled = /8dot3name creation is enabled/i\n      .test(execSync(`fsutil 8dot3name query ${p.slice(0, 2)}`).toString());\n  } catch {}\n  if (!shortNamesEnabled) {\n    throw new Error(\n      `Non-ASCII path \"${p}\" with 8.3 names disabled: move the repo to an ASCII path ` +\n      'or run `fsutil 8dot3name set 0`.',\n    );\n  }\n};","typeGuard":"const needsAsciiSafePath = (p: string): boolean =>\n  process.platform === 'win32' && /[^\\x00-\\x7f]/.test(p);","tryCatchPattern":null,"preventionTips":["Default to ASCII storage/repo locations on Windows CI hosts","Check `fsutil 8dot3name query <drive>` when provisioning build machines","Treat any 'Cannot open file.' LadybugDB error on a Unicode path as this condition first"],"tags":["windows","non-ascii-path","ladybugdb"],"backgroundTag":"non-ascii-path-windows","analyzedSha":"52924ef12c2290ceee4612526a828ec4cdf2047f","analyzedAt":"2026-08-20T23:29:22.980Z","contentChangedAt":"2026-08-20T23:29:22.980Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}