Repository Analysis

civitai/civitai

A repository of models, textual inversions, and more

3.0 Likely human-written View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of civitai/civitai, a TypeScript project with 7,179 GitHub stars. SynthScan v2.0 examined 980,338 lines of code across 5184 source files, recording 2032 pattern matches distributed across 13 syntactic categories. The overall adjusted score of 3.0 places this repository in the Likely human-written band.

The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).

3.0
Adjusted Score
3.0
Raw Score
100%
Time Factor
2026-07-14
Last Push
7.2K
Stars
TypeScript
Language
980.3K
Lines of Code
5.2K
Files
2.0K
Pattern Hits
2026-07-14
Scan Date
0.01
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.

Severity Breakdown

Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.

CRITICAL 34HIGH 12MEDIUM 215LOW 1771

Directory Score Breakdown

This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.

Pattern Findings

The scanner identified 2032 distinct pattern matches across 13 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.

Over-Commented Block899 hits · 866 pts
SeverityFileLineSnippetContext
LOWplaywright.preview.config.ts21 testDir: './tests',COMMENT
LOW.eslintrc.js21 // "path argument must be undefined". Pointing the plugin at the project rootCOMMENT
LOWplaywright.config.ts61 // name: 'Mobile Chrome',COMMENT
LOWdocker-compose.base.yml121COMMENT
LOWtests/preview-moderation.spec.ts81COMMENT
LOWtests/preview-buzz.spec.ts81 // "Memberships | Civitai"> regardless of branch (green plans vs. yellowCOMMENT
LOWtests/preview-remix.spec.ts41COMMENT
LOWtests/preview-membership.spec.ts41 // land on the membership page itself (getServerSideProps only redirectsCOMMENT
LOWtests/preview-auth.setup.ts101 // capped at 60s) so one route compiles at a time (parallel heavy renders OOM theCOMMENT
LOWtests/preview-auth.setup.ts141 }COMMENT
LOWtests/preview-apps-marketplace.spec.ts101 // 404s for everyone else. Asserting it loads (status < 400) + shows theCOMMENT
LOWtests/preview-apps-page.spec.ts121 // the e2e proof the page-mint path works (two-flag gate cleared, syntheticCOMMENT
LOW.claude/skills/deploy-status/deploy-chain.sh1#!/usr/bin/env bashCOMMENT
LOWdocs/adding-basemodel-ecosystem-guide.md741// Hidden: May start hidden (hidden: true) until readyCOMMENT
LOWdocs/features/prompt-snippets-schema.md101COMMENT
LOWdocs/features/prompt-snippets.md201async function expandSnippetsToTargets(input: {COMMENT
LOWpackages/civitai-telemetry/src/client.ts1import type { Counter, Gauge, Histogram, Metric, Registry } from 'prom-client';COMMENT
LOWpackages/civitai-telemetry/src/client.ts321 labelNames: ['trigger', 'client'] as const,COMMENT
LOWpackages/civitai-auth/src/sign.ts1// HUB sign side (Path C). The hub is the ONLY minter. ES256-signed JWS, so spokes verify withCOMMENT
LOWpackages/civitai-auth/src/constants.ts1// Shared auth-contract constants — single source of truth so the hub, the main app, and everyCOMMENT
LOWpackages/civitai-auth/src/constants.ts21COMMENT
LOWpackages/civitai-auth/src/client.ts1// BROWSER auth client (`@civitai/auth/client`) — STRICT hub fetches from a SAME-SITE spoke (e.g.COMMENT
LOWpackages/civitai-auth/src/session-client.ts121 // it's validated against a CONFIGURED trusted hub origin (AUTH_JWT_ISSUER / the AUTH_JWKS_URI origin) — seeCOMMENT
LOWpackages/civitai-auth/src/index.ts1// @civitai/auth — verify/receive SDK (Path C: asymmetric JWT + JWKS).COMMENT
LOWpackages/civitai-auth/src/token-scope.ts61 // VaultCOMMENT
LOWpackages/civitai-auth/src/env.ts1// Package-owned env schema for @civitai/auth. Lazy + memoized — importing thisCOMMENT
LOWpackages/civitai-db-schema/prisma/seed.ts81 image:COMMENT
LOWpackages/civitai-db-schema/src/index.ts1// Bare `@civitai/db-schema` exposes the generated Prisma client + types.COMMENT
LOWpackages/civitai-axiom/src/client.ts61COMMENT
LOWpackages/civitai-axiom/src/__tests__/logToAxiom.test.ts1import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';COMMENT
LOWpackages/civitai-db/src/kysely.ts1import { Kysely, PostgresDialect } from 'kysely';COMMENT
LOWpackages/civitai-redis/src/client.ts821 dec = true;COMMENT
LOWpackages/civitai-redis/src/client.ts841 // guard can re-invoke it for a retry — safe because a transient routing error means theCOMMENT
LOWpackages/civitai-redis/src/client.ts1221 //COMMENT
LOWpackages/civitai-redis/src/client.ts1241 // leaving the shared serving `client` completely untouched. Cluster + single-node keep theCOMMENT
LOWpackages/civitai-redis/src/client.ts1261 bufferClient = bufferBaseClient.withTypeMapping({COMMENT
LOWpackages/civitai-redis/src/client.ts1501 if (!Array.isArray(key)) key = [key];COMMENT
LOWpackages/civitai-redis/src/cluster-routing-retry.ts121COMMENT
LOWpackages/civitai-redis/src/env.ts21 // Required whenever REDIS_SYS_SENTINELS is set (cluster uses "sysmaster") — see superRefine.COMMENT
LOWpackages/civitai-redis/src/env.ts41 REDIS_CLUSTER_COMMAND_TIMEOUT_MS: z.coerce.number().default(15000),COMMENT
LOWpackages/civitai-redis/src/env.ts61 // SLOW-SETTLES within the window force a reconnect. <= 0 disables this trigger.COMMENT
LOWpackages/civitai-redis/src/env.ts81 REDIS_CLUSTER_SELFHEAL_RECONNECT_JITTER_MS: z.coerce.number().default(3000),COMMENT
LOWpackages/civitai-redis/src/env.ts101 REDIS_SYS_SELFHEAL_SUSTAINED_MS: z.coerce.number().default(20000),COMMENT
LOWpackages/civitai-redis/src/env.ts121 // Max RETRIES after the initial attempt. The transient window is ~1–2 min cluster-wide butCOMMENT
LOW…itai-redis/src/__tests__/cluster-routing-retry.test.ts1import { describe, it, expect, vi, beforeEach } from 'vitest';COMMENT
LOWapps/auth/src/lib/server/axiom.ts1// Axiom logger for the auth hub via @civitai/axiom. The hub had no Axiom path, so its captcha/auth telemetryCOMMENT
LOWapps/auth/src/lib/server/cors.ts1import { dev } from '$app/environment';COMMENT
LOWapps/auth/src/lib/server/metrics.ts1// Prometheus metrics for the auth hub. This is the hub's FIRST metrics endpoint — before this, theCOMMENT
LOWapps/auth/src/lib/server/oauth/oidc-nonce.ts1import { createHash } from 'crypto';COMMENT
LOWapps/auth/src/lib/server/oauth/block-guard.ts1// Ported from the main app's src/shared/constants/block-scope.constants.ts (only the A1 security gate isCOMMENT
LOWapps/auth/src/lib/server/oauth/model.ts101 //COMMENT
LOWapps/auth/src/lib/server/oauth/access.ts1import { db } from '$lib/server/db/db';COMMENT
LOWapps/auth/src/lib/server/oauth/rate-limit.ts1import { checkRateLimit } from '$lib/server/auth/rate-limit';COMMENT
LOWapps/auth/src/lib/server/auth/session-shape.ts1import { z } from 'zod';COMMENT
LOWapps/auth/src/lib/server/auth/providers.ts121 clientId: () => env.REDDIT_CLIENT_ID,COMMENT
LOWapps/auth/src/lib/server/auth/providers.ts141 // (see listEnabledProviders' stubEnabled gate) — so with the flag unset (prod) it never appears in theCOMMENT
LOWapps/auth/src/lib/server/auth/legacy-cookies.ts1import type { Cookies } from '@sveltejs/kit';COMMENT
LOWapps/auth/src/lib/server/auth/captcha.ts1import { dev } from '$app/environment';COMMENT
LOWapps/auth/src/lib/server/auth/cookie.ts1import { env } from '$env/dynamic/private';COMMENT
LOWapps/auth/src/lib/server/auth/device.ts1import { randomUUID } from 'crypto';COMMENT
839 more matches not shown…
Hyper-Verbose Identifiers715 hits · 724 pts
SeverityFileLineSnippetContext
LOWtests/preview-bootstrap.spec.ts76async function readBrowsingSettingsAddons(page: import('@playwright/test').Page) {CODE
LOWtests/preview-ssr-inject.spec.ts142function assertAnnouncementsSeedEqualsLive(seed: unknown, live: unknown, label: string) {CODE
LOWdocs/article-ingestion-status-proposal.md121export async function recomputeArticleIngestion(articleId: number): Promise<void> {CODE
LOWdocs/subscription-remaining-tasks.md266export async function hasActiveMembershipForBuzzType(userId: number, buzzType: string) {CODE
LOWdocs/base-model-constants-management.md502async function getBaseModelConfigForClient() {CODE
LOWdocs/subscription-multi-buzz-migration.md129async function getUserSubscriptionForBuzzType(userId: number, buzzType: BuzzSpendType)CODE
LOWdocs/subscription-multi-buzz-migration.md135async function hasActiveMembershipForBuzzType(userId: number, buzzType: BuzzSpendType)CODE
LOWdocs/subscription-multi-buzz-migration.md138async function getUserActiveSubscriptions(userId: number)CODE
LOWdocs/feed-card-dom-audit.md97 export function ImagesAsPostsInfiniteProvider({CODE
LOWdocs/plans/generator-filtering-options.md100export function getProcessTagFromWorkflow(workflow: string, hasSourceImage: boolean): string | undefined {CODE
LOWdocs/plans/generator-filtering-options.md296export function useGetTextToImageRequests(/* ... */) {CODE
LOWdocs/plans/live-metric-signals.md534export function useMetricSubscriptionContext() {CODE
LOWdocs/plans/live-metric-signals.md545export function MetricSubscriptionProvider({CODE
LOWdocs/auth/session-refresh-debug-instrumentation.md120 function checkAndSetSessionHeaders(session: Session | null, res: AuthResponse): Session | null {CODE
LOWdocs/features/prompt-snippets-provisioning-job.md87async function importWildcardModelVersion(modelVersionId: number): Promise<{CODE
LOWscripts/metric-migration/backfill-metrics.ts182async function deleteExistingBackfillData(entityType: string, dryRun: boolean): Promise<void> {CODE
LOWpackages/civitai-auth/src/first-party-bridge.ts147export async function completeFirstPartyCallback(opts: {CODE
LOWpackages/civitai-auth/src/impersonation-client.ts32export function createImpersonationClient(): ImpersonationClient {CODE
LOWpackages/civitai-auth/src/legacy-cookie.ts19export async function decodeLegacySessionCookie(CODE
LOWpackages/civitai-auth/src/trusted-domains.ts55export function createTrustedDomainRegistry(CODE
LOWpackages/civitai-auth/src/device-client.ts29export function createDeviceAccountClient(): DeviceAccountClient {CODE
LOWpackages/civitai-db/src/kysely.ts26function registerNumericTypeParsers() {CODE
LOWpackages/civitai-notifications/src/client.ts172export function createNotificationsClient(config: NotificationsClientConfig = {}) {CODE
LOWpackages/civitai-redis/src/cluster-deadline-hits.ts82export function recordClusterCommandSettle(CODE
LOWpackages/civitai-redis/src/client.ts262function triggerTopologyRediscovery(clusterClient: any, reason: string) {CODE
LOWpackages/civitai-redis/src/client.ts424function clearClusterRefreshInterval(type: 'cache' | 'system'): void {CODE
LOWpackages/civitai-redis/src/client.ts701export function attachSysSentinelListeners(CODE
LOWpackages/civitai-redis/src/cluster-routing-retry.ts116export function isTransientClusterRoutingError(err: unknown): boolean {CODE
LOW…itai-redis/src/__tests__/cluster-routing-retry.test.ts44function nodeClientConnectPromiseThrow(): TypeError {CODE
LOWapps/auth/e2e/hub-login.spec.ts14async function firstEnabledOAuthProvider(page: Page): Promise<string | null> {CODE
LOWapps/auth/src/lib/server/oauth/model.ts435function redirectOriginFromRequest(request?: Request): string | undefined {CODE
LOWapps/auth/src/lib/server/oauth/first-party.ts95export async function firstPartyClientForOrigin(CODE
LOWapps/auth/src/lib/server/auth/session.ts133async function resolvePriorSessionUserId(cookies: Cookies): Promise<number | undefined> {CODE
LOWapps/auth/src/lib/server/auth/device.ts40export function getOrCreateDeviceId(cookies: Cookies): string {CODE
LOWapps/auth/src/lib/server/auth/session-producer.ts138export async function getOrProduceSessionUser(userId: number): Promise<SessionUser | null> {CODE
LOW…strator-gateway/src/lib/server/clients/orchestrator.ts21export function getInternalOrchestratorClient() {CODE
LOWsrc/providers/mantine-css-variables.ts79function getColorSchemeCssVariables(selector: string) {CODE
LOWsrc/providers/mantine-css-variables.ts103export function buildMantineCssVariablesHtml(CODE
LOWsrc/providers/StripeProvider.tsx36export function StripeSetupSuccessProvider() {CODE
LOWsrc/providers/ThemeProvider.tsx247function StaticMantineCssVariables() {CODE
LOWsrc/providers/ActivityReportingProvider.tsx46export function ActivityReportingProvider({ children }: { children: ReactNode }) {CODE
LOWsrc/providers/BrowserSettingsProvider.tsx154function createContentSettingsStore(state: StoreState) {CODE
LOWsrc/server/eventloop-longtask.ts761export function registerEventLoopLongTaskDetector(): void {CODE
LOWsrc/server/liveness-heartbeat.ts44export function registerLivenessHeartbeat() {CODE
LOWsrc/server/cpu-profiler.ts434export function registerEventLoopStallProfiler(): void {CODE
LOWsrc/server/routers/blocks.router.ts174async function assertViewerIsAppDeveloper(userId: number): Promise<void> {CODE
LOWsrc/server/routers/blocks.router.ts227async function assertAppBlocksEnabledForTokenUser(userId: number): Promise<void> {CODE
LOWsrc/server/routers/blocks.router.ts323async function assertViewerCanGeneratePageResources(opts: {CODE
LOWsrc/server/routers/blocks.router.ts597async function checkEphemeralDevTunnelRateLimit(userId: number): Promise<boolean> {CODE
LOWsrc/server/routers/blocks.router.ts665function assertLaunchSlotForCaller(CODE
LOWsrc/server/routers/blocks.router.ts719async function resolveModelIdFromBlockInstance(blockInstanceId: string): Promise<number> {CODE
LOWsrc/server/routers/blocks.router.ts751async function createBlockTextToImageStep(opts: {CODE
LOWsrc/server/routers/blocks.router.ts4104function resolveBlockCurrenciesForAccount(CODE
LOWsrc/server/routers/orchestrator.router.ts86function resolveGenerationCurrencies(CODE
LOWsrc/server/routers/comics.router.ts256function normalizeCandidateNsfwLevel(value: unknown): number | undefined {CODE
LOWsrc/server/routers/comics.router.ts266function getOrchestratorErrorMessage(error: unknown): string {CODE
LOWsrc/server/routers/comics.router.ts611async function getUserEarlyAccessChapters(userId: number) {CODE
LOWsrc/server/routers/comics.router.ts629async function assertCanGrantEarlyAccess({CODE
LOWsrc/server/routers/apps.router.ts43async function assertViewerIsAppDeveloper(userId: number): Promise<void> {CODE
LOWsrc/server/routers/referral.router.ts21async function getOrCreateCode(userId: number) {CODE
655 more matches not shown…
Decorative Section Separators162 hits · 490 pts
SeverityFileLineSnippetContext
MEDIUMdocs/features/prompt-snippets-nested-resolution.md166┌─ expandValue(#hero, sourceSetId=MyFantasyPack, depth=1) ──────────────┐CODE
MEDIUMdocs/features/prompt-snippets-nested-resolution.md176┌─ expandValue(#weapon, sourceSetId=MyFantasyPack, depth=2) ────────────┐CODE
MEDIUMdocs/features/prompt-snippets-nested-resolution.md191┌─ expandValue(#location, sourceSetId=MyFantasyPack, depth=1) ──────────┐CODE
MEDIUMscripts/seed-comics.ts82 // ── Comic 1: SFW (PG) ────────────────────────────────────────────────COMMENT
MEDIUMscripts/seed-comics.ts186 // ── Comic 2: PG-13 (mild content) ────────────────────────────────────COMMENT
MEDIUMscripts/seed-comics.ts264 // ── Comic 3: R-rated (violence, noir themes) ─────────────────────────COMMENT
MEDIUMpackages/civitai-redis/src/cluster-selfheal.ts204 // ── TRIGGER 1: DEADLINE-HIT RATE (sawtooth-immune — the real-wave signal) ──────────COMMENT
MEDIUMpackages/civitai-redis/src/cluster-selfheal.ts216 // ── TRIGGER 2: SUSTAINED INFLIGHT (legacy continuous-breach path) ──────────────────COMMENT
MEDIUMpackages/civitai-redis/src/cluster-selfheal.ts235 // ── TRIGGER ──────────────────────────────────────────────────────────────────────COMMENT
MEDIUMpackages/civitai-redis/src/env.ts42 // ── CLUSTER SELF-HEAL WATCHDOG (FIX #1/#2/#3) ──────────────────────────────────────COMMENT
MEDIUMpackages/civitai-redis/src/env.ts42 // ── CLUSTER SELF-HEAL WATCHDOG (FIX #1/#2/#3) ──────────────────────────────────────COMMENT
MEDIUMpackages/civitai-redis/src/env.ts82 // ── SYS (SENTINEL) SELF-HEAL WATCHDOG ──────────────────────────────────────────────COMMENT
MEDIUMpackages/civitai-redis/src/env.ts113 // ── CLUSTER ROUTING RETRY-AFTER-REDISCOVER (the topology-churn 500 wave) ────────────COMMENT
MEDIUM…s/civitai-redis/src/__tests__/cluster-selfheal.test.ts236 // ── DEADLINE-HIT TRIGGER (the fix for the real-wave non-firing bug) ────────────────COMMENT
MEDIUM…s/civitai-redis/src/__tests__/cluster-selfheal.test.ts360 // ── PER-POD RECONNECT JITTER (fleet-stampede brake) ────────────────────────────────COMMENT
MEDIUMapps/auth/src/lib/server/oauth/http.ts62// ─── CORS ─────────────────────────────────────────────────────────────────────────────────────────COMMENT
MEDIUMapps/auth/src/lib/server/oauth/model.ts46 // ─── Client ─────────────────────────────────────────────────COMMENT
MEDIUMapps/auth/src/lib/server/oauth/model.ts163 // ─── Authorization Code ─────────────────────────────────────COMMENT
MEDIUMapps/auth/src/lib/server/oauth/model.ts254 // ─── Tokens ─────────────────────────────────────────────────COMMENT
MEDIUMapps/auth/src/lib/server/oauth/model.ts338 // ─── Client Credentials ─────────────────────────────────────COMMENT
MEDIUMapps/auth/src/lib/server/oauth/model.ts355 // ─── Scope Validation ──────────────────────────────────────COMMENT
MEDIUMapps/auth/src/lib/server/oauth/first-party.ts48// ── Trusted-spoke-domain registry ─────────────────────────────────────────────────────────────────────COMMENT
MEDIUMapps/auth/src/lib/server/oauth/__tests__/model.test.ts10// ── Kysely db mock ────────────────────────────────────────────────────────────COMMENT
MEDIUMsrc/tests/api/v1/blocks/images-endpoint.test.ts278 // ── Transient Meili → retryable 503 (audit 🟡 #2) ──────────────────────────COMMENT
MEDIUMsrc/tests/api/v1/blocks/images-endpoint.test.ts278 // ── Transient Meili → retryable 503 (audit 🟡 #2) ──────────────────────────COMMENT
MEDIUMsrc/tests/api/v1/images/index.test.ts459// ─── Transient upstream → retryable 503 (500→503 reclassification) ───────────COMMENT
MEDIUMsrc/tests/api/v1/block-tokens/page-mint.test.ts431 // ───────────────────────── W10 generation spend ──────────────────────────COMMENT
MEDIUMsrc/tests/api/v1/block-tokens/page-mint.test.ts512 // ── Audit should-fix: integer enforcement in resolveBuzzBudget ──────────COMMENT
MEDIUMsrc/tests/api/v1/block-tokens/page-mint.test.ts615 // verbatim (clamped only by the cap). ────────────────────────────────────COMMENT
MEDIUMsrc/tests/api/v1/block-tokens/page-mint.test.ts725 // showed can silently fail. ────────────────────────────────────────────────COMMENT
MEDIUMsrc/tests/api/internal/blocks/mod-gate.test.ts86 // ── ENTRY path (requires a valid mr token) ────────────────────────────────COMMENT
MEDIUMsrc/tests/api/internal/blocks/mod-gate.test.ts167 // ── ABSENT Sec-Fetch-Dest → treated as ENTRY (fail-safe) ──────────────────COMMENT
MEDIUMsrc/tests/api/internal/blocks/mod-gate.test.ts184 // ── SUBRESOURCE path (allowed without any token/cookie) ───────────────────COMMENT
MEDIUMsrc/tests/api/internal/blocks/mod-gate.test.ts211 // ── fail-closed on missing host ───────────────────────────────────────────COMMENT
MEDIUMsrc/server/routers/apps-shared.router.ts49// ── Limits (design M2/M3) ─────────────────────────────────────────────────────COMMENT
MEDIUMsrc/server/routers/apps-shared.router.ts61// ── Min-trust gate (design H3 / MIN-TRUST GATE) ───────────────────────────────COMMENT
MEDIUMsrc/server/routers/apps-shared.router.ts714// ── App Blocks play-counts (block REST endpoints) ─────────────────────────────COMMENT
MEDIUMsrc/server/routers/apps-shared.router.ts898// ── helpers ───────────────────────────────────────────────────────────────────COMMENT
MEDIUM…erver/routers/__tests__/blocks.router.workflow.test.ts2477 // ──────────────────── GA-gap: orchestrator resource belt ─────────────────COMMENT
MEDIUM…erver/routers/__tests__/blocks.router.workflow.test.ts2550 // ───────────────────── Page-LoRA (Increment 1) ───────────────────────────COMMENT
MEDIUM…erver/routers/__tests__/blocks.router.workflow.test.ts2933 // ── FIX 2: an unrecognized base-model FAILS CLOSED under the GA check ──────COMMENT
MEDIUM…erver/routers/__tests__/blocks.router.workflow.test.ts2986 // ── LOW-1: the literal 'Other' base-model group FAILS CLOSED ──────────────COMMENT
MEDIUM…erver/routers/__tests__/blocks.router.workflow.test.ts3046 // ── GA: platform-VALID cross-ecosystem LoRA is now ACCEPTED ────────────────COMMENT
MEDIUM…erver/routers/__tests__/blocks.router.workflow.test.ts3099 // ── Model-path guard: additionalResources is page-only ─────────────────COMMENT
MEDIUMsrc/server/auth/civ-cookie.ts179// ── First-party login loop recovery ───────────────────────────────────────────────────────────────────────COMMENT
MEDIUMsrc/server/auth/oauth-bridge.ts42// ── Bridge-cookie delivery PROBE (temporary diagnostic) ─────────────────────────────────────────────────────COMMENT
MEDIUMsrc/server/signals/wrapper.ts68// ────────────────────────────────────────────────────────────────────────────COMMENT
MEDIUMsrc/server/signals/wrapper.ts70// ────────────────────────────────────────────────────────────────────────────COMMENT
MEDIUMsrc/server/signals/wrapper.ts150// ────────────────────────────────────────────────────────────────────────────COMMENT
MEDIUMsrc/server/signals/wrapper.ts152// ────────────────────────────────────────────────────────────────────────────COMMENT
MEDIUMsrc/server/utils/block-tip-rate-limit.ts76// ── Tip amount caps (what makes block tipping PAGE-SAFE) ──────────────────────COMMENT
MEDIUM…erver/freshdesk-agent/freshdesk-investigation-tools.ts24// ─── Query result types ──────────────────────────────────────────────COMMENT
MEDIUM…erver/freshdesk-agent/freshdesk-investigation-tools.ts211// ─── TOOL: investigate_user_account ───────────────────────────────────COMMENT
MEDIUM…erver/freshdesk-agent/freshdesk-investigation-tools.ts314// ─── TOOL: investigate_cosmetics ──────────────────────────────────────COMMENT
MEDIUM…erver/freshdesk-agent/freshdesk-investigation-tools.ts388// ─── TOOL: investigate_content ────────────────────────────────────────COMMENT
MEDIUM…erver/freshdesk-agent/freshdesk-investigation-tools.ts510// ─── TOOL: investigate_subscription ───────────────────────────────────COMMENT
MEDIUM…erver/freshdesk-agent/freshdesk-investigation-tools.ts601// ─── TOOL: investigate_moderation ─────────────────────────────────────COMMENT
MEDIUM…erver/freshdesk-agent/freshdesk-investigation-tools.ts707// ─── TOOL: check_site_status ──────────────────────────────────────────COMMENT
MEDIUM…erver/freshdesk-agent/freshdesk-investigation-tools.ts801// ─── TOOL: investigate_crypto_payments ────────────────────────────────COMMENT
MEDIUMsrc/server/meilisearch/client.ts656// ────────────────────────────────────────────────────────────────────────────COMMENT
102 more matches not shown…
Hallucination Indicators34 hits · 355 pts
SeverityFileLineSnippetContext
CRITICALsrc/tests/api/v1/developer/block-manifests.test.ts101 const upsertArgs = mockDbWrite.appBlock.upsert.mock.calls.at(-1)?.[0] as {CODE
CRITICALsrc/tests/api/v1/developer/block-manifests.test.ts120 const upsertArgs = mockDbWrite.appBlock.upsert.mock.calls.at(-1)?.[0] as {CODE
CRITICALsrc/tests/api/v1/developer/block-manifests.test.ts140 const upsertArgs = mockDbWrite.appBlock.upsert.mock.calls.at(-1)?.[0] as {CODE
CRITICAL…/blocks/__tests__/offsite-listing.edit.service.test.ts232 const updateCalls = mockWrite.appListing.update.mock.calls.map((c) => c[0]);CODE
CRITICAL…/blocks/__tests__/offsite-listing.edit.service.test.ts284 const updateCalls = mockWrite.appListing.update.mock.calls.map((c) => c[0]);CODE
CRITICAL…blocks/__tests__/publish-request.orchestration.test.ts486 const call = mockDbWrite.appBlockPublishRequest.create.mock.calls.at(-1);CODE
CRITICAL…blocks/__tests__/publish-request.orchestration.test.ts1352 const reqUpdate = mockDbWrite.appBlockPublishRequest.update.mock.calls.find(CODE
CRITICAL…blocks/__tests__/publish-request.orchestration.test.ts1452 const shaStamp = mockDbWrite.appBlock.update.mock.calls.find(CODE
CRITICAL…blocks/__tests__/publish-request.orchestration.test.ts1560 const tierUpdate = mockDbWrite.appBlock.update.mock.calls.find(CODE
CRITICAL…blocks/__tests__/publish-request.orchestration.test.ts1583 const tierUpdate = mockDbWrite.appBlock.update.mock.calls.find(CODE
CRITICAL…blocks/__tests__/publish-request.orchestration.test.ts1805 const shaStamp = mockDbWrite.appBlock.update.mock.calls.find(CODE
CRITICAL…ver/services/blocks/__tests__/showcase.service.test.ts40 const last = mockDbRead.imageResourceNew.findMany.mock.results.at(-1);CODE
CRITICAL…vices/blocks/__tests__/offsite-listing.service.test.ts763 const flip = mockWrite.appListing.updateMany.mock.calls.find(CODE
CRITICAL…blocks/__tests__/publish-request.reviewSandbox.test.ts102 const buildingCall = mockDbWrite.appBlockPublishRequest.updateMany.mock.calls.find(CODE
CRITICAL…blocks/__tests__/publish-request.reviewSandbox.test.ts130 const failedCall = mockDbWrite.appBlockPublishRequest.updateMany.mock.calls.find(CODE
CRITICAL…rver/services/blocks/__tests__/backpay.service.test.ts421 const calls = mockDbWrite.blockSpendAttribution.updateMany.mock.calls.map((c) => c[0]);CODE
CRITICAL…sts__/offsite-listing.edit-consolidate.service.test.ts153 const viewCall = mockRead.appListing.findUnique.mock.calls.find(CODE
CRITICAL…sts__/offsite-listing.edit-consolidate.service.test.ts186 const viewCall = mockRead.appListing.findUnique.mock.calls.find(CODE
CRITICAL…ces/blocks/__tests__/spend-attribution.service.test.ts257 const { data } = mockDbWrite.blockSpendAttribution.create.mock.calls.at(-1)![0];CODE
CRITICAL…es/blocks/__tests__/app-listing-assets.service.test.ts369 const orders = mockDb.appListingScreenshot.update.mock.calls.map(CODE
CRITICAL…es/blocks/__tests__/app-listing-assets.service.test.ts403 const orders = mockDb.appListingScreenshot.update.mock.calls.map(CODE
CRITICAL…locks/__tests__/app-listing.moderation.service.test.ts59 return mockDbRead.appListing.findMany.mock.calls.at(-1)?.[0] as {CODE
CRITICAL…/services/blocks/__tests__/app-listing.service.test.ts648 const where = (mockDbRead.appListing.findFirst.mock.calls.at(-1)?.[0] as { where?: unknown })CODE
CRITICAL…/services/blocks/__tests__/app-listing.service.test.ts657 const where = (mockDbRead.appListing.findFirst.mock.calls.at(-1)?.[0] as { where?: unknown })CODE
CRITICAL…/services/blocks/__tests__/app-listing.service.test.ts665 const bySlug = (mockDbRead.appListing.findFirst.mock.calls.at(-1)?.[0] as { where?: { revisionOfId?: unknown } })?.wCODE
CRITICAL…es/__tests__/get-engaged-models-by-ids.service.test.ts241 const call = mockDb.resourceReview.findMany.mock.calls.at(-1)?.[0];CODE
CRITICAL…es/__tests__/get-engaged-models-by-ids.service.test.ts248 const call = mockDb.resourceReview.findMany.mock.calls.at(-1)?.[0];CODE
CRITICAL…services/__tests__/block-registry.resolve-page.test.ts125 const call = mockDbRead.appBlock.findFirst.mock.calls.at(-1)?.[0] as {CODE
CRITICAL…services/__tests__/block-registry.resolve-page.test.ts192 const call = mockDbRead.appBlock.findFirst.mock.calls.at(-1)?.[0] as {CODE
CRITICAL…s/__tests__/block-registry.subscriptions.write.test.ts106 const callArgs = mockDbRead.blockUserSubscription.findMany.mock.calls.at(-1)?.[0] as {CODE
CRITICAL…s/__tests__/block-registry.subscriptions.write.test.ts249 const findArgs = mockDbWrite.blockUserSubscription.findFirst.mock.calls.at(-1)?.[0] as {CODE
CRITICAL…s/__tests__/block-registry.subscriptions.write.test.ts255 const createArgs = mockDbWrite.blockUserSubscription.create.mock.calls.at(-1)?.[0] as {CODE
CRITICAL…rver/services/__tests__/block-registry.service.test.ts199 const args = mockDbWrite.blockUserSubscription.update.mock.calls.at(-1)?.[0] as {CODE
CRITICAL…rver/services/__tests__/block-registry.service.test.ts230 const args = mockDbWrite.blockUserSubscription.update.mock.calls.at(-1)?.[0] as {CODE
Structural Annotation Overuse79 hits · 135 pts
SeverityFileLineSnippetContext
LOWdocs/workflow-metadata-refactor.md265// Step 1: named stepCOMMENT
LOWdocs/workflow-metadata-refactor.md268// Step 2: references step 1's outputCOMMENT
LOWdocs/adding-basemodel-ecosystem-guide.md144### Step 1: Add Ecosystem ID Constant (if new ecosystem)COMMENT
LOWdocs/adding-basemodel-ecosystem-guide.md161### Step 2: Add Base Model ID ConstantCOMMENT
LOWdocs/adding-basemodel-ecosystem-guide.md173### Step 3: Add License (if new license)COMMENT
LOWdocs/adding-basemodel-ecosystem-guide.md188### Step 4: Add Ecosystem Family (if new family)COMMENT
LOWdocs/adding-basemodel-ecosystem-guide.md200### Step 5: Add Ecosystem RecordCOMMENT
LOWdocs/adding-basemodel-ecosystem-guide.md217### Step 6: Add Base Model RecordCOMMENT
LOWdocs/adding-basemodel-ecosystem-guide.md235### Step 7: Add Ecosystem SupportCOMMENT
LOWdocs/adding-basemodel-ecosystem-guide.md299### Step 8: Add Ecosystem Settings (if needed)COMMENT
LOWdocs/adding-basemodel-ecosystem-guide.md328### Step 9: Add Cross-Ecosystem Rules (if applicable)COMMENT
LOWdocs/article-content-scanning.md694#### Step 1: Deploy Code (Feature Flag OFF)COMMENT
LOWdocs/article-content-scanning.md705#### Step 2: Run Image MigrationCOMMENT
LOWdocs/article-content-scanning.md732#### Step 3: Validate MigrationCOMMENT
LOWdocs/article-content-scanning.md753#### Step 4: Enable Feature FlagCOMMENT
LOWdocs/article-content-scanning.md768#### Step 5: Monitor (First 24 Hours)COMMENT
LOWdocs/testing-feed-createdocs.md126### Step 1: Test with Mocked DataCOMMENT
LOWdocs/testing-feed-createdocs.md135### Step 2: Test with Real DataCOMMENT
LOWdocs/testing-feed-createdocs.md145### Step 3: Compare with LegacyCOMMENT
LOWdocs/testing-feed-createdocs.md157### Step 4: Test Metrics-OnlyCOMMENT
LOWdocs/auth/oauth-developer-docs.md32### Step 1: Generate PKCE ValuesCOMMENT
LOWdocs/auth/oauth-developer-docs.md42### Step 2: Redirect User to AuthorizationCOMMENT
LOWdocs/auth/oauth-developer-docs.md71### Step 3: Exchange Code for TokenCOMMENT
LOWdocs/auth/oauth-developer-docs.md97### Step 4: Use the Access TokenCOMMENT
LOWdocs/auth/oauth-developer-docs.md148### Step 1: Request Device CodeCOMMENT
LOWdocs/auth/oauth-developer-docs.md171### Step 2: Display Code to UserCOMMENT
LOWdocs/auth/oauth-developer-docs.md175### Step 3: Poll for TokenCOMMENT
LOWscripts/oneoffs/reindex-missing-images.ts208 // Step 1: Get all eligible images from databaseCOMMENT
LOWscripts/oneoffs/reindex-missing-images.ts216 // Step 2: Process in batches to avoid overwhelming DB and MeilisearchCOMMENT
LOWscripts/oneoffs/reindex-missing-images.ts285 // Step 3: Print summaryCOMMENT
LOWscripts/oneoffs/reindex-missing-images.ts301 // Step 4: Queue for re-indexingCOMMENT
LOWscripts/metric-migration/backfill-metrics.ts392 // Step 1: Delete existing backfill dataCOMMENT
LOWscripts/metric-migration/backfill-metrics.ts395 // Step 2: Get ID range (from args or query)COMMENT
LOWscripts/metric-migration/backfill-metrics.ts426 // Step 3: Process in ID rangesCOMMENT
LOW.vscode/rules/migrate-createStyles.md3## Step 1: Convert Styles to SCSSCOMMENT
LOW.vscode/rules/migrate-createStyles.md9## Step 2: Integrate the SCSS FileCOMMENT
LOWsrc/server/jobs/new-order-jobs.ts62 // Step 1: Grant buzz for judgments from 3 days agoCOMMENT
LOWsrc/server/jobs/new-order-jobs.ts134 // Step 2: Reconcile stale blessedBuzz counters for inactive usersCOMMENT
LOWsrc/server/jobs/new-order-jobs.ts228 // Step 1: Batch fetch all counters efficiently (checks cache first, then batched DB queries)COMMENT
LOWsrc/server/jobs/new-order-jobs.ts236 // Step 2: Build player stats from the batch-fetched dataCOMMENT
LOWsrc/server/jobs/new-order-jobs.ts255 // Step 3: Update Redis fervor counter for players whose fervor changedCOMMENT
LOWsrc/server/jobs/new-order-jobs.ts276 // Step 4: Bulk update PostgreSQL with exp and recalculated fervorCOMMENT
LOWsrc/server/jobs/new-order-jobs.ts293 // Step 5: Clear rated images cache for all players in this batchCOMMENT
LOWsrc/server/jobs/remove-old-drafts.ts10 // Step 1: Query replica (dbRead) for model IDs to deleteCOMMENT
LOWsrc/server/jobs/remove-old-drafts.ts29 // Step 2: Delete in batches using dbWrite to minimize lock durationCOMMENT
LOWsrc/server/jobs/push-discord-metadata.ts10 // Step 1: Get userIds with recent images and their last image date from ClickHouse (fast)COMMENT
LOWsrc/server/jobs/push-discord-metadata.ts24 // Step 2: Get userIds with recent model activity and their last upload date from Postgres (fast)COMMENT
LOWsrc/server/jobs/push-discord-metadata.ts36 // Step 3: Combine unique userIdsCOMMENT
LOWsrc/server/jobs/push-discord-metadata.ts44 // Step 4: Get Discord metadata for active users (uses partial index on Account)COMMENT
LOWsrc/server/jobs/push-discord-metadata.ts64 // Step 5: Enrich with activity dates and push to DiscordCOMMENT
LOW…erver/services/orchestrator/__tests__/step-ref.test.ts238 // Step 0: txt2img — outputs imagesCOMMENT
LOW…erver/services/orchestrator/__tests__/step-ref.test.ts239 // Step 1: hires-fix — takes image input from step 0, outputs imagesCOMMENT
LOW…erver/services/orchestrator/__tests__/step-ref.test.ts240 // Step 2: face-fix — takes image input from step 1, outputs imagesCOMMENT
LOW…erver/services/orchestrator/__tests__/step-ref.test.ts280 // Step 0: txt2img — outputs imagesCOMMENT
LOW…erver/services/orchestrator/__tests__/step-ref.test.ts281 // Step 1: img2vid — takes image input from step 0, outputs videoCOMMENT
LOW…erver/services/orchestrator/__tests__/step-ref.test.ts313 // Step 0: text-to-image generationCOMMENT
LOW…erver/services/orchestrator/__tests__/step-ref.test.ts320 // Step 1: face-fix referencing step 0's outputCOMMENT
LOW…/services/orchestrator/ecosystems/ace-audio.handler.ts118 // Step 3: aceStepAudio — the actual generation. Mode-specific fields areCOMMENT
LOWsrc/components/generation_v2/GenerationFormProvider.tsx693 // Step 1: Switch workflow and ecosystem so the graph restores storedCOMMENT
LOWsrc/components/generation_v2/GenerationFormProvider.tsx704 // Step 2: Read the restored resources and merge incoming on top.COMMENT
19 more matches not shown…
Modern AI Meta-Vocabulary31 hits · 91 pts
SeverityFileLineSnippetContext
MEDIUMtests/preview-moderation.spec.ts73 // Be tolerant of 0..N rows on the prod clone — assert the grid scaffold exists,COMMENT
MEDIUM.claude/skills/xguard-manager/SKILL.md50# See what the defaults look like (useful for scaffolding a new label)COMMENT
MEDIUMdocs/auto-label-orchestrator-revamp.md24## Existing scaffolding to reuseCOMMENT
MEDIUMdocs/event-bus-discovery.md378**Recommended middle path:** don't block it on a full platform (failure mode #1), but make it the **Phase-0 driving featCODE
MEDIUMdocs/monorepo-directory-snapshot.md209│ └── moderator/ # Next.js content-moderation app (scaffold): a spoke that verifiesCODE
MEDIUMdocs/moderator-app-package-extraction-plan.md106### Commit 2 — post-move changes (scaffolding + shims + import rewrites + member extractions)COMMENT
MEDIUMdocs/moderator-app-package-extraction-plan.md211### D. New package scaffolding (mirror `@civitai/db-schema`)COMMENT
MEDIUMdocs/auth/oauth-security-review-2026-06-22.md1# OAuth implementation — multi-agent security review (2026-06-22)COMMENT
MEDIUMdocs/features/scanner-policy-changes-2026-05-pass2.md71### 3. Add few-shot examples to every rewritten policyCOMMENT
MEDIUMdocs/features/multi-image-upscale.md124### 3. Backend: Multi-Step Fan-Out in `orchestration-new.service.ts`COMMENT
MEDIUMdocs/features/prompt-snippets.md297### Phase 1 — schema + tRPC scaffolding (backend only)COMMENT
MEDIUMsrc/tests/api/v1/blocks/dev-token.test.ts687 // The exact root-cause scenario: the page-money scaffold manifest declaresCOMMENT
MEDIUMsrc/tests/pages/payment/success.browser.test.tsx26// The scaffold mocks `next/router` with a shared router object (spy `replace`,COMMENT
MEDIUM…sts__/bust-public-model-response-cache.service.test.ts7// ingest) to unit-test in isolation without a brittle scaffold, so its bustCOMMENT
MEDIUM…ion_v2/inputs/MetadataExtractionPanel.browser.test.tsx101// We do NOT mock Mantine (resolve.dedupe handles dual-React at the scaffold).COMMENT
MEDIUM…eration_v2/inputs/ResourceItemContent.browser.test.tsx21// scaffold providers (MantineProvider + QueryClient + next/router). To standCOMMENT
MEDIUM…eration_v2/inputs/ResourceItemContent.browser.test.tsx53// Mantine is NOT mocked (resolve.dedupe handles dual-React at the scaffold).COMMENT
MEDIUM…eration_v2/inputs/ResourceSelectInput.browser.test.tsx79// We do NOT mock Mantine (resolve.dedupe handles dual-React at the scaffold).COMMENT
MEDIUM…ts/generation_v2/inputs/WorkflowInput.browser.test.tsx62// client needed. (The scaffold is network-free; mocking the hook is cheaper thanCOMMENT
MEDIUM…ts/generation_v2/inputs/WorkflowInput.browser.test.tsx98// We do NOT mock Mantine core (resolve.dedupe handles dual-React at the scaffold).COMMENT
MEDIUM…onents/generation_v2/inputs/SeedInput.browser.test.tsx10// props (no tRPC/router) — it anchors the scaffold while exercising MantineCOMMENT
MEDIUM…s/generation_v2/inputs/BaseModelInput.browser.test.tsx87// We do NOT mock Mantine core (resolve.dedupe handles dual-React at the scaffold).COMMENT
MEDIUM…nents/generation_v2/inputs/VideoInput.browser.test.tsx10// The component-setup scaffold deliberately does NOT wire a tRPC provider; aCOMMENT
MEDIUM…nents/generation_v2/inputs/VideoInput.browser.test.tsx54// copy on a cold optimizeDeps cache. That's fixed at the scaffold level byCOMMENT
MEDIUMsrc/components/AppBlocks/IframeHost.browser.test.tsx69// useBrowsingLevelDebounced reads a context the network-free scaffold doesn'tCOMMENT
MEDIUMsrc/components/AppBlocks/PageBlockHost.browser.test.tsx11// HoC) the network-free component scaffold doesn't provide. Mock the tRPC clientCOMMENT
MEDIUMsrc/components/Account/ApiKeysCard.tsx73 // When the modal was opened via a deeplink (e.g. the App Blocks CLI scaffold'sCOMMENT
MEDIUMsrc/components/Account/ApiKeyModal.tsx57 // Optional deeplink prefill (e.g. the App Blocks CLI scaffold link). These areCOMMENT
MEDIUMsrc/pages/api/internal/blocks/workflow-completed.ts18// M-6 (audit): idempotency dedup. Phase 3 billing will inherit this scaffold;COMMENT
MEDIUMsrc/pages/api/internal/blocks/workflow-completed.ts39 // acceptable while this is a no-op scaffold (no billing yet); revisit whenCOMMENT
MEDIUMsrc/pages/api/internal/blocks/workflow-completed.ts95 // scaffold with no billing + the orchestrator does not emit the callback yet),COMMENT
Verbosity Indicators51 hits · 91 pts
SeverityFileLineSnippetContext
LOWscripts/oneoffs/reindex-missing-images.ts208 // Step 1: Get all eligible images from databaseCOMMENT
LOWscripts/oneoffs/reindex-missing-images.ts216 // Step 2: Process in batches to avoid overwhelming DB and MeilisearchCOMMENT
LOWscripts/oneoffs/reindex-missing-images.ts285 // Step 3: Print summaryCOMMENT
LOWscripts/oneoffs/reindex-missing-images.ts301 // Step 4: Queue for re-indexingCOMMENT
LOWscripts/metric-migration/backfill-metrics.ts392 // Step 1: Delete existing backfill dataCOMMENT
LOWscripts/metric-migration/backfill-metrics.ts395 // Step 2: Get ID range (from args or query)COMMENT
LOWscripts/metric-migration/backfill-metrics.ts426 // Step 3: Process in ID rangesCOMMENT
LOWsrc/server/jobs/new-order-jobs.ts62 // Step 1: Grant buzz for judgments from 3 days agoCOMMENT
LOWsrc/server/jobs/new-order-jobs.ts134 // Step 2: Reconcile stale blessedBuzz counters for inactive usersCOMMENT
LOWsrc/server/jobs/new-order-jobs.ts228 // Step 1: Batch fetch all counters efficiently (checks cache first, then batched DB queries)COMMENT
LOWsrc/server/jobs/new-order-jobs.ts236 // Step 2: Build player stats from the batch-fetched dataCOMMENT
LOWsrc/server/jobs/new-order-jobs.ts255 // Step 3: Update Redis fervor counter for players whose fervor changedCOMMENT
LOWsrc/server/jobs/new-order-jobs.ts276 // Step 4: Bulk update PostgreSQL with exp and recalculated fervorCOMMENT
LOWsrc/server/jobs/new-order-jobs.ts293 // Step 5: Clear rated images cache for all players in this batchCOMMENT
LOWsrc/server/jobs/remove-old-drafts.ts10 // Step 1: Query replica (dbRead) for model IDs to deleteCOMMENT
LOWsrc/server/jobs/remove-old-drafts.ts29 // Step 2: Delete in batches using dbWrite to minimize lock durationCOMMENT
LOWsrc/server/jobs/push-discord-metadata.ts10 // Step 1: Get userIds with recent images and their last image date from ClickHouse (fast)COMMENT
LOWsrc/server/jobs/push-discord-metadata.ts24 // Step 2: Get userIds with recent model activity and their last upload date from Postgres (fast)COMMENT
LOWsrc/server/jobs/push-discord-metadata.ts36 // Step 3: Combine unique userIdsCOMMENT
LOWsrc/server/jobs/push-discord-metadata.ts44 // Step 4: Get Discord metadata for active users (uses partial index on Account)COMMENT
LOWsrc/server/jobs/push-discord-metadata.ts64 // Step 5: Enrich with activity dates and push to DiscordCOMMENT
LOWsrc/server/services/bountyEntry.service.ts583 // TODO: Once we support Tipping entries - we need to check if a tipConnection is createdCOMMENT
LOW…erver/services/orchestrator/__tests__/step-ref.test.ts238 // Step 0: txt2img — outputs imagesCOMMENT
LOW…erver/services/orchestrator/__tests__/step-ref.test.ts239 // Step 1: hires-fix — takes image input from step 0, outputs imagesCOMMENT
LOW…erver/services/orchestrator/__tests__/step-ref.test.ts240 // Step 2: face-fix — takes image input from step 1, outputs imagesCOMMENT
LOW…erver/services/orchestrator/__tests__/step-ref.test.ts280 // Step 0: txt2img — outputs imagesCOMMENT
LOW…erver/services/orchestrator/__tests__/step-ref.test.ts281 // Step 1: img2vid — takes image input from step 0, outputs videoCOMMENT
LOW…erver/services/orchestrator/__tests__/step-ref.test.ts313 // Step 0: text-to-image generationCOMMENT
LOW…erver/services/orchestrator/__tests__/step-ref.test.ts320 // Step 1: face-fix referencing step 0's outputCOMMENT
LOW…/services/orchestrator/ecosystems/ace-audio.handler.ts118 // Step 3: aceStepAudio — the actual generation. Mode-specific fields areCOMMENT
LOWsrc/components/generation_v2/GenerationFormProvider.tsx693 // Step 1: Switch workflow and ecosystem so the graph restores storedCOMMENT
LOWsrc/components/generation_v2/GenerationFormProvider.tsx704 // Step 2: Read the restored resources and merge incoming on top.COMMENT
LOW…c/components/Subscriptions/PrepaidBuzzTransactions.tsx147 // Step 1: Direct match via externalTransactionId suffix (redemption transactions)COMMENT
LOW…c/components/Subscriptions/PrepaidBuzzTransactions.tsx168 // Step 2: FIFO + tier-aware assignment for job deliveries (:v3)COMMENT
LOW…/pages/api/admin/temp/remove-deprecated-base-models.ts44 // Step 1: Find all affected ModelVersionsCOMMENT
LOW…/pages/api/admin/temp/remove-deprecated-base-models.ts99 // Step 2: Track affected Models and usersCOMMENT
LOW…/pages/api/admin/temp/remove-deprecated-base-models.ts103 // Step 3: Soft delete all affected ModelVersionsCOMMENT
LOW…/pages/api/admin/temp/remove-deprecated-base-models.ts117 // Step 4: Update lastVersionAt for affected modelsCOMMENT
LOW…/pages/api/admin/temp/remove-deprecated-base-models.ts128 // Step 5: Find Models with no active versions (optimized single query)COMMENT
LOW…/pages/api/admin/temp/remove-deprecated-base-models.ts153 // Step 6: Soft delete Models with no active versionsCOMMENT
LOW…/pages/api/admin/temp/remove-deprecated-base-models.ts218 // Step 7: Clean up cache for deleted versionsCOMMENT
LOW…/pages/api/admin/temp/remove-deprecated-base-models.ts232 // Step 8: Clean up bids for deleted versionsCOMMENT
LOW…/pages/api/admin/temp/remove-deprecated-base-models.ts253 // Step 9: Clean up bids for deleted modelsCOMMENT
LOW…/pages/api/admin/temp/remove-deprecated-base-models.ts272 // Step 10: Send notifications to affected users (batched)COMMENT
LOWsrc/pages/api/admin/temp/migrate-article-images.ts73 // Step 1: Find all Article ImageConnections and their image IDsCOMMENT
LOWsrc/pages/api/admin/temp/migrate-article-images.ts92 // Step 2: Find which images have OTHER references and must be preserved.COMMENT
LOWsrc/pages/api/admin/temp/migrate-article-images.ts129 // Step 3: Delete tags on orphaned imagesCOMMENT
LOWsrc/pages/api/admin/temp/migrate-article-images.ts140 // Step 4: Delete all Article ImageConnectionsCOMMENT
LOWsrc/pages/api/admin/temp/migrate-article-images.ts147 // Step 5: Delete orphaned images (no S3 deletion — these are references to content URLs)COMMENT
LOWsrc/pages/api/admin/temp/migrate-article-images.ts158 // Step 6: Recompute article ingestion (will go back to Scanned since no images remain)COMMENT
LOWsrc/pages/api/admin/temp/fix-over-refunded-users.ts58 // Step 1: Query ClickHouse to get the transaction IDs for these refundsCOMMENT
AI Slop Vocabulary22 hits · 70 pts
SeverityFileLineSnippetContext
MEDIUMtests/preview-engagement.spec.ts72 // `?? null` collapses null/undefined alike so the assertion is robust to theCOMMENT
MEDIUMapps/auth/src/lib/server/auth/session-shape.ts8// of the rest of the blob. PARITY NOTE: this is intentionally more robust than getSessionUser — for the (rare)COMMENT
MEDIUMapps/auth/src/lib/server/auth/verifier.ts6// no self-HTTP-fetch to its own JWKS endpoint — robust even if ORIGIN/the route is misconfigured.COMMENT
MEDIUMapps/auth/src/lib/server/auth/device.ts26// "seamless switch-back" / re-auth window (a security/UX knob), not a capacity lever.COMMENT
MEDIUMapps/auth/src/lib/server/auth/__tests__/device.test.ts283 // Backdate account 100 to just past the idle window (TTL + 1 day) — robust to the TTL value.COMMENT
MEDIUMapps/auth/src/routes/logout/+server.ts62 // Clear the hub's `.civitai.com` session AND device cookies (the seamless-switch account set must not surviveCOMMENT
MEDIUMsrc/server/metrics/__tests__/appListing.metrics.test.ts86 // Normalize whitespace so the assertions are robust to formatting.COMMENT
MEDIUMsrc/server/auth/__tests__/logout-cookies.test.ts3// Regression for finding M2: main-app logout must clear the device cookie (`civ-device`) that gates seamlessCOMMENT
MEDIUM…/orchestrator/__tests__/submitWorkflow.timeout.test.ts160 // Keep this case so the fix is robust to BOTH client behaviors (resolve AND throw).COMMENT
MEDIUMsrc/components/CivitaiWrapped/AccountProvider.tsx27 needsLogin?: boolean; // aged out of the seamless-switch window → clicking re-authenticates at the hubCODE
MEDIUMsrc/components/CivitaiWrapped/AccountProvider.tsx58 // Switch by userId: seamless device switch if fresh in the set, legacy-token redeem if mid-migration, elseCOMMENT
MEDIUMsrc/components/CivitaiWrapped/AccountProvider.tsx104 // Legacy token store — read for seamless migration only.COMMENT
MEDIUMsrc/components/CivitaiWrapped/AccountProvider.tsx219 // 1. Fresh in the device set → seamless switch (the hub mints a fresh civ-token; the proxy sets it).COMMENT
MEDIUMsrc/components/CivitaiWrapped/AccountProvider.tsx225 // 2. Not seamlessly switchable (aged out of the device set, or a legacy account whose seamless next-authCOMMENT
MEDIUMsrc/components/CivitaiWrapped/AccountProvider.tsx231 // device set. Best-effort; we refetch the seamless set afterward.COMMENT
MEDIUMsrc/components/AppBlocks/iframeInitController.ts25// robust to BOTH the missed-load race AND posting before the block's messageCOMMENT
MEDIUMsrc/components/AppLayout/AppHeader/UserMenu.tsx303 // Aged out of the seamless-switch window — clicking re-authenticates at the hub.COMMENT
MEDIUMsrc/hooks/hidden-preferences/useHiddenPreferences.ts16 // `.map(...)`. This makes THIS bundle (and any later one) robust to eitherCOMMENT
MEDIUMsrc/pages/api/v1/blocks/submit-version.ts184 // identity. Switching here to `user:${user.id}` would be the more robust limit;COMMENT
MEDIUMsrc/pages/api/auth/logout.ts19// gates seamless multi-account switching (HttpOnly, so the client can't clear it; on a shared machine theCOMMENT
MEDIUMsrc/pages/api/auth/logout.ts55// (in particular the device cookie that gates seamless switching) are unit-testable without an HTTP round-trip.COMMENT
MEDIUMsrc/pages/api/auth/logout.ts70 // it would let the seamless-switch account set survive logout on a shared machine. Clear BOTH prefixes.COMMENT
Synthetic Comment Markers12 hits · 65 pts
SeverityFileLineSnippetContext
HIGH.claude/agents/design-mockup.md114<img src="https://picsum.photos/seed/aiart[number]/400/500" alt="AI generated art">CODE
HIGHdocs/features/challenge-platform.md439 System // Auto-generated by AI jobCODE
HIGHdocs/features/challenge-platform.md466 aiSummary String? // AI-generated descriptionCODE
HIGHdocs/features/referral-program-review.md93- Single auto-generated code per userCODE
HIGHdocs/features/referral-program-review.md240- [ ] Hit `/user/referrals` — dashboard renders with your auto-generated codeCODE
HIGHdocs/features/referral-program.md3957. **@ai:** Should we allow users to generate multiple codes (current cap: 3) or collapse to a single code per user for CODE
HIGHdocs/features/referral-program.md40710. **@ai:** Custom codes admin UX: for v1, manual DB insert (or mod-actions script) is fine? Or do you want a simple adCODE
HIGHsrc/static-content/art-and-ai.md24The above statement was written by ChatGPT, but is no less true because of it, just like how art generated by AI is no lCODE
HIGHsrc/static-content/au-region-block.md8This is due to Australia's [Age-Restricted Material Codes](https://www.esafety.gov.au/about-us/industry-regulation/sociaCODE
HIGHsrc/server/jobs/scan-files.ts52 // Mark batch as requested upfront so overlapping runs won't re-processCOMMENT
HIGHsrc/server/services/article.service.ts897 // Mark scan as requested after successfully linking imagesCOMMENT
HIGH…c/components/Post/EditV2/PostImageCards/AddedImage.tsx742 We couldn&rsquo;t confirm that this image was generated by AI. To resolve this,CODE
Fake / Example Data24 hits · 24 pts
SeverityFileLineSnippetContext
LOW.claude/agents/design-mockup.md109<img src="https://picsum.photos/seed/[unique-seed]/400/500" alt="placeholder">CODE
LOW.claude/skills/freshdesk/SKILL.md121node .claude/skills/freshdesk/query.mjs search "email:'user@example.com'"CODE
LOW.claude/skills/freshdesk/SKILL.md274| `"email:'user@example.com'"` | By requester email |CODE
LOW.claude/skills/freshdesk/SKILL.md435SELECT id, username, email, "bannedAt", "muted", "createdAt" FROM "User" WHERE email = 'user@example.com';CODE
LOW.claude/skills/stripe/SKILL.md25node "$SKILL_DIR/query.mjs" search "email:'user@example.com'"CODE
LOWdocs/features/account-switching.md157 email: "user@example.com",CODE
LOWpackages/civitai-db-schema/prisma/seed.ts33 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aCODE
LOWpackages/civitai-db-schema/prisma/seed.ts33 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aCODE
LOWapps/moderator/src/routes/page-visits/+page.svelte20 <div class="placeholder">No page visits recorded yet.</div>CODE
LOW…ps/moderator/src/routes/page-visits/route/+page.svelte23 <div class="placeholder">No visits to this route in the window.</div>CODE
LOWapps/moderator/src/routes/images/+page.svelte6<div class="placeholder">Not built yet.</div>CODE
LOWapps/moderator/src/routes/users/+page.svelte6<div class="placeholder">Not built yet.</div>CODE
LOWapps/moderator/src/routes/reports/+page.svelte6<div class="placeholder">Not built yet.</div>CODE
LOWsrc/server/common/constants.ts21Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqCODE
LOWsrc/server/common/constants.ts21Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqCODE
LOWsrc/server/email/templates/trainingFail.email.ts99 email: 'test@test.com',CODE
LOWsrc/server/email/templates/strikeIssued.email.ts188 to: 'test@test.com',CODE
LOW…server/email/templates/stuckCryptoDepositUser.email.ts88 userEmail: 'user@example.com',CODE
LOWsrc/server/email/templates/trainingComplete.email.ts97 email: 'test@test.com',CODE
LOW…r/email/templates/moderation/moderationAction.email.ts175 to: 'test@test.com',CODE
LOW…il/templates/moderation/moderationAction.email.test.ts62 to: 'user@example.com',CODE
LOW…il/templates/moderation/moderationAction.email.test.ts152 to: 'user@example.com',CODE
LOWsrc/utils/faro/__tests__/redact.test.ts59 expect(out).not.toContain('user@example.com');CODE
LOWsrc/utils/faro/__tests__/redact.test.ts150 nested: ['plain', 'reach me at eve@example.org'],CODE
Example Usage Blocks1 hit · 2 pts
SeverityFileLineSnippetContext
LOW.claude/skills/deploy-status/deploy-chain.sh17# Usage:COMMENT
TODO Padding1 hit · 2 pts
SeverityFileLineSnippetContext
LOWsrc/components/Search/parsers/base.ts36 // TODO: implement Model3D search parserCOMMENT
Overly Generic Function Names1 hit · 1 pts
SeverityFileLineSnippetContext
LOWsrc/store/post-image-transmitter.store.ts84 async function getData(url: string, options?: { allowExternalUrl?: boolean }) {CODE