diff --git a/apps/loopover-ui/src/lib/mcp-package.ts b/apps/loopover-ui/src/lib/mcp-package.ts index 58dc510a18..b7e6cacecd 100644 --- a/apps/loopover-ui/src/lib/mcp-package.ts +++ b/apps/loopover-ui/src/lib/mcp-package.ts @@ -8,7 +8,7 @@ export const MCP_PACKAGE_REGISTRY_URL = `https://registry.npmjs.org/${MCP_PACKAG export const MCP_PACKAGE_NPM_URL = `https://www.npmjs.com/package/${MCP_PACKAGE_NAME}`; // Tracks the latest PUBLISHED release: ui:version-audit requires this to equal npm dist-tags.latest, so it is // bumped to a new version only AFTER that version publishes (never ahead of npm). -export const MCP_PACKAGE_KNOWN_LATEST_VERSION = "0.9.0"; +export const MCP_PACKAGE_KNOWN_LATEST_VERSION = "3.1.1"; export const MCP_MINIMUM_SUPPORTED_VERSION = "0.5.0"; export type NpmPackageMetadata = { diff --git a/apps/loopover-ui/src/lib/selfhost-env-reference.ts b/apps/loopover-ui/src/lib/selfhost-env-reference.ts index dd6b6992a9..d41d76c840 100644 --- a/apps/loopover-ui/src/lib/selfhost-env-reference.ts +++ b/apps/loopover-ui/src/lib/selfhost-env-reference.ts @@ -5,6 +5,10 @@ export type SelfHostEnvReferenceRow = { }; export const SELFHOST_ENV_REFERENCE_ROWS: SelfHostEnvReferenceRow[] = [ + { + name: "ADMIN_GITHUB_LOGINS", + firstReference: "src/queue/processors.ts", + }, { name: "AI_ADVISORY", firstReference: "src/selfhost/ai.ts", @@ -21,10 +25,18 @@ export const SELFHOST_ENV_REFERENCE_ROWS: SelfHostEnvReferenceRow[] = [ name: "AI_ADVISORY_MODEL", firstReference: "src/server.ts", }, + { + name: "AI_BYOK_DAILY_REPO_LIMIT", + firstReference: "src/services/ai-review.ts", + }, { name: "AI_COMBINE", firstReference: "src/selfhost/ai.ts", }, + { + name: "AI_DAILY_NEURON_BUDGET", + firstReference: "src/services/ai-review.ts", + }, { name: "AI_DUAL_REVIEW", firstReference: "src/selfhost/ai.ts", @@ -41,6 +53,14 @@ export const SELFHOST_ENV_REFERENCE_ROWS: SelfHostEnvReferenceRow[] = [ name: "AI_EMBED_MODEL", firstReference: "src/selfhost/ai.ts", }, + { + name: "AI_GATEWAY_ID", + firstReference: "src/services/ai-review.ts", + }, + { + name: "AI_MAX_OUTPUT_TOKENS", + firstReference: "src/services/ai-review.ts", + }, { name: "AI_ON_MERGE", firstReference: "src/selfhost/ai.ts", @@ -49,6 +69,22 @@ export const SELFHOST_ENV_REFERENCE_ROWS: SelfHostEnvReferenceRow[] = [ name: "AI_PROVIDER", firstReference: "src/selfhost/ai-config.ts", }, + { + name: "AI_PUBLIC_COMMENTS_ENABLED", + firstReference: "src/services/ai-review.ts", + }, + { + name: "AI_REVIEW_PLAN", + firstReference: "src/services/ai-review.ts", + }, + { + name: "AI_SUMMARIES_ENABLED", + firstReference: "src/services/ai-review.ts", + }, + { + name: "AI_VISION", + firstReference: "src/queue/processors.ts", + }, { name: "AI_VISION_API_KEY", firstReference: "src/server.ts", @@ -133,6 +169,14 @@ export const SELFHOST_ENV_REFERENCE_ROWS: SelfHostEnvReferenceRow[] = [ name: "CONFIG_DIR_EMPTY_ACKNOWLEDGED", firstReference: "src/server.ts", }, + { + name: "CONTRIBUTOR_CAP_CANCEL_CI_DEFAULT", + firstReference: "src/queue/processors.ts", + }, + { + name: "CONTRIBUTOR_EVIDENCE_BATCH_SIZE", + firstReference: "src/queue/processors.ts", + }, { name: "CRON_INTERVAL_MS", firstReference: "src/server.ts", @@ -177,6 +221,10 @@ export const SELFHOST_ENV_REFERENCE_ROWS: SelfHostEnvReferenceRow[] = [ name: "GITHUB_APP_PRIVATE_KEY", firstReference: "src/selfhost/orb-collector.ts", }, + { + name: "GITHUB_APP_SLUG", + firstReference: "src/queue/processors.ts", + }, { name: "GITHUB_CACHE_TTL_SECONDS", firstReference: "src/server.ts", @@ -193,6 +241,10 @@ export const SELFHOST_ENV_REFERENCE_ROWS: SelfHostEnvReferenceRow[] = [ name: "GITHUB_INSTALLATION_CONCURRENCY_LIMIT", firstReference: "src/selfhost/installation-concurrency-admission.ts", }, + { + name: "GITHUB_PUBLIC_TOKEN", + firstReference: "src/queue/ai-review-orchestration.ts", + }, { name: "HOME", firstReference: "src/selfhost/ai.ts", @@ -209,6 +261,10 @@ export const SELFHOST_ENV_REFERENCE_ROWS: SelfHostEnvReferenceRow[] = [ name: "LOOPOVER_REPO_CONFIG_DIR", firstReference: "src/server.ts", }, + { + name: "LOOPOVER_REVIEW_CONTINUOUS", + firstReference: "src/queue/processors.ts", + }, { name: "LOOPOVER_VERSION", firstReference: "src/selfhost/otel.ts", @@ -486,17 +542,26 @@ export const SELFHOST_ENV_REFERENCE_ROWS: SelfHostEnvReferenceRow[] = [ export const SELFHOST_ENV_REFERENCE_MARKDOWN = [ "| Name | First reference |", "| --- | --- |", + "| `ADMIN_GITHUB_LOGINS` | `src/queue/processors.ts` |", "| `AI_ADVISORY` | `src/selfhost/ai.ts` |", "| `AI_ADVISORY_API_KEY` | `src/server.ts` |", "| `AI_ADVISORY_BASE_URL` | `src/server.ts` |", "| `AI_ADVISORY_MODEL` | `src/server.ts` |", + "| `AI_BYOK_DAILY_REPO_LIMIT` | `src/services/ai-review.ts` |", "| `AI_COMBINE` | `src/selfhost/ai.ts` |", + "| `AI_DAILY_NEURON_BUDGET` | `src/services/ai-review.ts` |", "| `AI_DUAL_REVIEW` | `src/selfhost/ai.ts` |", "| `AI_EMBED_API_KEY` | `src/server.ts` |", "| `AI_EMBED_BASE_URL` | `src/server.ts` |", "| `AI_EMBED_MODEL` | `src/selfhost/ai.ts` |", + "| `AI_GATEWAY_ID` | `src/services/ai-review.ts` |", + "| `AI_MAX_OUTPUT_TOKENS` | `src/services/ai-review.ts` |", "| `AI_ON_MERGE` | `src/selfhost/ai.ts` |", "| `AI_PROVIDER` | `src/selfhost/ai-config.ts` |", + "| `AI_PUBLIC_COMMENTS_ENABLED` | `src/services/ai-review.ts` |", + "| `AI_REVIEW_PLAN` | `src/services/ai-review.ts` |", + "| `AI_SUMMARIES_ENABLED` | `src/services/ai-review.ts` |", + "| `AI_VISION` | `src/queue/processors.ts` |", "| `AI_VISION_API_KEY` | `src/server.ts` |", "| `AI_VISION_BASE_URL` | `src/server.ts` |", "| `AI_VISION_MODEL` | `src/server.ts` |", @@ -518,6 +583,8 @@ export const SELFHOST_ENV_REFERENCE_MARKDOWN = [ "| `CODEX_AI_TIMEOUT_MS` | `src/selfhost/ai.ts` |", "| `CODEX_HOME` | `src/selfhost/ai.ts` |", "| `CONFIG_DIR_EMPTY_ACKNOWLEDGED` | `src/server.ts` |", + "| `CONTRIBUTOR_CAP_CANCEL_CI_DEFAULT` | `src/queue/processors.ts` |", + "| `CONTRIBUTOR_EVIDENCE_BATCH_SIZE` | `src/queue/processors.ts` |", "| `CRON_INTERVAL_MS` | `src/server.ts` |", "| `DATABASE_PATH` | `src/server.ts` |", "| `DATABASE_URL` | `src/selfhost/preflight.ts` |", @@ -529,14 +596,17 @@ export const SELFHOST_ENV_REFERENCE_MARKDOWN = [ "| `FOREGROUND_LIVENESS_MAX_RELEASE_PER_SWEEP` | `src/selfhost/foreground-liveness.ts` |", "| `GITHUB_APP_ID` | `src/selfhost/orb-collector.ts` |", "| `GITHUB_APP_PRIVATE_KEY` | `src/selfhost/orb-collector.ts` |", + "| `GITHUB_APP_SLUG` | `src/queue/processors.ts` |", "| `GITHUB_CACHE_TTL_SECONDS` | `src/server.ts` |", "| `GITHUB_INSTALLATION_CONCURRENCY_DEFER_MS` | `src/selfhost/installation-concurrency-admission.ts` |", "| `GITHUB_INSTALLATION_CONCURRENCY_ENABLED` | `src/selfhost/installation-concurrency-admission.ts` |", "| `GITHUB_INSTALLATION_CONCURRENCY_LIMIT` | `src/selfhost/installation-concurrency-admission.ts` |", + "| `GITHUB_PUBLIC_TOKEN` | `src/queue/ai-review-orchestration.ts` |", "| `HOME` | `src/selfhost/ai.ts` |", "| `LOOPOVER_ENABLE_PAGERDUTY` | `src/services/notify-pagerduty.ts` |", "| `LOOPOVER_ENABLE_UNSAFE_CODEX_REVIEWER` | `src/selfhost/ai.ts` |", "| `LOOPOVER_REPO_CONFIG_DIR` | `src/server.ts` |", + "| `LOOPOVER_REVIEW_CONTINUOUS` | `src/queue/processors.ts` |", "| `LOOPOVER_VERSION` | `src/selfhost/otel.ts` |", "| `MAINTENANCE_ADMISSION_DEFER_MS` | `src/selfhost/maintenance-admission.ts` |", "| `MAINTENANCE_ADMISSION_DRAIN_AGE_MS` | `src/selfhost/maintenance-admission.ts` |", diff --git a/apps/loopover-ui/src/routes/changelog.test.tsx b/apps/loopover-ui/src/routes/changelog.test.tsx index 819d05b1e9..5d2023c72b 100644 --- a/apps/loopover-ui/src/routes/changelog.test.tsx +++ b/apps/loopover-ui/src/routes/changelog.test.tsx @@ -19,7 +19,7 @@ function renderWithClient(ui: ReactNode) { return render({ui}); } -// Deliberately NOT the "0.9.0" MCP_PACKAGE_KNOWN_LATEST_VERSION fallback the component renders in its +// Deliberately NOT MCP_PACKAGE_KNOWN_LATEST_VERSION, the fallback the component renders in its // always-present intro paragraph even before data loads -- using a distinct fixture version means a // match can only come from the real fetched data, not a loading-state false positive. const NPM_METADATA = { diff --git a/scripts/gen-selfhost-env-reference.mjs b/scripts/gen-selfhost-env-reference.mjs index b598fb4554..7b69d5562b 100644 --- a/scripts/gen-selfhost-env-reference.mjs +++ b/scripts/gen-selfhost-env-reference.mjs @@ -10,6 +10,9 @@ export const DEFAULT_SOURCE_ROOTS = [ "src/server.ts", "src/services/notify-discord.ts", "src/services/notify-pagerduty.ts", + "src/services/ai-review.ts", + "src/queue/ai-review-orchestration.ts", + "src/queue/processors.ts", "scripts/build-selfhost.mjs", "scripts/migrate-selfhost-sqlite-to-postgres.ts", "scripts/smoke-observability-traces.mjs", diff --git a/test/unit/selfhost-env-reference-script.test.ts b/test/unit/selfhost-env-reference-script.test.ts index 0bd840c82a..c3c5b383f2 100644 --- a/test/unit/selfhost-env-reference-script.test.ts +++ b/test/unit/selfhost-env-reference-script.test.ts @@ -8,6 +8,21 @@ import { writeSelfHostEnvReference, } from "../../scripts/gen-selfhost-env-reference.mjs"; +// #6993: DEFAULT_SOURCE_ROOTS never scanned src/services/ai-review.ts, src/queue/ai-review-orchestration.ts, +// or src/queue/processors.ts, so four AI review-pipeline env vars that ARE read in those files (and already +// documented in src/env.d.ts's self-host doc-comment block) never reached the generated reference. Runs +// against the real repo (default rootDir/sourceRoots) rather than a fixture, since the point is confirming +// the actual new source roots are scanned, not a synthetic stand-in for them. +describe("gen-selfhost-env-reference AI review-pipeline source roots (#6993)", () => { + it("scans the newly-added source roots and finds their env vars", () => { + const names = collectSelfHostEnvVars().map((entry) => entry.name); + expect(names).toContain("AI_SUMMARIES_ENABLED"); + expect(names).toContain("AI_PUBLIC_COMMENTS_ENABLED"); + expect(names).toContain("AI_MAX_OUTPUT_TOKENS"); + expect(names).toContain("AI_BYOK_DAILY_REPO_LIMIT"); + }); +}); + function fixtureRoot(): string { const root = mkdtempSync(join(tmpdir(), "gt-env-reference-")); mkdirSync(join(root, "src", "selfhost", "nested"), { recursive: true });