{"record":{"id":"e9e2473168a1888a","repo":"ruvnet/ruflo","slug":"unsupported-flywheel-anchor-schema-parsed-schem","errorCode":null,"errorMessage":"unsupported flywheel anchor schema: ${parsed.schemaVersion}","messagePattern":"unsupported flywheel anchor schema: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"v3/@claude-flow/cli/src/services/harness-project-anchor.ts","lineNumber":92,"sourceCode":"  if (escapes(rootLexical) && escapes(rootPhysical)) {\n    throw new Error('flywheel anchor path must stay inside project root');\n  }\n  const actual = realpathSync(absolute);\n  const physical = relative(rootPhysical, actual);\n  if (physical === '..' || physical.startsWith(`..${sep}`) || isAbsolute(physical)) {\n    throw new Error('flywheel anchor symlink escapes project root');\n  }\n  return actual;\n}\n\nfunction parseTasks(path: string): { version: string; tasks: HumanEvalTask[] } {\n  const parsed = JSON.parse(readFileSync(path, 'utf8')) as {\n    schemaVersion?: string;\n    version?: string;\n    tasks?: HumanEvalTask[];\n  };\n  if (parsed.schemaVersion && parsed.schemaVersion !== PROJECT_ANCHOR_SCHEMA) {\n    throw new Error(`unsupported flywheel anchor schema: ${parsed.schemaVersion}`);\n  }\n  if (!Array.isArray(parsed.tasks) || parsed.tasks.length < 4) {\n    throw new Error('project flywheel anchor requires at least 4 labelled tasks');\n  }\n  const ids = new Set<string>();\n  for (const [index, task] of parsed.tasks.entries()) {\n    if (!task || typeof task.id !== 'string' || !/^[A-Za-z0-9._-]{1,128}$/.test(task.id)) {\n      throw new Error(`invalid anchor task id at index ${index}`);\n    }\n    if (ids.has(task.id)) throw new Error(`duplicate anchor task id: ${task.id}`);\n    ids.add(task.id);\n    if (typeof task.q !== 'string' || task.q.trim().length === 0) {\n      throw new Error(`anchor task ${task.id} has no query`);\n    }\n    if (!Array.isArray(task.labels) || task.labels.length === 0 || task.labels.some((label) => typeof label !== 'string' || !label.trim())) {\n      throw new Error(`anchor task ${task.id} requires non-empty string labels`);\n    }\n  }","sourceCodeStart":74,"sourceCodeEnd":110,"githubUrl":"https://github.com/ruvnet/ruflo/blob/2602b642d92234c710ffbe96bfb33007d481ceab/v3/@claude-flow/cli/src/services/harness-project-anchor.ts#L74-L110","documentation":"Anchor task files may declare `schemaVersion`; when present it must equal `ruflo.flywheel-anchor/v1` (PROJECT_ANCHOR_SCHEMA) or parsing aborts before any task is read. This keeps anchor format evolution explicit: a file written for a different schema version fails loudly instead of being misinterpreted.","triggerScenarios":"A tasks JSON carrying a different or typo'd `schemaVersion` (e.g. 'v2', 'flywheel-anchor/v0'), the manifest schema string pasted into the tasks file, or a hand-authored file guessing at the field's value.","commonSituations":"Upgrading claude-flow versions that change the anchor schema; copy-pasting between the manifest and tasks files; downstream tools emitting their own version string.","solutions":["Set `schemaVersion` to exactly `ruflo.flywheel-anchor/v1`, or omit the field entirely (it is optional)","Regenerate the anchor file with the current CLI version rather than hand-editing","Check release notes for schema migrations if your version expects a different identifier"],"exampleFix":"// before\n{ \"schemaVersion\": \"flywheel-anchor/v2\", \"tasks\": [ ... ] }\n\n// after\n{ \"schemaVersion\": \"ruflo.flywheel-anchor/v1\", \"tasks\": [ ... ] }","handlingStrategy":"validation","validationCode":"import { readFileSync } from 'node:fs';\n\nconst PROJECT_ANCHOR_SCHEMA = 'ruflo.flywheel-anchor/v1';\n\nfunction anchorSchemaOk(file: string): boolean {\n  const parsed = JSON.parse(readFileSync(file, 'utf8'));\n  return parsed.schemaVersion === undefined || parsed.schemaVersion === PROJECT_ANCHOR_SCHEMA;\n}","typeGuard":"import type { HumanEvalTask } from '@claude-flow/cli/dist/services/harness-frozen-eval.js';\n\nconst PROJECT_ANCHOR_SCHEMA = 'ruflo.flywheel-anchor/v1';\n\ninterface AnchorFile { schemaVersion?: string; tasks?: HumanEvalTask[]; }\n\nfunction isV1AnchorFile(v: unknown): v is AnchorFile {\n  if (typeof v !== 'object' || v === null) return false;\n  const o = v as Record<string, unknown>;\n  return o.schemaVersion === undefined || o.schemaVersion === PROJECT_ANCHOR_SCHEMA;\n}","tryCatchPattern":"try {\n  return loadEffectiveFlywheelAnchor(root, opts);\n} catch (e) {\n  if (e instanceof Error && e.message.startsWith('unsupported flywheel anchor schema')) {\n    throw new Error(`Anchor file schema is ${e.message}. Expected '${PROJECT_ANCHOR_SCHEMA}' — fix or omit schemaVersion in the tasks file.`);\n  }\n  throw e;\n}","preventionTips":["Omit schemaVersion if you don't need version pinning in the tasks file","Keep the tasks schema and manifest schema strings distinct — don't copy between files","Regenerate anchor files with the current CLI after major upgrades"],"tags":["schema","validation","anchor","config"],"backgroundTag":"schema-validation-failed","analyzedSha":"2602b642d92234c710ffbe96bfb33007d481ceab","analyzedAt":"2026-08-18T21:34:22.708Z","contentChangedAt":"2026-08-18T21:34:22.708Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}