{"record":{"id":"3ace271489b2aa93","repo":"stablyai/orca","slug":"missing-helper-process-record-path","errorCode":null,"errorMessage":"Missing helper process record path","messagePattern":"Missing helper process record path","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"config/scripts/macos-computer-helper-owner-loss-benchmark.mjs","lineNumber":268,"sourceCode":"  }\n  return await Promise.race([\n    new Promise((resolve) => child.once('exit', () => resolve(true))),\n    sleep(timeoutMs).then(() => false)\n  ])\n}\n\nasync function startAuthenticatedSession() {\n  const sidecar = startSidecar()\n  let helper\n  try {\n    const capabilitiesResult = requestSidecar(sidecar, 1, 'capabilities').then(\n      (capabilities) => ({ capabilities }),\n      (error) => ({ error })\n    )\n    helper = await waitForHelper(sidecar.child.pid)\n    const helperRecordPath = process.env[HELPER_RECORD_PATH_ENV]\n    if (!helperRecordPath) {\n      throw new Error('Missing helper process record path')\n    }\n    writeProcessRecord(helperRecordPath, helper)\n    const { capabilities, error } = await capabilitiesResult\n    if (error) {\n      throw error\n    }\n    if (capabilities?.protocolVersion !== 1) {\n      throw new Error(`Unexpected helper handshake: ${JSON.stringify(capabilities)}`)\n    }\n    return { authenticated: capabilities.protocolVersion === 1, sidecar, helper }\n  } catch (error) {\n    sidecar.child.kill('SIGKILL')\n    await stopProcess(helper)\n    throw error\n  }\n}\n\nasync function exerciseActiveRequests(sidecar) {","sourceCodeStart":250,"sourceCodeEnd":286,"githubUrl":"https://github.com/stablyai/orca/blob/1136503c6a231a16dce8f921f6fadb63d181e8db/config/scripts/macos-computer-helper-owner-loss-benchmark.mjs#L250-L286","documentation":"startAuthenticatedSession expects the helper process record path via an env var (HELPER_RECORD_PATH_ENV). After the helper appears it writes the helper's pid/socket info to that path so sibling processes (e.g. the invalid-peer probe) can locate the helper. If the env var is unset, the orchestration cannot publish the record and aborts before the capabilities check.","triggerScenarios":"Running the benchmark script (or its startAuthenticatedSession path) without the HELPER_RECORD_PATH_ENV environment variable exported — typically a harness/CI integration that forgot to set it.","commonSituations":"Invoking the script directly during debugging instead of through the harness that configures the env, a CI template that dropped the var, or a rename of the env var name that left callers setting the old name.","solutions":["Export HELPER_RECORD_PATH_ENV (the actual constant's name) pointing at a writable temp file before running the script.","Run the benchmark via the harness/runner that normally configures it rather than invoking the .mjs directly.","If the var was renamed, update all call sites to the new name."],"exampleFix":"# before\nnode config/scripts/macos-computer-helper-owner-loss-benchmark.mjs\n\n# after\nHELPER_RECORD_PATH=/tmp/helper-record.json node config/scripts/macos-computer-helper-owner-loss-benchmark.mjs","handlingStrategy":"validation","validationCode":"const recordPath = process.env[HELPER_RECORD_PATH_ENV]\nif (!recordPath) {\n  throw new Error(`${HELPER_RECORD_PATH_ENV} must be set to a writable path before running the benchmark`)\n}","typeGuard":"const isSetEnv = (name) => typeof process.env[name] === 'string' && process.env[name].length > 0","tryCatchPattern":null,"preventionTips":["Run the benchmark via the harness that configures HELPER_RECORD_PATH_ENV.","Fail fast at startup if required env is missing, with the var name in the message.","Keep a single source of truth for env-var names shared between harness and script."],"tags":["env","configuration","helper","benchmark"],"backgroundTag":null,"analyzedSha":"1136503c6a231a16dce8f921f6fadb63d181e8db","analyzedAt":"2026-08-12T23:15:58.167Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}