paperclipai/paperclip · error · Error
Refusing an unrecognized local provider smoke root
Error message
Refusing an unrecognized local provider smoke root
What it means
The script creates its scratch directory with mkdtemp using the prefix `paperclip-local-provider-smoke-` inside the OS temp dir, then asserts the generated basename still carries that prefix before creating subdirectories. If the basename check fails, an internal invariant is broken and it throws this defensive error. Normally unreachable; it guards against platform/mkdtemp behavior changes.
Solutions
- Confirm the mkdtemp template string still starts with `paperclip-local-provider-smoke-` and matches the basename check.
- Retry in a normal environment; if reproducible, inspect any fs mocking or TMPDIR overrides in play.
- Report as a bug if it occurs on an unmodified checkout.
Defensive patterns
Strategy: try-catch
Try / catch
try { await runSmoke(); } catch (e) { if (e.message.includes('unrecognized local provider smoke root')) console.error('mkdtemp prefix invariant broken; report bug'); else throw e; } Prevention
- Do not mock fs.mkdtemp in harnesses
- Keep the mkdtemp template and basename check in sync when editing
- Treat occurrences as a bug report trigger
When it happens
Trigger: Practically never from user input: only if mkdtemp returns a name without the requested prefix (unusual tmpdir behavior, mocked fs, or the script was modified to use a different prefix/template).
Common situations: Custom test harnesses or patched environments stubbing fs.mkdtemp, or contributors editing the mkdtemp template without updating the guard.
Understand the failure class
Background: "This is a bug, please report it": internal invariant violations, unreachable panics, and SNH errors explained — this error's family across 47 libraries.
Related errors
- native_runner_authority_archive_incomplete
- A trusted viewer build is required for public chat reports
- ACPX runtime executable changed while it was verified
- ACPX runtime executable could not be opened as a no-follow…
- ACPX runtime executable must be a bounded executable file
AI-assisted analysis of paperclipai/paperclip@01ad858492 (2026-09-10).
Data as JSON: /api/errors/1adc4e3c9e24e8a2.
Report an issue: GitHub.
Appendix: source
Thrown at packages/paperclip-runner/scripts/run-local-provider-smoke.mjs:186
...typescriptSources,
],
requiredArtifacts.filter((artifact) => artifact !== runnerd),
);
const rustSources = await filesUnder(
resolve(packageRoot, "runner"),
(path) =>
path.endsWith(".rs") ||
path.endsWith("Cargo.toml") ||
path.endsWith("Cargo.lock"),
(path) => /\/(?:target|tests|benches|examples)$/u.test(path),
);
await assertArtifactsFresh("runnerd", rustSources, [runnerd]);
const smokeRoot = await mkdtemp(
join(tmpdir(), "paperclip-local-provider-smoke-"),
);
if (!basename(smokeRoot).startsWith("paperclip-local-provider-smoke-")) {
throw new Error("Refusing an unrecognized local provider smoke root");
}
await Promise.all(
["tmp", "home", "paperclip-home", "codex-home", "claude-home"].map(
(directory) => mkdir(join(smokeRoot, directory), { recursive: true }),
),
);
const ambientEnvironment = { ...process.env };
for (const name of Object.keys(process.env)) delete process.env[name];
for (const name of [
"PATH",
"SystemRoot",
"ComSpec",
"PATHEXT",
"LANG",
"LC_ALL",
"LC_CTYPE",
"TZ",View on GitHub (pinned to 01ad858492)