{"record":{"id":"1e097d7b1c1aaa21","repo":"stablyai/orca","slug":"orca-probe-environment-name-is-required","errorCode":null,"errorMessage":"ORCA_PROBE_ENVIRONMENT_NAME is required","messagePattern":"ORCA_PROBE_ENVIRONMENT_NAME is required","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"config/scripts/remote-shared-control-retirement-probe.ts","lineNumber":14,"sourceCode":"import { getDefaultUserDataPath } from '../../src/cli/runtime/metadata'\nimport type { PairingOffer } from '../../src/shared/pairing'\nimport { RemoteRuntimeSharedControlConnection } from '../../src/shared/remote-runtime-shared-control-connection'\nimport {\n  resolveEnvironment,\n  resolveEnvironmentPairingOffer\n} from '../../src/shared/runtime-environment-store'\nimport type { MemorySnapshot } from '../../src/shared/types'\nimport type { RuntimeStatus } from '../../src/shared/runtime-types'\n\nasync function main(): Promise<void> {\n  const environmentName = process.env.ORCA_PROBE_ENVIRONMENT_NAME\n  if (!environmentName) {\n    throw new Error('ORCA_PROBE_ENVIRONMENT_NAME is required')\n  }\n  const userDataPath = getDefaultUserDataPath()\n  const environment = resolveEnvironment(userDataPath, environmentName)\n  const pairing = resolveEnvironmentPairingOffer(userDataPath, environment.id)\n  const cycles = readProbeInteger('ORCA_PROBE_CYCLES', 10, 100)\n  const concurrency = readProbeInteger('ORCA_PROBE_CONCURRENCY', 25, 200)\n  const settleMs = readProbeInteger('ORCA_PROBE_SETTLE_MS', 250, 5_000)\n  const cleanupTimeoutMs = readProbeInteger('ORCA_PROBE_CLEANUP_TIMEOUT_MS', 10_000, 30_000)\n  const unknownResponses = new Map<string, number>()\n  const originalWarn = console.warn\n  console.warn = (message?: unknown, details?: unknown): void => {\n    if (\n      message === '[remote-runtime.shared-control] unknown response id' &&\n      typeof details === 'object' &&\n      details !== null\n    ) {\n      const responseId = String((details as { responseId?: unknown }).responseId ?? 'unknown')\n      unknownResponses.set(responseId, (unknownResponses.get(responseId) ?? 0) + 1)","sourceCodeStart":1,"sourceCodeEnd":32,"githubUrl":"https://github.com/stablyai/orca/blob/1136503c6a231a16dce8f921f6fadb63d181e8db/config/scripts/remote-shared-control-retirement-probe.ts#L1-L32","documentation":"Thrown by the remote shared-control retirement probe when the ORCA_PROBE_ENVIRONMENT_NAME env var is unset. The probe resolves a runtime environment by name from the user data store and exercises its shared-control connection lifecycle, so a target environment name is mandatory.","triggerScenarios":"Invoking the probe script without setting ORCA_PROBE_ENVIRONMENT_NAME, or exporting it as an empty string. The script has no default and no CLI fallback — the env var is the sole input.","commonSituations":"A developer runs the probe to test connection retirement without knowing which env vars it needs, or a wrapper script forgets to pass the environment name.","solutions":["Set ORCA_PROBE_ENVIRONMENT_NAME to a registered runtime environment name, e.g. ORCA_PROBE_ENVIRONMENT_NAME=ssh-prod.","Confirm the environment exists in the user data store before running (the script calls resolveEnvironment which throws separately if not found)."],"exampleFix":"// before\nnode --import tsx config/scripts/remote-shared-control-retirement-probe.ts\n// after\nORCA_PROBE_ENVIRONMENT_NAME=ssh-prod node --import tsx config/scripts/remote-shared-control-retirement-probe.ts","handlingStrategy":"validation","validationCode":"const environmentName = process.env.ORCA_PROBE_ENVIRONMENT_NAME\nif (!environmentName) {\n  throw new Error('Set ORCA_PROBE_ENVIRONMENT_NAME to a registered runtime environment name.')\n}","typeGuard":"function isNonEmptyString(value) {\n  return typeof value === 'string' && value.trim().length > 0\n}","tryCatchPattern":null,"preventionTips":["Print required env vars at the top of the script if any are missing, listing all at once.","Keep a shell snippet or Make target that exports all probe env vars together."],"tags":["env-var","validation","probe","remote-runtime"],"backgroundTag":null,"analyzedSha":"1136503c6a231a16dce8f921f6fadb63d181e8db","analyzedAt":"2026-08-12T23:15:58.167Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}