Skip to content

GitHub tracker does not propagate the GHES endpoint to the worker (github_graphql falls back to api.github.com) #388

Description

@hojinzs

Problem

A GitHub Enterprise Server user who configures tracker.endpoint/tracker.apiUrl in WORKFLOW.md gets a half-working system. The orchestrator/CLI talk to the configured GHES endpoint, but the dispatched worker's github_graphql tool falls back to https://api.github.com/graphql because the orchestrator never injects GITHUB_GRAPHQL_API_URL into the worker environment.

packages/tracker-github/src/orchestrator-adapter.ts:43-47 buildWorkerEnvironment returns only { GITHUB_PROJECT_ID } even though project.tracker.apiUrl is in scope. The worker tool reads the endpoint only from process.env (packages/tool-github-graphql/src/tool.ts:134, default at tool.ts:3). The Linear adapter does the right thing (packages/tracker-linear/src/orchestrator-adapter.ts:203 propagates LINEAR_GRAPHQL_URL), so GitHub is the odd one out.

Compounding this, doctor validates auth only against api.github.com and never inspects GITHUB_GRAPHQL_API_URL / tracker.apiUrl (packages/cli/src/commands/doctor.ts, packages/cli/src/github/client.ts hardcoded DEFAULT_API_URL), so a GHES user gets a green doctor run and then a confusing runtime failure.

Impact (OSS user)

GHES users silently hit the wrong host (or fail auth) when the worker posts comments/PR links, with no diagnostic. The only workaround is to separately export GITHUB_GRAPHQL_API_URL on the orchestrator host — an undocumented second place to configure the same fact.

Evidence (real files)

  • packages/tracker-github/src/orchestrator-adapter.ts:43-47, 154.
  • packages/orchestrator/src/service.ts:1578-1633 (worker env block, no GITHUB_GRAPHQL_API_URL).
  • packages/tool-github-graphql/src/tool.ts:3,134; packages/runtime-codex/src/launcher.ts:41.
  • packages/cli/src/github/client.ts DEFAULT_API_URL; packages/cli/src/commands/doctor.ts (no GHES endpoint check).
  • Linear counterexample: packages/tracker-linear/src/orchestrator-adapter.ts:203.

Proposed fix

In the GitHub buildWorkerEnvironment, propagate the resolved tracker.apiUrl as GITHUB_GRAPHQL_API_URL when present so the worker tool inherits the same endpoint. Extend doctor to print the resolved GraphQL endpoint and warn when GITHUB_GRAPHQL_API_URL and tracker.apiUrl disagree. Document GHES setup end to end.


Priority: P1 · Symphony layer: Integration · category: config
Filed from an OSS-user-perspective audit of the repo.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingchangeset:patchRequires a patch changeset for CLI package releaseenterpriseGitHub Enterprise Server / self-hostedintegrationTracker / external system integration

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions