stablyai/orca · error · Error

Built watchdog does not implement the requested ${options.bo

Error message

Built watchdog does not implement the requested ${options.boundary} boundary; rebuild the matching revision

What it means

Thrown by runBenchmark() when the built watchdog entry exists but does not contain the contract markers for the requested boundary. For boundary 'child' it checks the entry source includes 'ORCA_HANG_WATCHDOG_PARENT_PID'; for 'worker' it checks both 'workerData' and 'parentPort'. A mismatch means the built artifact implements a different boundary than requested — typically a stale build from a different revision.

Source

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

  throw new Error('Electron trial exhausted launcher attempts')
}

function runBenchmark() {
  if (process.platform !== 'darwin') {
    throw new Error('The production watchdog is macOS-only; run this benchmark on macOS')
  }
  if (!existsSync(entryPath)) {
    throw new Error(`Missing ${entryPath}; run pnpm exec electron-vite build first`)
  }
  const options = parseArgs(process.argv.slice(2))
  const builtEntry = readFileSync(entryPath, 'utf8')
  const hasChildContract = builtEntry.includes('ORCA_HANG_WATCHDOG_PARENT_PID')
  const hasWorkerContract = builtEntry.includes('workerData') && builtEntry.includes('parentPort')
  if (
    (options.boundary === 'child' && !hasChildContract) ||
    (options.boundary === 'worker' && !hasWorkerContract)
  ) {
    throw new Error(
      `Built watchdog does not implement the requested ${options.boundary} boundary; rebuild the matching revision`
    )
  }
  const executable = electronPath()
  const results = Array.from({ length: options.trials }, () =>
    runTrial(executable, options.boundary)
  )
  const rssBytes = results.map((result) => result.rssBytes)
  const summedProcessRssDeltaBytes = results.map((result) => result.summedProcessRssDeltaBytes)
  const physicalFootprintDeltaBytes = results.map((result) => result.physicalFootprintDeltaBytes)
  const startupMs = results.map((result) => result.startupMs)
  const cpuMs = results.map((result) => result.cpuMs)
  const eventLoopDelayP95Ms = results.map((result) => result.eventLoopDelayP95Ms)
  const eventLoopDelayP99Ms = results.map((result) => result.eventLoopDelayP99Ms)
  const eventLoopDelayMaxMs = results.map((result) => result.eventLoopDelayMaxMs)
  const report = {
    benchmark: 'hang-watchdog-memory',
    boundary: options.boundary,

View on GitHub (pinned to 1136503c6a)

Solutions

  1. Rebuild the entry from the revision under test: `pnpm exec electron-vite build`.
  2. Ensure the checked-out source implements the requested boundary (the markers exist in src) before building.
  3. Clear a stale out/ cache: remove out/ and rebuild.
  4. Verify with: `grep -c ORCA_HANG_WATCHDOG_PARENT_PID out/main/main-thread-hang-watchdog-entry.js`.

Example fix

# before: out/ built from a child-only revision
node ... --boundary worker  # throws
# after
git checkout <worker-revision> && pnpm exec electron-vite build && node ... --boundary worker
Defensive patterns

Strategy: validation

Validate before calling

const built = readFileSync(entryPath, 'utf8')
const hasChild = built.includes('ORCA_HANG_WATCHDOG_PARENT_PID')
const hasWorker = built.includes('workerData') && built.includes('parentPort')
if (boundary === 'child' && !hasChild) throw new Error('rebuild: entry lacks child contract')
if (boundary === 'worker' && !hasWorker) throw new Error('rebuild: entry lacks worker contract')

Type guard

const boundaryImplementsContract = (src: string, boundary: 'child' | 'worker'): boolean =>
  boundary === 'child'
    ? src.includes('ORCA_HANG_WATCHDOG_PARENT_PID')
    : src.includes('workerData') && src.includes('parentPort')

Prevention

When it happens

Trigger: The entry at out/ was built from a revision that only implemented the child boundary, but --boundary worker is requested (or vice versa); the boundary feature was added/removed between the build and the run; or the contract marker string was renamed in source without rebuilding.

Common situations: Forgetting to rebuild after switching branches/git revs, CI caching a stale out/ directory, or testing a revision where the boundary was not yet implemented.

Related errors


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