An AI-powered search engine with a generative UI
This report summarizes scanner evidence for miurla/morphic, a TypeScript project with 9,232 GitHub stars. SynthScan examined 97,046 lines of code across 620 source files, recording 121 pattern matches distributed across 7 syntactic categories. The legacy adjusted pattern signal is 2.3 (Low pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Payload schema: 1.0.0 · Engine: 2.0.0 · Scoring: heuristic-density-v1 · Scan date: 2026-10-31.
Can maintainers explain intent, assumptions, and trade-offs? 83 finding(s).
Are imports declared and package/API names verified? 38 finding(s).
Are wrappers, guards, and repeated structures necessary? 70 finding(s).
Which changes need focused human review? 121 finding(s).
This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 121 distinct pattern matches across 7 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. 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 configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | evals/evaluators/related-questions.ts | 114 | export function summarizeRelatedQuestions( | CODE |
| LOW | evals/lib/dataset.ts | 49 | export function loadRelatedQuestionsDataset({ | CODE |
| LOW | lib/search-mode-availability.ts | 16 | export function isAdaptiveModeAuthBlocked({ | CODE |
| LOW | lib/tools/search.ts | 37 | function getOptimizedSearchProviderType(): SearchProviderType { | CODE |
| LOW | lib/tools/search.ts | 51 | function describeRecoverableSearchFailure( | CODE |
| LOW | lib/tools/search/providers/recoverable-error.ts | 62 | export function classifyRecoverableSearchError( | CODE |
| LOW | lib/config/model-selection-cookie.ts | 8 | export function serializeModelSelectionCookie( | CODE |
| LOW | lib/config/model-selection-cookie.ts | 16 | export function parseModelSelectionCookie( | CODE |
| LOW | lib/config/load-models-config.ts | 19 | function validateModelsConfigStructure( | CODE |
| LOW | lib/config/ollama-validator.ts | 18 | async function getConfiguredOllamaModels(): Promise<Model[]> { | CODE |
| LOW | lib/config/ollama-validator.ts | 48 | export async function initializeOllamaValidation(): Promise<void> { | CODE |
| LOW | lib/auth/provider.ts | 23 | function enforceCloudDeploymentGuard( | CODE |
| LOW | lib/auth/better-auth/invitations.ts | 84 | export async function hasRecentBootstrapInvitation( | CODE |
| LOW | lib/auth/better-auth/config.ts | 25 | export function isBetterAuthSmtpConfigured(): boolean { | CODE |
| LOW | lib/render/linked-cards-markdown.ts | 42 | export function linkedCardsFenceToMarkdown(fence: string): string | null { | CODE |
| LOW | lib/render/prompt.ts | 7 | export function getRelatedQuestionsSpecPrompt(): string { | CODE |
| LOW⚡ | lib/render/streamdown-spec.tsx | 8 | export function createStreamdownSpecRenderer(): CustomRenderer { | CODE |
| LOW⚡ | lib/render/streamdown-spec.tsx | 18 | export function createStreamdownDraftRenderer(): CustomRenderer { | CODE |
| LOW⚡ | lib/render/streamdown-spec.tsx | 27 | export function mergeStreamdownSpecRenderer( | CODE |
| LOW | lib/render/__tests__/parse-spec-block.test.ts | 6 | function buildRelatedQuestionsSource(questions: string[]): string { | CODE |
| LOW | lib/agents/prompts/search-mode-prompts.ts | 35 | function getSourceDirectionGuidance(allowFallback = true): string { | CODE |
| LOW | lib/utils/message-mapping.ts | 137 | export function mapUIMessagePartsToDBParts( | CODE |
| LOW⚡ | lib/utils/search-config.ts | 10 | export function isGeneralSearchProviderAvailable(): boolean { | CODE |
| LOW⚡ | lib/utils/search-config.ts | 17 | export function getGeneralSearchProviderName(): string { | CODE |
| LOW⚡ | lib/utils/search-config.ts | 27 | export function supportsMultimediaContentTypes(): boolean { | CODE |
| LOW | lib/utils/search-config.ts | 90 | export function getSearchStrategyGuidance(): string { | CODE |
| LOW | lib/utils/search-config.ts | 113 | export function getGeneralSearchProviderType(): 'brave' | null { | CODE |
| LOW | lib/utils/perf-tracking.ts | 30 | export function incrementDbOperationCount() { | CODE |
| LOW | lib/utils/registry.ts | 13 | function normalizeOpenAICompatibleBaseURL(raw: string): string { | CODE |
| LOW | lib/utils/citation.ts | 27 | export function createCitationLabelAllocator(seed = 1): CitationLabelAllocator { | CODE |
| LOW | lib/utils/citation.ts | 193 | export function extractCitationMapsFromMessages( | CODE |
| LOW | lib/models/fetch-models.ts | 128 | function passesOpenAICompatibleFilters(id: string): boolean { | CODE |
| LOW | lib/models/fetch-models.ts | 318 | export async function fetchOpenAICompatibleModels(): Promise<Model[]> { | CODE |
| LOW | lib/usage-budget/analytics.ts | 39 | export function trackUsageGrantSyncFailed(data: { | CODE |
| LOW | lib/usage-budget/analytics.ts | 54 | export function trackAdditionalUsageInterest(userId: string): Promise<void> { | CODE |
| LOW | lib/usage-budget/gate.ts | 200 | async function getOrSyncGrantLimit(params: { | CODE |
| LOW | lib/usage-budget/events.ts | 40 | export async function recordAdditionalUsageInterest( | CODE |
| LOW | lib/storage/r2-client.ts | 31 | export function parseSignedUrlStabilityWindowSeconds( | CODE |
| LOW | lib/storage/r2-client.ts | 92 | export function isObjectStorageConfigured() { | CODE |
| LOW | lib/storage/r2-client.ts | 119 | export function getObjectKeyFromSignedUrl(url: string): string | undefined { | CODE |
| LOW | lib/storage/r2-client.ts | 160 | export function getChatFileObjectKeyPrefix(userId: string, chatId: string) { | CODE |
| LOW | lib/storage/r2-client.ts | 164 | export function getUserFileObjectKeyPrefix(userId: string) { | CODE |
| LOW | lib/supabase/keys.ts | 1 | export function getSupabasePublishableKey() { | CODE |
| LOW | lib/streaming/create-ephemeral-chat-stream-response.ts | 63 | export async function createEphemeralChatStreamResponse( | CODE |
| LOW | lib/streaming/helpers/log-api-call-error.ts | 129 | export function logAPICallErrorDiagnostics(error: unknown): void { | CODE |
| LOW | lib/streaming/helpers/log-api-call-error.ts | 141 | export function buildAPICallErrorDiagnostics( | CODE |
| LOW | lib/streaming/helpers/stream-error-diagnostics.ts | 110 | export function buildStreamErrorSpanUpdate( | CODE |
| LOW | lib/streaming/helpers/strip-spec-from-messages.ts | 24 | function stripNonRelatedSpecBlocks(text: string): string { | CODE |
| LOW | lib/streaming/helpers/compact-historical-messages.ts | 207 | export function compactHistoricalMessages( | CODE |
| LOW | lib/streaming/helpers/has-answer-after-tool-failure.ts | 23 | export function hasAnswerAfterToolFailure( | CODE |
| LOW | …ming/helpers/slice-without-splitting-surrogate-pair.ts | 1 | export function sliceWithoutSplittingSurrogatePair( | CODE |
| LOW | lib/streaming/helpers/cap-historical-attachments.ts | 35 | export function parseAttachmentTokenBudget(raw: string | undefined): number { | CODE |
| LOW | lib/streaming/helpers/trim-cold-start-history.ts | 13 | export function parseColdStartHistoryTokenLimit( | CODE |
| LOW | lib/streaming/helpers/cap-historical-pasted-content.ts | 8 | export function parsePastedContentCharBudget(raw: string | undefined): number { | CODE |
| LOW | lib/streaming/helpers/cap-historical-pasted-content.ts | 41 | export function capHistoricalPastedContent( | CODE |
| LOW | lib/streaming/helpers/attachment-token-estimates.ts | 13 | export function buildAttachmentTokenEstimates( | CODE |
| LOW | lib/schema/question.ts | 42 | export function getQuestionSchemaForModel(fullModel: string) { | CODE |
| LOW | lib/actions/admin.ts | 147 | export async function resetMemberPasswordAction(params: { | CODE |
| LOW | lib/actions/chat.ts | 139 | export async function createChatWithFirstMessage( | CODE |
| LOW | lib/db/actions.ts | 783 | export async function getAttachmentSizesByObjectKey({ | CODE |
| 10 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| CRITICAL | …_tests__/create-ephemeral-chat-stream-response.test.ts | 299 | const update = mocks.span.update.mock.calls.at(-1)?.[0] | CODE |
| CRITICAL | …_tests__/create-ephemeral-chat-stream-response.test.ts | 320 | const update = mocks.span.update.mock.calls.at(-1)?.[0] | CODE |
| CRITICAL | …_tests__/create-ephemeral-chat-stream-response.test.ts | 337 | const update = mocks.span.update.mock.calls.at(-1)?.[0] | CODE |
| CRITICAL | …_tests__/create-ephemeral-chat-stream-response.test.ts | 355 | const update = mocks.span.update.mock.calls.at(-1)?.[0] | CODE |
| CRITICAL | …treaming/__tests__/create-chat-stream-response.test.ts | 420 | const update = mocks.span.update.mock.calls.at(-1)?.[0] | CODE |
| CRITICAL | …treaming/__tests__/create-chat-stream-response.test.ts | 653 | const update = mocks.span.update.mock.calls.at(-1)?.[0] | CODE |
| CRITICAL | …treaming/__tests__/create-chat-stream-response.test.ts | 678 | const update = mocks.span.update.mock.calls.at(-1)?.[0] | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH⚡ | docs/CONFIGURATION.md | 62 | OPENAI_API_KEY=[YOUR_API_KEY] | CODE |
| HIGH⚡ | docs/CONFIGURATION.md | 68 | ANTHROPIC_API_KEY=[YOUR_API_KEY] | CODE |
| HIGH⚡ | docs/CONFIGURATION.md | 74 | GOOGLE_GENERATIVE_AI_API_KEY=[YOUR_API_KEY] | CODE |
| HIGH | docs/CONFIGURATION.md | 100 | OPENAI_COMPATIBLE_API_KEY=[YOUR_API_KEY] | CODE |
| HIGH | docs/CONFIGURATION.md | 588 | JINA_API_KEY=[YOUR_API_KEY] | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | app/api/feedback/__tests__/route.test.ts | 110 | email: 'user@example.com' | CODE |
| LOW | components/sidebar/__tests__/version-footer.test.tsx | 31 | email: 'user@example.com', | CODE |
| LOW | components/sidebar/__tests__/version-footer.test.tsx | 102 | vi.stubEnv('MORPHIC_ADMIN_EMAILS', 'user@example.com') | CODE |
| LOW | …mponents/__tests__/reset-member-password-form.test.tsx | 13 | { id: 'admin-1', email: 'admin@example.com', name: 'Admin', role: 'admin' }, | CODE |
| LOW | components/__tests__/login-form.test.tsx | 68 | target: { value: 'user@example.com' } | CODE |
| LOW | components/__tests__/login-form.test.tsx | 77 | email: 'user@example.com', | CODE |
| LOW | components/__tests__/login-form.test.tsx | 92 | target: { value: 'user@example.com' } | CODE |
| LOW | components/__tests__/login-form.test.tsx | 109 | target: { value: 'user@example.com' } | CODE |
| LOW | components/__tests__/login-form.test.tsx | 127 | target: { value: 'user@example.com' } | CODE |
| LOW | components/__tests__/login-form.test.tsx | 147 | target: { value: 'user@example.com' } | CODE |
| LOW | components/__tests__/member-role-manager.test.tsx | 16 | { id: 'admin-1', email: 'admin@example.com', name: 'Admin', role: 'admin' }, | CODE |
| LOW | lib/auth/__tests__/supabase-provider.test.ts | 47 | await supabaseAuthProvider.requestPasswordReset!('user@example.com') | CODE |
| LOW | lib/auth/__tests__/supabase-provider.test.ts | 50 | expect(resetPasswordForEmail).toHaveBeenCalledWith('user@example.com', { | CODE |
| LOW | lib/auth/__tests__/better-auth-provider.test.ts | 139 | email: 'admin@example.com', | CODE |
| LOW | lib/auth/__tests__/better-auth-provider.test.ts | 228 | email: 'admin@example.com', | CODE |
| LOW | lib/auth/__tests__/better-auth-provider.test.ts | 360 | email: 'admin@example.com', | CODE |
| LOW | lib/auth/__tests__/better-auth-provider.test.ts | 381 | email: 'admin@example.com', | CODE |
| LOW | lib/auth/__tests__/better-auth-provider.test.ts | 945 | await betterAuthProvider.requestPasswordReset!('admin@example.com') | CODE |
| LOW | lib/auth/__tests__/better-auth-provider.test.ts | 960 | await betterAuthProvider.requestPasswordReset!('admin@example.com') | CODE |
| LOW | lib/auth/__tests__/better-auth-provider.test.ts | 966 | email: 'admin@example.com', | CODE |
| LOW | lib/auth/better-auth/__tests__/config.test.ts | 102 | process.env.BOOTSTRAP_ADMIN_EMAIL = 'admin@example.com' | CODE |
| LOW | lib/auth/better-auth/__tests__/config.test.ts | 115 | applyBootstrapAdminGate({ email: 'admin@example.com' }) | CODE |
| LOW | lib/auth/better-auth/__tests__/config.test.ts | 120 | process.env.BOOTSTRAP_ADMIN_EMAIL = 'admin@example.com' | CODE |
| LOW | lib/utils/__tests__/search-query.test.ts | 65 | expect(normalizeSearchQuery(prefix + 'user@example.com')).toBe( | CODE |
| LOW | lib/actions/__tests__/admin.test.ts | 48 | email: 'admin@example.com', | CODE |
| LOW | lib/actions/__tests__/account-better-auth.test.ts | 65 | email: 'user@example.com', | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | searxng-limiter.toml | 1 | #https://docs.searxng.org/admin/searx.limiter.html | COMMENT |
| LOW | docker-compose.yaml | 21 | ENABLE_AUTH: ${ENABLE_AUTH:-false} | COMMENT |
| LOW | app/api/auth/[...all]/route.ts | 1 | import { getAuth } from '@/lib/auth/better-auth/config' | COMMENT |
| LOW | components/sidebar/chat-history-search.tsx | 121 | useEffect(() => { | COMMENT |
| LOW | components/sidebar/chat-history-client.tsx | 41 | const resultsRef = useRef<HTMLDivElement>(null) | COMMENT |
| LOW | components/sidebar/chat-history-client.tsx | 61 | // successful fetch. | COMMENT |
| LOW | lib/auth/providers/better-auth.ts | 401 | // Fail closed: without a canonical origin the confirmation link | COMMENT |
| LOW | lib/auth/better-auth/config.ts | 421 | // verification, so this is the only email better-auth delivers; | COMMENT |
| LOW | lib/utils/search-query.ts | 41 | COMMENT | |
| LOW | lib/supabase/middleware.ts | 61 | url.pathname = '/auth/login' | COMMENT |
| LOW | lib/actions/account.ts | 121 | if (provider.validateDeletion) { | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | proxy.ts | 79 | * Feel free to modify this pattern to include more paths. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | .github/workflows/eval.yml | 21 | # Only what changes model behaviour. A change to the harness itself moves no | COMMENT |