stablyai/orca · error · Error

--report requires a file path.

Error message

--report requires a file path.

What it means

Thrown by the apphang repro harness when --report is passed without a usable file path. The value is trimmed; if empty (from --report= or --report= ), the harness refuses to write JSON evidence.

Source

Thrown at config/scripts/repro-windows-apphang-terminal-activation.mjs:81

    if (name === '--gpu') {
      const modes = (value ?? '')
        .split(',')
        .map((entry) => entry.trim())
        .filter(Boolean)
      if (modes.length === 0 || modes.some((mode) => !['on', 'off', 'auto'].includes(mode))) {
        throw new Error(`Unsupported --gpu=${value}. Use on, off, auto, or a comma-list.`)
      }
      args.gpuModes = modes
      continue
    }
    if (name === '--output-lines') {
      args.outputLines = parsePositiveInt(name, value)
      continue
    }
    if (name === '--report') {
      args.reportPath = value?.trim() || null
      if (!args.reportPath) {
        throw new Error('--report requires a file path.')
      }
      continue
    }
    throw new Error(`Unknown argument: ${arg}`)
  }

  return args
}

function printHelp() {
  console.log(`Usage:
  node config/scripts/repro-windows-apphang-terminal-activation.mjs [options]

Options:
  --expect=none|repro|pass       none prints measurements, repro exits 0 only when hang evidence is observed,
                                 pass exits 1 if hang evidence is observed. Default: none.
  --gpu=on|off|auto[,mode...]    Terminal GPU setting(s) to run. Default: on.
  --cycles=N                     Activation/output cycles per GPU mode. Default: ${defaultCycles}.

View on GitHub (pinned to 1136503c6a)

Solutions

  1. Provide a concrete file path, e.g. --report=./apphang-report.json.
  2. Omit the flag entirely if you do not need a JSON report (output goes to stdout).

Example fix

// before
node config/scripts/repro-windows-apphang-terminal-activation.mjs --report=
// after
node config/scripts/repro-windows-apphang-terminal-activation.mjs --report=./apphang-report.json
Defensive patterns

Strategy: validation

Validate before calling

const reportPath = value?.trim()
if (!reportPath) {
  throw new Error('--report requires a file path.')
}

Type guard

function isNonEmptyTrimmed(value) {
  return typeof value === 'string' && value.trim().length > 0
}

Prevention

When it happens

Trigger: Passing --report= with no path, or --report= (whitespace only). The parser sets reportPath to null after trimming and checks for falsy.

Common situations: A developer adds the flag intending to fill the path later, or a shell variable expands to empty.

Related errors


AI-assisted analysis of stablyai/orca@1136503c6a (2026-08-12). Data as JSON: /api/errors/1d89c7a7b6e029e2. Report an issue: GitHub.