stablyai/orca · warning · Error

The production watchdog is macOS-only; run this benchmark on

Error message

The production watchdog is macOS-only; run this benchmark on macOS

What it means

Thrown by runInternal() (the in-Electron measurement path) when process.platform is not 'darwin'. The production main-thread-hang watchdog relies on macOS-specific tooling — notably `/usr/bin/footprint` for physical memory and macOS process APIs — so results on other platforms would not reflect the shipped watchdog. This is the same guard as error 71, checked here inside the spawned Electron child.

Source

Thrown at config/scripts/hang-watchdog-memory-benchmark.mjs:256

        0,
        after.physicalFootprintBytes - before.physicalFootprintBytes
      ),
      startupMs: worker.startupMs,
      ...performance
    }
  } finally {
    await worker.shutdown()
  }
  rmSync(markerPath, { force: true })
  return {
    ...measurements,
    blockedMainThreadVerified: await verifyBoundary(markerPath, startWorker)
  }
}

async function runInternal() {
  if (process.platform !== 'darwin') {
    throw new Error('The production watchdog is macOS-only; run this benchmark on macOS')
  }
  const { app } = await import('electron')
  const boundary = process.env[BOUNDARY_ENV]
  const profileDir = mkdtempSync(path.join(tmpdir(), 'orca-watchdog-bench-'))
  app.setPath('userData', profileDir)
  try {
    await app.whenReady()
    const markerPath = path.join(profileDir, 'main-thread-hang.json')
    const result =
      boundary === 'child'
        ? await measureChild(markerPath)
        : boundary === 'worker'
          ? await measureWorker(markerPath)
          : (() => {
              throw new Error(`Unsupported boundary: ${boundary}`)
            })()
    process.stdout.write(`${RESULT_PREFIX}${JSON.stringify(result)}\n`)
  } finally {

View on GitHub (pinned to 1136503c6a)

Solutions

  1. Run the benchmark on macOS only; on other platforms skip it or gate it in CI with a platform matrix filter.
  2. If debugging the harness logic, run the parts that do not need the watchdog on the target platform instead.
  3. Ensure CI does not schedule this job on ubuntu/windows runners.

Example fix

// before
node config/scripts/hang-watchdog-memory-benchmark.mjs --boundary child  # on Linux
// after: gate by platform
if [ "$(uname)" = "Darwin" ]; then node config/scripts/hang-watchdog-memory-benchmark.mjs --boundary child; fi
Defensive patterns

Strategy: validation

Validate before calling

// Gate the benchmark invocation by platform before launching
if (process.platform !== 'darwin') {
  console.warn('hang-watchdog benchmark is macOS-only; skipping')
  process.exit(0)
}

Type guard

const isMacOS = (): boolean => process.platform === 'darwin'

Prevention

When it happens

Trigger: The internal Electron child process starts on Linux or Windows (process.platform !== 'darwin') and reaches runInternal(). Typically happens when the outer runBenchmark platform guard (error 71) was bypassed or the script is invoked directly with the INTERNAL_ENV flag set.

Common situations: Forcing the benchmark on a Linux CI runner, invoking the internal entry manually for debugging on a non-Mac dev machine, or containerized macOS-less environments.

Related errors


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