ruvnet/RuView · error · Error
Refusing CLI access: RuView repository markers are missing${
Error message
Refusing CLI access: RuView repository markers are missing${missing.length ? ` (${missing.join(', ')})` : ''} What it means
The repo-trust gate verifies the resolved root looks like a real RuView checkout: REQUIRED_MARKERS ['.git', 'README.md', 'v2'] must all exist, and at least one of RUVIEW_MARKERS ['firmware', 'wifi_densepose'] must exist. Missing required markers are listed in the error message. This defeats pointing the CLI at an unrelated or partial directory.
Source
Thrown at harness/ruview/src/repo-trust.js:18
// SPDX-License-Identifier: MIT
import { existsSync, realpathSync, readFileSync, statSync } from 'node:fs';
import { isAbsolute, join, relative } from 'node:path';
const REQUIRED_MARKERS = ['.git', 'README.md', 'v2'];
const RUVIEW_MARKERS = ['firmware', 'wifi_densepose'];
function isWithin(parent, child) {
const rel = relative(parent, child);
return rel === '' || (!rel.startsWith('..') && !isAbsolute(rel));
}
export function assertTrustedRuViewRepo(repoRoot, { trustedRoot = repoRoot } = {}) {
if (!repoRoot || !trustedRoot) throw new TypeError('repoRoot and trustedRoot are required');
const root = realpathSync(repoRoot);
const trustAnchor = realpathSync(trustedRoot);
if (!isWithin(trustAnchor, root) || root !== trustAnchor) throw new Error('Refusing CLI access: repository does not match the configured trusted root');
if (!statSync(root).isDirectory()) throw new Error('Refusing CLI access: trusted root is not a directory');
const missing = REQUIRED_MARKERS.filter((marker) => !existsSync(join(root, marker)));
if (missing.length || !RUVIEW_MARKERS.some((marker) => existsSync(join(root, marker)))) {
throw new Error(`Refusing CLI access: RuView repository markers are missing${missing.length ? ` (${missing.join(', ')})` : ''}`);
}
const readme = readFileSync(join(root, 'README.md'), 'utf8').slice(0, 131_072);
if (!/\b(?:RuView|wifi[- ]densepose)\b/i.test(readme)) throw new Error('Refusing CLI access: README does not identify a RuView checkout');
return root;
}
View on GitHub (pinned to 4685618388)
Solutions
- Run from the root of a complete git clone of the RuView repository (has .git, README.md, v2/, firmware/).
- If using archives/sparse checkouts in CI, include the missing marker paths or switch to a full clone.
- Verify quickly: ls -d .git README.md v2 firmware in the intended repoRoot before invoking.
Example fix
// before
runClaudeCode({ prompt, repoRoot: process.cwd() }) // cwd was harness/ruview
// after
runClaudeCode({ prompt, repoRoot: '/repos/RuView' }) // full checkout root containing .git, README.md, v2/, firmware/ Defensive patterns
Strategy: validation
Validate before calling
import { existsSync } from 'node:fs';
import { join } from 'node:path';
const required = ['.git', 'README.md', 'v2'];
const optional = ['firmware', 'wifi_densepose'];
const ok = required.every((m) => existsSync(join(repoRoot, m))) && optional.some((m) => existsSync(join(repoRoot, m)));
if (!ok) throw new Error(`${repoRoot} is not a complete RuView checkout (needs .git, README.md, v2 and firmware/ or wifi_densepose/)`);
// safe to invoke host adapters with repoRoot Try / catch
try {
await runClaudeCode({ prompt, repoRoot });
} catch (e) {
if (e instanceof Error && e.message.includes('repository markers are missing')) {
// point the user at a full clone; do not fabricate markers
throw new Error(`run from the root of a full RuView clone: ${e.message}`);
}
throw e;
} Prevention
- Always run harness host commands from the root of a complete git clone.
- In CI, avoid sparse checkouts/archive downloads that drop .git or v2/.
- Pre-check the four marker paths before invoking so failures name your own context.
When it happens
Trigger: repoRoot set to harness/ruview or any subdirectory (no .git there), a tarball/sparse checkout shipped without .git or without v2/, or a directory that has never been a RuView clone.
Common situations: Downloaded source archives (no .git); partial/sparse checkouts for CI caching; running the CLI from the wrong cwd after cd-ing into a subfolder; copied trees that dropped large dirs like v2.
Related errors
- Refusing CLI access: repository does not match the configure
- Refusing CLI access: README does not identify a RuView check
- Refusing CLI access: repository marker escapes the trusted r
- Refusing CLI access: README marker is not a regular file
- Refusing CLI access: repository does not match the configure
AI-assisted analysis of ruvnet/RuView@4685618388 (2026-08-16).
Data as JSON: /api/errors/053e2d8e093b5889.
Report an issue: GitHub.