{"record":{"id":"596e899181614c2d","repo":"abhigyanpatwari/GitNexus","slug":"unsupported-group-yaml-version-raw-version-ex","errorCode":null,"errorMessage":"Unsupported group.yaml version: ${raw.version}. Expected 1.","messagePattern":"Unsupported group\\.yaml version: (.+?)\\. Expected 1\\.","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"gitnexus/src/core/group/config-parser.ts","lineNumber":55,"sourceCode":"\nconst DEFAULT_MATCHING = {\n  bm25_threshold: 0.7,\n  embedding_threshold: 0.65,\n  max_candidates_per_step: 3,\n  exclude_links_paths: [] as string[],\n  exclude_links_param_only_paths: false,\n};\n\nexport function parseGroupConfig(yamlContent: string): GroupConfig {\n  const raw = yaml.load(yamlContent, { schema: yaml.JSON_SCHEMA }) as Record<string, unknown>;\n\n  if (!raw || typeof raw !== 'object' || Array.isArray(raw)) {\n    throw new Error('Invalid YAML: expected an object');\n  }\n\n  if (raw.version === undefined) throw new Error('version is required in group.yaml');\n  if (raw.version !== 1) {\n    throw new Error(`Unsupported group.yaml version: ${raw.version}. Expected 1.`);\n  }\n  if (!raw.name || typeof raw.name !== 'string') throw new Error('name is required in group.yaml');\n  if (!raw.repos || typeof raw.repos !== 'object' || Array.isArray(raw.repos)) {\n    throw new Error('repos is required in group.yaml (must be a mapping)');\n  }\n\n  const repos = raw.repos as Record<string, string>;\n  const repoPaths = new Set(Object.keys(repos));\n\n  const rawLinks = (raw.links as unknown[]) || [];\n  const links: GroupManifestLink[] = rawLinks.map((l: unknown, i: number) => {\n    const link = l as Record<string, unknown>;\n    if (!link.from || !repoPaths.has(link.from as string)) {\n      throw new Error(`links[${i}].from \"${link.from}\" does not match any repo path in group`);\n    }\n    if (!link.to || !repoPaths.has(link.to as string)) {\n      throw new Error(`links[${i}].to \"${link.to}\" does not match any repo path in group`);\n    }","sourceCodeStart":37,"sourceCodeEnd":73,"githubUrl":"https://github.com/abhigyanpatwari/GitNexus/blob/d540b00184d71a896261ee02670da9a92d59d8f7/gitnexus/src/core/group/config-parser.ts#L37-L73","documentation":"Thrown by parseGroupConfig when the 'version' field is present but not equal to 1. Only version 1 is implemented; any other value (2, '1.0', a string, etc.) is rejected. This guards forward/backward incompatibility explicitly rather than silently misinterpreting a newer manifest.","triggerScenarios":"A group.yaml with version: 2, version: '1.0' (string), version: 0, or any non-1 value.","commonSituations":"An old manifest predating versioning (version set to something legacy); a manifest written for a future GitNexus version not yet supported by this build; a typo like version: 1.0 (float) which js-yaml parses to the number 1 in JSON_SCHEMA but could be 1.0 in other schemas.","solutions":["Set `version: 1` (the integer literal, no quotes, no decimal) — the only supported value.","If you genuinely need a newer manifest format, upgrade GitNexus to a build that supports that version.","If migrating an old unversioned manifest, set version: 1 and audit the remaining fields against the v1 schema."],"exampleFix":"# before — float parsed by YAML, not the integer 1\nversion: 1.0\n\n# after\nversion: 1","handlingStrategy":"validation","validationCode":"const raw = yaml.load(text, { schema: yaml.JSON_SCHEMA }) as Record<string, unknown>;\nif (raw.version !== 1) {\n  throw new Error(`manifest version ${String(raw.version)} not supported by this build`);\n}","typeGuard":"function isSupportedVersion(v: unknown): v is 1 { return v === 1; }","tryCatchPattern":null,"preventionTips":["Write `version: 1` as a bare integer literal — avoid quotes or decimals that YAML may parse differently.","When upgrading GitNexus, re-check which manifest versions this build supports.","If authoring for a future format, wait for a GitNexus build that declares support for that version."],"tags":["yaml","group-config","version","config-parser"],"backgroundTag":null,"analyzedSha":"d540b00184d71a896261ee02670da9a92d59d8f7","analyzedAt":"2026-08-12T19:50:25.132Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}