{"record":{"id":"d2100c978d5ad1ec","repo":"ruvnet/RuView","slug":"a-trusted-ruview-checkout-is-required-pass-repo","errorCode":null,"errorMessage":"A trusted RuView checkout is required; pass repo.","messagePattern":"A trusted RuView checkout is required; pass repo\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"harness/homecore/src/tools.js","lineNumber":187,"sourceCode":"      codex: executableOnPath('codex'),\n      claude: executableOnPath('claude'),\n    },\n  };\n}\n\nfunction commandsForProfile(profile) {\n  if (profile === 'full') {\n    return [...PROFILE_COMMANDS.core, ...PROFILE_COMMANDS.wasm, ...PROFILE_COMMANDS.hap];\n  }\n  return PROFILE_COMMANDS[profile];\n}\n\nexport async function runVerification(args = {}, context = {}) {\n  const profile = args.profile || 'core';\n  const commands = commandsForProfile(profile);\n  if (!commands) throw new RangeError(`Unsupported verification profile: ${profile}`);\n  const root = resolveRepo(args.repo, context);\n  if (!root) throw new Error('A trusted RuView checkout is required; pass repo.');\n  const timeoutMs = args.timeout_ms || 900_000;\n  const runner = context.runner || runProcess;\n  const results = [];\n  for (const commandArgs of commands) {\n    const result = await runner('cargo', commandArgs, {\n      cwd: root,\n      timeoutMs,\n      signal: context.signal,\n      maxOutputBytes: 2_097_152,\n    });\n    results.push({\n      command: ['cargo', ...commandArgs],\n      code: result.code,\n      stdout: result.stdout,\n      stderr: result.stderr,\n      truncated: result.truncated,\n    });\n  }","sourceCodeStart":169,"sourceCodeEnd":205,"githubUrl":"https://github.com/ruvnet/RuView/blob/4685618388a5e49fad5b3005806f3bdd6a7c25c3/harness/homecore/src/tools.js#L169-L205","documentation":"resolveRepo returns null only when no repo argument was given, the context carries no trustedRoot, and findHomecoreRepo() walked from cwd up to the filesystem root without finding a directory that looks like a Homecore repo. runVerification then refuses to run cargo commands because there is no trusted checkout to run them in.","triggerScenarios":"Running 'homecore verify' (no --repo) from a directory outside any RuView checkout — home directory, /tmp, or a CI job that never cloned the repository.","commonSituations":"CI pipelines assuming the repo is already present, switching the terminal to another project, invoking via npx from an arbitrary working directory.","solutions":["Pass the checkout path: node harness/homecore/bin/cli.js verify --repo /path/to/RuView","Or cd into the RuView checkout so upward discovery finds it","In CI, clone the repository before invoking verify"],"exampleFix":"# before\n$ cd ~ && node harness/homecore/bin/cli.js verify\n\n# after\n$ node harness/homecore/bin/cli.js verify --repo /path/to/RuView","handlingStrategy":"validation","validationCode":"import { existsSync } from 'node:fs';\nimport { dirname, join } from 'node:path';\nfunction findCheckoutUpward(start = process.cwd()) {\n  let dir = start;\n  while (true) {\n    if (existsSync(join(dir, 'v2/crates/homecore/Cargo.toml'))) return dir;\n    const parent = dirname(dir);\n    if (parent === dir) return null;\n    dir = parent;\n  }\n}\nconst repo = args.repo || findCheckoutUpward();\nif (!repo) {\n  console.error('A trusted RuView checkout is required; pass --repo /path/to/RuView');\n  process.exit(2);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Make CI clone the repository before any verify/doctor invocation","Prefer passing --repo explicitly over relying on upward discovery","Remember discovery only finds checkouts containing the v2/crates/homecore layout"],"tags":["cli","paths","discovery","homecore"],"backgroundTag":null,"analyzedSha":"4685618388a5e49fad5b3005806f3bdd6a7c25c3","analyzedAt":"2026-08-16T06:09:40.886Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}