Context
Part of the review-stack architecture audit (parent epic — hardcoding dimension). Five small,
independent, low-severity items bundled into one issue — each worth fixing for consistency but none are
currently causing live breakage:
1. isOwnReviewThreadAuthor hardcodes a gittensory-slug regex instead of GITHUB_APP_SLUG
src/github/backfill.ts:3856-3858:
export function isOwnReviewThreadAuthor(login) {
return /^gittensory[-\w]*\[bot\]$/i.test(login ?? "") || /^(gittensory|gittensory-orb)$/i.test(login ?? "");
}
Every other "is this our own bot" check in the codebase correctly derives from env.GITHUB_APP_SLUG
(src/github/self-authored.ts:28, src/github/pr-actions.ts:131, src/github/comments.ts:59,
src/queue/processors.ts:12714,12993, src/github/backfill.ts:2517 itself) — self-hoster-configurable
via src/selfhost/setup-wizard.ts:146. Currently harmless (a renamed-slug bot's own comments fall
through to "not authorized" via other trust checks too, same false result either way) but latent —
align with the GITHUB_APP_SLUG pattern for future-proofing.
2. PROTECTED_AUTOCLOSE_AUTHORS is a closed, non-configurable set
src/settings/agent-actions.ts:59: new Set(["github-actions[bot]", "dependabot[bot]", "renovate[bot]"]).
A protective allowlist — missing entries only mean a PR from some other automation bot (e.g.
mergify[bot], snyk-bot, allcontributors[bot]) is theoretically eligible for normal duplicate/slop
auto-close heuristics, not an artificial rejection wall. Add a small env var override
(PROTECTED_AUTOCLOSE_AUTHORS_EXTRA) if this becomes a recurring complaint.
3. Orb dashboard landing-page link hardcodes gittensory.aethereal.dev
src/orb/oauth.ts:116-118 (landingPage). Judgment call: the Orb subsystem is architecturally a single
central hub by design (src/orb/broker.ts: "gittensory holds it centrally and mints on demand"), so this
is closer to GITTENSOR_HOME_URL-style "inherently one canonical service" than a per-self-hoster wall.
Flagging for consistency with PUBLIC_SITE_ORIGIN used one file-family over, and because a future hosted
product could legitimately want to run its own central hub.
4. OAuth returnTo redirect allowlist keeps a dead literal
src/auth/github-oauth.ts:246 — the allowlist unconditionally adds "https://gittensory.aethereal.dev"
as a valid redirect target even when a self-hoster has set their own PUBLIC_SITE_ORIGIN. Harmless
(additive, not exclusionary) but dead weight. Drop the literal, rely solely on siteOrigin.
5. One-off advisory finding hardcodes "jsonbored/gittensory"
packages/gittensory-engine/src/signals/local-branch.ts:807-817 — ships inside the published npm
package the generic gittensory-miner CLI depends on for any repo a miner analyzes. Advisory-only,
narrowly self-referential ("don't treat the Gittensory project itself as a mining target"). Lowest
priority — flagging only because it's a literal in otherwise-generic signal code with no config path.
Acceptance criteria
Context
Part of the review-stack architecture audit (parent epic — hardcoding dimension). Five small,
independent, low-severity items bundled into one issue — each worth fixing for consistency but none are
currently causing live breakage:
1.
isOwnReviewThreadAuthorhardcodes agittensory-slug regex instead ofGITHUB_APP_SLUGsrc/github/backfill.ts:3856-3858:Every other "is this our own bot" check in the codebase correctly derives from
env.GITHUB_APP_SLUG(
src/github/self-authored.ts:28,src/github/pr-actions.ts:131,src/github/comments.ts:59,src/queue/processors.ts:12714,12993,src/github/backfill.ts:2517itself) — self-hoster-configurablevia
src/selfhost/setup-wizard.ts:146. Currently harmless (a renamed-slug bot's own comments fallthrough to "not authorized" via other trust checks too, same
falseresult either way) but latent —align with the
GITHUB_APP_SLUGpattern for future-proofing.2.
PROTECTED_AUTOCLOSE_AUTHORSis a closed, non-configurable setsrc/settings/agent-actions.ts:59:new Set(["github-actions[bot]", "dependabot[bot]", "renovate[bot]"]).A protective allowlist — missing entries only mean a PR from some other automation bot (e.g.
mergify[bot],snyk-bot,allcontributors[bot]) is theoretically eligible for normal duplicate/slopauto-close heuristics, not an artificial rejection wall. Add a small env var override
(
PROTECTED_AUTOCLOSE_AUTHORS_EXTRA) if this becomes a recurring complaint.3. Orb dashboard landing-page link hardcodes gittensory.aethereal.dev
src/orb/oauth.ts:116-118(landingPage). Judgment call: the Orb subsystem is architecturally a singlecentral hub by design (
src/orb/broker.ts: "gittensory holds it centrally and mints on demand"), so thisis closer to
GITTENSOR_HOME_URL-style "inherently one canonical service" than a per-self-hoster wall.Flagging for consistency with
PUBLIC_SITE_ORIGINused one file-family over, and because a future hostedproduct could legitimately want to run its own central hub.
4. OAuth
returnToredirect allowlist keeps a dead literalsrc/auth/github-oauth.ts:246— the allowlist unconditionally adds"https://gittensory.aethereal.dev"as a valid redirect target even when a self-hoster has set their own
PUBLIC_SITE_ORIGIN. Harmless(additive, not exclusionary) but dead weight. Drop the literal, rely solely on
siteOrigin.5. One-off advisory finding hardcodes "jsonbored/gittensory"
packages/gittensory-engine/src/signals/local-branch.ts:807-817— ships inside the published npmpackage the generic
gittensory-minerCLI depends on for any repo a miner analyzes. Advisory-only,narrowly self-referential ("don't treat the Gittensory project itself as a mining target"). Lowest
priority — flagging only because it's a literal in otherwise-generic signal code with no config path.
Acceptance criteria
are judgment calls, not clear-cut bugs).