paperclipai/paperclip · error · Error

Refusing unusual public report path ${absolute}

Error message

Refusing unusual public report path ${absolute}

What it means

During publication of a runner protocol eval report, the script walks the public report directory collecting relative file paths. The walk only handles symlinks (rejected earlier), regular directories, and regular files; any other directory entry kind (fifo, socket, device node) aborts the walk with this message naming the absolute path. It is a safety guard so the publisher never processes or uploads odd filesystem objects.

Source

Thrown at packages/paperclip-runner/scripts/publish-runner-protocol-eval-history.mjs:129

      .some((segment) => !segment || segment === "." || segment === "..")
  ) {
    return false;
  }
  return SAFE_REPORT_PATHS.some((pattern) => pattern.test(relativePath));
}

async function relativeFiles(root, current = root) {
  const entries = await readdir(current, { withFileTypes: true });
  const files = [];
  for (const entry of entries) {
    const absolute = join(current, entry.name);
    if (entry.isSymbolicLink())
      throw new Error(`Refusing public report symlink ${absolute}`);
    if (entry.isDirectory())
      files.push(...(await relativeFiles(root, absolute)));
    else if (entry.isFile())
      files.push(relative(root, absolute).split(sep).join("/"));
    else throw new Error(`Refusing unusual public report path ${absolute}`);
  }
  return files.sort();
}

function internalHtmlHrefs(content) {
  return [...content.matchAll(/href\s*=\s*["']([^"']+)["']/giu)]
    .map((match) => match[1])
    .filter((href) => href && !href.startsWith("#"));
}

export async function validatePublicProtocolEvalReport(
  reportRoot,
  { viewerRoot } = {},
) {
  const root = resolve(reportRoot);
  const files = await relativeFiles(root);
  const hasChat = files.some((file) =>
    /^attempts\/[^/]+\/index\.html$/.test(file),

View on GitHub (pinned to 01ad858492)

Solutions

  1. Find and remove the non-regular file: run `find <report-root> ! -type f ! -type d ! -type l` and delete or relocate the reported path.
  2. Regenerate the report from a clean output directory (rm -rf the report dir and rebuild) so no stray sockets/pipes are present.
  3. Check for tools (test harnesses, dev servers) that write sockets into the report dir and point their output elsewhere.

Example fix

# before
$ find public-report ! -type f ! -type d
public-report/attempts/a1/debug.sock (socket)
# after
$ rm public-report/attempts/a1/debug.sock
$ node scripts/publish-runner-protocol-eval-history.mjs ...
Defensive patterns

Strategy: validation

Validate before calling

import { readdirSync } from 'node:fs';
const bad = [];
(function walk(dir) {
  for (const e of readdirSync(dir, { withFileTypes: true })) {
    if (e.isSymbolicLink()) throw new Error(`symlink: ${e.name}`);
    if (e.isDirectory()) walk(`${dir}/${e.name}`);
    else if (!e.isFile()) bad.push(`${dir}/${e.name}`);
  }
})(reportRoot);
if (bad.length) throw new Error(`non-regular files: ${bad.join(', ')}`);

Try / catch

try {
  await publishReport(root);
} catch (err) {
  if (String(err.message).startsWith('Refusing unusual public report path')) {
    console.error('Remove the non-regular file named in the message and re-run:', err.message);
  } else throw err;
}

Prevention

When it happens

Trigger: Running publish-runner-protocol-eval-history.mjs against a report root containing a non-regular, non-directory entry (named pipe, unix socket, device node) at any depth walked by relativeFiles.

Common situations: A test tool or dev server created a fifo/socket inside the report output directory; a stale build artifact left a device file; a debugger dropped a socket next to attempt HTML outputs.

Understand the failure class

Background: "Must be a positive integer", "Invalid value", "Unsupported": the invalid-argument-value error family, when a library rejects the value you pass — this error's family across 35 libraries.

Related errors


AI-assisted analysis of paperclipai/paperclip@01ad858492 (2026-09-10). Data as JSON: /api/errors/3ec517c2e8248766. Report an issue: GitHub.