diff --git a/src/services/self-dogfood-registration-pack.ts b/src/services/self-dogfood-registration-pack.ts index 42bb8901bd..58124be07d 100644 --- a/src/services/self-dogfood-registration-pack.ts +++ b/src/services/self-dogfood-registration-pack.ts @@ -1,3 +1,4 @@ +import { GITTENSOR_SELF_REPO_DEFAULT, resolveGittensorySelfRepoFullName } from "../config/gittensory-repo-focus-manifest"; import { buildGittensorConfigRecommendation, buildRegistrationReadiness, @@ -8,7 +9,10 @@ import { } from "../signals/registration-readiness"; import { nowIso } from "../utils/json"; -export const DEFAULT_SELF_DOGFOOD_REPO = "JSONbored/gittensory"; +// Re-exported for backward compatibility with existing callers/tests (#2911); the actual default value and +// resolver logic live in config/gittensory-repo-focus-manifest.ts, the single source of truth shared with +// upstream/ruleset.ts. +export const DEFAULT_SELF_DOGFOOD_REPO = GITTENSOR_SELF_REPO_DEFAULT; export type SelfDogfoodActionArea = { area: string; @@ -32,11 +36,7 @@ export type SelfDogfoodRegistrationPack = { rerunHint: string; }; -export function resolveSelfDogfoodRepoFullName(env: { GITTENSORY_DRIFT_ISSUE_REPO?: string }): string { - const configured = env.GITTENSORY_DRIFT_ISSUE_REPO?.trim(); - if (!configured || !configured.includes("/")) return DEFAULT_SELF_DOGFOOD_REPO; - return configured; -} +export const resolveSelfDogfoodRepoFullName = resolveGittensorySelfRepoFullName; export function buildSelfDogfoodRegistrationPack(args: { repoFullName: string; diff --git a/src/upstream/ruleset.ts b/src/upstream/ruleset.ts index 18f01a25e8..3f7963f378 100644 --- a/src/upstream/ruleset.ts +++ b/src/upstream/ruleset.ts @@ -10,6 +10,7 @@ import { updateUpstreamDriftReportIssue, upsertUpstreamDriftReport, } from "../db/repositories"; +import { resolveGittensorySelfRepoFullName } from "../config/gittensory-repo-focus-manifest"; import { timeoutFetch } from "../github/client"; import { resolveUpstreamCommitSha } from "./commit"; import { isGlobalAgentPause } from "../settings/agent-execution"; @@ -34,7 +35,6 @@ import { errorMessage, jsonString, nowIso } from "../utils/json"; // The Gittensor upstream repo/ref defaults are single-sourced from src/scoring/model.ts (where the same // env.GITTENSOR_UPSTREAM_* override is honoured) — see DEFAULT_GITTENSOR_UPSTREAM_REPO/REF. -const DEFAULT_DRIFT_ISSUE_REPO = "JSONbored/gittensory"; const UPSTREAM_STALE_MS = 2 * 60 * 60 * 1000; const REGISTRY_HYPERPARAMETER_DRIFT_LIMIT = 100; @@ -285,7 +285,7 @@ export async function fileUpstreamDriftIssues(env: Env): Promise report.status === "open"); let created = 0;