{"record":{"id":"e28f2abab8d365a9","repo":"can1357/oh-my-pi","slug":"robomp-orchestrator-requires-robomp-gh-proxy-url-a","errorCode":null,"errorMessage":"robomp orchestrator requires ROBOMP_GH_PROXY_URL and ROBOMP_GH_PROXY_HMAC_KEY (run gh-proxy in a sibling container).","messagePattern":"robomp orchestrator requires ROBOMP_GH_PROXY_URL and ROBOMP_GH_PROXY_HMAC_KEY \\(run gh-proxy in a sibling container\\)\\.","errorType":"validation","errorClass":"SystemExit","httpStatus":null,"severity":"error","filePath":"python/robomp/src/cli.py","lineNumber":43,"sourceCode":"from robomp.server import create_app\n\n\ndef _settings_or_die() -> Settings:\n    try:\n        return get_settings()\n    except Exception as exc:\n        click.echo(f\"configuration error: {exc}\", err=True)\n        sys.exit(2)\n\n\ndef _require_proxy_mode(cfg: Settings) -> tuple[str, bytes]:\n    if cfg.github_token is not None:\n        raise SystemExit(\n            \"robomp orchestrator refuses to start with GITHUB_TOKEN set in env. \"\n            \"The PAT must live only in the gh-proxy container.\"\n        )\n    if cfg.gh_proxy_url is None or cfg.gh_proxy_hmac_key is None:\n        raise SystemExit(\n            \"robomp orchestrator requires ROBOMP_GH_PROXY_URL and \"\n            \"ROBOMP_GH_PROXY_HMAC_KEY (run gh-proxy in a sibling container).\"\n        )\n    return cfg.gh_proxy_url, cfg.gh_proxy_hmac_key.get_secret_value().encode(\"utf-8\")\n\n\ndef _build_github(cfg: Settings) -> GitHubProxyClient:\n    base_url, key = _require_proxy_mode(cfg)\n    return GitHubProxyClient(base_url=base_url, hmac_key=key)\n\n\ndef _default_wait_timeout(cfg: Settings) -> float:\n    return cfg.task_timeout_seconds + cfg.task_timeout_hard_grace_seconds + 30.0\n\n\n@click.group()\ndef main() -> None:\n    \"\"\"roboomp control surface.\"\"\"","sourceCodeStart":25,"sourceCodeEnd":61,"githubUrl":"https://github.com/can1357/oh-my-pi/blob/969062200754ea02cfac922e5ebb8c608c079e15/python/robomp/src/cli.py#L25-L61","documentation":"_require_proxy_mode() enforces that proxy mode is fully configured: both ROBOMP_GH_PROXY_URL and ROBOMP_GH_PROXY_HMAC_KEY must be set before the orchestrator can build its GitHub client. Missing either means there is no usable GitHub route, so startup aborts with SystemExit.","triggerScenarios":"Starting the robomp orchestrator with neither GITHUB_TOKEN nor (one or both of) ROBOMP_GH_PROXY_URL/ROBOMP_GH_PROXY_HMAC_KEY set, or setting only one of the proxy pair.","commonSituations":"Fresh deployment where the .env was never populated; the gh-proxy sidecar was added but orchestrator env vars were forgotten; HMAC key stored in a secret manager but not injected; typo in env var names.","solutions":["Set both ROBOMP_GH_PROXY_URL and ROBOMP_GH_PROXY_HMAC_KEY in the orchestrator environment.","Deploy the gh-proxy container as a sibling and point ROBOMP_GH_PROXY_URL at it.","Alternatively, if direct-PAT mode is intended, set GITHUB_TOKEN and run in the mode that supports it.","Verify variable names and that your secret injection (k8s secret, docker secret) actually mounts them."],"exampleFix":"// before\n# ROBOMP_GH_PROXY_URL unset, ROBOMP_GH_PROXY_HMAC_KEY unset\n// after\nexport ROBOMP_GH_PROXY_URL=http://gh-proxy:8080\nexport ROBOMP_GH_PROXY_HMAC_KEY=$(cat /run/secrets/gh_proxy_hmac)","handlingStrategy":"validation","validationCode":"import os\nmissing = [v for v in (\"ROBOMP_GH_PROXY_URL\", \"ROBOMP_GH_PROXY_HMAC_KEY\") if not os.environ.get(v)]\nif missing and not os.environ.get(\"GITHUB_TOKEN\"):\n    raise SystemExit(f\"missing required env vars: {missing}\")","typeGuard":"def proxy_mode_complete(env: dict) -> bool:\n    return bool(env.get(\"ROBOMP_GH_PROXY_URL\")) and bool(env.get(\"ROBOMP_GH_PROXY_HMAC_KEY\"))","tryCatchPattern":null,"preventionTips":["Set both proxy variables together in the same .env/deploy manifest.","Wire the HMAC key from your secret manager into the container env explicitly.","Run a startup preflight that validates required env vars before launch."],"tags":["python","configuration","env-var","github","missing-env-var"],"backgroundTag":"missing-env-var","analyzedSha":"969062200754ea02cfac922e5ebb8c608c079e15","analyzedAt":"2026-08-31T10:29:35.737Z","schemaVersion":2},"datasetVersion":"2026-08-31T14:17:45.589Z"}