Problem: Roughly 33 hardcoded User-Agent HTTP header string literals are sent to GitHub's API and other external APIs across the codebase. Each file independently hardcodes its own copy of the literal instead of importing one shared constant, so a rename today requires touching 20+ files individually with no single source of truth -- and it's easy to miss a few in the process.
Area: Code / Maintainability
Proposal:
Open question (needs a maintainer decision before starting): Two of the literals (src/orb/app-auth.ts line 14 and src/orb/relay.ts line 468, both currently gittensory-orb/0.1) fuse the product brand with the orb internal engine codename. Should the renamed value become something like loopover/0.1 (drop the orb suffix entirely), loopover-orb/0.1 (keep the codename, just rebrand the prefix), or is the internal ORB codename itself also being renamed as part of this rebrand, in which case the suffix should follow whatever that new codename is? This can't be decided from the User-Agent refactor alone -- it needs an answer on whether ORB the codename is in scope for renaming anywhere else first.
Once that's settled, introduce one shared, exported User-Agent constant (plus a small number of sibling/suffixed constants for the genuinely distinct product-area literals) that every call site imports instead of defining its own string. The bulk of the literals are gittensory/0.1 at the GitHub client call sites; the rest are distinct product-area literals (gittensory-api, gittensory-selfhost, gittensory-selfhost/1.0, gittensory-miner, gittensory-content-lane, gittensory-mcp-release-watch, gittensory-production-smoke) that should become sibling constants derived from the same shared base rather than separately hardcoded ad hoc strings. This fixes the maintainability gap and completes the rename in the same pass.
Deliverables:
- One shared, exported User-Agent constant (plus any necessary sibling/suffixed constants for the distinct product-area literals) that every call site imports.
- All ~33 call sites across the files listed in Resources updated to import the shared constant instead of hardcoding their own literal.
- A resolution for the two ORB-fused literals consistent with the maintainer's answer to the open question above.
Acceptance criteria:
Test scenarios:
- Exercise a GitHub API-calling code path (e.g. the GitHub client) and confirm the outbound request carries the new shared constant's value, not the old literal.
- Exercise a self-host code path and a
gittensory-miner package code path and confirm each still sends its own distinct, correctly-branded literal rather than being accidentally collapsed onto the GitHub client's constant.
- Grep the repository after the change for the old literal strings to confirm none remain outside of comments, changelog, or historical references.
Resources:
src/github/client.ts line 51
src/github/public.ts lines 69, 195
src/github/graphql-cache.ts line 88
src/github/backfill.ts line 4393
src/github/migration-tree.ts line 11
src/orb/oauth.ts lines 39, 63
src/auth/github-oauth.ts lines 46, 72, 133, 186, 216
src/registry/sync.ts line 38
src/gittensor/api.ts line 285
src/services/draft.ts line 355
src/signals/focus-manifest-loader.ts line 80
src/selfhost/setup-wizard.ts line 136
src/review/enrichment-wire.ts lines 69, 437
src/review/rag-index.ts line 96
src/review/visual/actions-fallback.ts lines 100, 361
src/review/visual/preview-url.ts line 49
src/review/grounding-wire.ts line 188
src/review/content-lane/netuid-verification.ts line 89
packages/gittensory-miner/lib/opportunity-fanout.js
packages/gittensory-miner/lib/ams-policy.js
packages/gittensory-miner/lib/self-review-context.js
packages/gittensory-miner/lib/live-issue-snapshot.js
packages/gittensory-miner/lib/rejection-signal.js
packages/gittensory-miner/lib/ci-poller.js
scripts/check-mcp-release-due.mjs line 143
scripts/smoke-production.mjs line 109
src/orb/app-auth.ts line 14
src/orb/relay.ts line 468
Boundaries:
- Leave every reference to the separate gittensor network's own domain/name untouched -- the User-Agent literal on line 285 of
src/gittensor/api.ts is the only thing in that file in scope for this issue.
- Do not decide the ORB-related open question yourself. Land the shared-constant refactor for every other call site, and treat
src/orb/app-auth.ts and src/orb/relay.ts as blocked on the maintainer's answer rather than guessing an outcome.
Part of #4761.
Problem: Roughly 33 hardcoded User-Agent HTTP header string literals are sent to GitHub's API and other external APIs across the codebase. Each file independently hardcodes its own copy of the literal instead of importing one shared constant, so a rename today requires touching 20+ files individually with no single source of truth -- and it's easy to miss a few in the process.
Area: Code / Maintainability
Proposal:
Open question (needs a maintainer decision before starting): Two of the literals (
src/orb/app-auth.tsline 14 andsrc/orb/relay.tsline 468, both currentlygittensory-orb/0.1) fuse the product brand with theorbinternal engine codename. Should the renamed value become something likeloopover/0.1(drop theorbsuffix entirely),loopover-orb/0.1(keep the codename, just rebrand the prefix), or is the internal ORB codename itself also being renamed as part of this rebrand, in which case the suffix should follow whatever that new codename is? This can't be decided from the User-Agent refactor alone -- it needs an answer on whether ORB the codename is in scope for renaming anywhere else first.Once that's settled, introduce one shared, exported User-Agent constant (plus a small number of sibling/suffixed constants for the genuinely distinct product-area literals) that every call site imports instead of defining its own string. The bulk of the literals are
gittensory/0.1at the GitHub client call sites; the rest are distinct product-area literals (gittensory-api,gittensory-selfhost,gittensory-selfhost/1.0,gittensory-miner,gittensory-content-lane,gittensory-mcp-release-watch,gittensory-production-smoke) that should become sibling constants derived from the same shared base rather than separately hardcoded ad hoc strings. This fixes the maintainability gap and completes the rename in the same pass.Deliverables:
Acceptance criteria:
src/**orpackages/gittensory-miner/**after this change.src/orb/app-auth.tsandsrc/orb/relay.tsare resolved consistently with the maintainer's decision on the open question, not guessed.gittensorSN74 network's own name is altered.Test scenarios:
gittensory-minerpackage code path and confirm each still sends its own distinct, correctly-branded literal rather than being accidentally collapsed onto the GitHub client's constant.Resources:
src/github/client.tsline 51src/github/public.tslines 69, 195src/github/graphql-cache.tsline 88src/github/backfill.tsline 4393src/github/migration-tree.tsline 11src/orb/oauth.tslines 39, 63src/auth/github-oauth.tslines 46, 72, 133, 186, 216src/registry/sync.tsline 38src/gittensor/api.tsline 285src/services/draft.tsline 355src/signals/focus-manifest-loader.tsline 80src/selfhost/setup-wizard.tsline 136src/review/enrichment-wire.tslines 69, 437src/review/rag-index.tsline 96src/review/visual/actions-fallback.tslines 100, 361src/review/visual/preview-url.tsline 49src/review/grounding-wire.tsline 188src/review/content-lane/netuid-verification.tsline 89packages/gittensory-miner/lib/opportunity-fanout.jspackages/gittensory-miner/lib/ams-policy.jspackages/gittensory-miner/lib/self-review-context.jspackages/gittensory-miner/lib/live-issue-snapshot.jspackages/gittensory-miner/lib/rejection-signal.jspackages/gittensory-miner/lib/ci-poller.jsscripts/check-mcp-release-due.mjsline 143scripts/smoke-production.mjsline 109src/orb/app-auth.tsline 14src/orb/relay.tsline 468Boundaries:
src/gittensor/api.tsis the only thing in that file in scope for this issue.src/orb/app-auth.tsandsrc/orb/relay.tsas blocked on the maintainer's answer rather than guessing an outcome.Part of #4761.