A gallery that showcases on-device ML/GenAI use cases and allows people to try and use models locally.
This report summarizes scanner evidence for google-ai-edge/gallery, a Kotlin project with 25,167 GitHub stars. SynthScan examined 170,019 lines of code across 656 source files, recording 96 pattern matches distributed across 6 syntactic categories. The legacy adjusted pattern signal is 0.8 (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? 93 finding(s).
Are imports declared and package/API names verified? 3 finding(s).
Are wrappers, guards, and repeated structures necessary? 0 finding(s).
Which changes need focused human review? 96 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 96 distinct pattern matches across 6 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 | mcp/README.md | 18 | ### Step 1: Start the Server in StreamableHTTP Mode | COMMENT |
| LOW | mcp/README.md | 38 | ### Step 2: Expose the Server via a Public URL | COMMENT |
| LOW | mcp/README.md | 51 | ### Step 3: Add MCP server URL | COMMENT |
| LOW | mcp/README.md | 65 | ### Step 4: Try a prompt | COMMENT |
| LOW⚡ | mcp/README.md | 81 | ### Step 1: Set Up Credentials in Google Cloud | COMMENT |
| LOW⚡ | mcp/README.md | 85 | ### Step 2: Add the Cloud Server with Custom Headers | COMMENT |
| LOW⚡ | mcp/README.md | 95 | ### Step 3: Try a Prompt | COMMENT |
| LOW⚡ | …oogle/ai/edge/gallery/ui/llmchat/LlmChatModelHelper.kt | 484 | // Step 1: Start the turn before processing the input, so its latency includes the input | COMMENT |
| LOW⚡ | …oogle/ai/edge/gallery/ui/llmchat/LlmChatModelHelper.kt | 490 | // Step 2: Assemble multimodal prompt attachments (images, audio clips, and text). | COMMENT |
| LOW⚡ | …oogle/ai/edge/gallery/ui/llmchat/LlmChatModelHelper.kt | 503 | // Step 3: Configure extra runtime parameters (such as thinking reasoning mode). | COMMENT |
| LOW⚡ | …oogle/ai/edge/gallery/ui/llmchat/LlmChatModelHelper.kt | 512 | // Step 4: Dispatch asynchronous streaming inference to the native LiteRT-LM engine. | COMMENT |
| LOW⚡ | …mtasks/videomomentfinder/VideoMomentFinderViewModel.kt | 879 | // Step 7: Merge adjacent or overlapping matches for scrubber range indicators. | COMMENT |
| LOW⚡ | …mtasks/videomomentfinder/VideoMomentFinderViewModel.kt | 882 | // Step 8: Publish search results (sorted by similarity score descending) and merged | COMMENT |
| LOW | …mtasks/videomomentfinder/VideoMomentFinderViewModel.kt | 704 | // Step 1: Update UI state to indicate that a search is in progress. Previous results are | COMMENT |
| LOW | …mtasks/videomomentfinder/VideoMomentFinderViewModel.kt | 718 | // Step 2: Ensure the retrieval service is available. | COMMENT |
| LOW | …mtasks/videomomentfinder/VideoMomentFinderViewModel.kt | 730 | // Step 3: Validate video duration and local video file existence. | COMMENT |
| LOW | …mtasks/videomomentfinder/VideoMomentFinderViewModel.kt | 753 | // Step 4: Query the vector store for the top K windows belonging to this project. | COMMENT |
| LOW | …mtasks/videomomentfinder/VideoMomentFinderViewModel.kt | 777 | // Step 5: Map retrieved records back to their time windows. | COMMENT |
| LOW | …mtasks/videomomentfinder/VideoMomentFinderViewModel.kt | 822 | // Step 6: Extract representative preview frames for each unmerged moment in top-K | COMMENT |
| LOW | …mtasks/videomomentfinder/VideoMomentFinderViewModel.kt | 1190 | // Step 1: Validate video duration and file existence. A zero duration means the import | COMMENT |
| LOW | …mtasks/videomomentfinder/VideoMomentFinderViewModel.kt | 1246 | // Step 2: Calculate sliding time windows and sample frame timestamps. | COMMENT |
| LOW | …mtasks/videomomentfinder/VideoMomentFinderViewModel.kt | 1281 | // Step 3: Decide whether this pass interleaves audio with the frames it indexes. | COMMENT |
| LOW | …mtasks/videomomentfinder/VideoMomentFinderViewModel.kt | 1317 | // Step 4: Extract each window's frames and matching audio, then index their embedding. | COMMENT |
| LOW | …mtasks/videomomentfinder/VideoMomentFinderViewModel.kt | 1481 | // Step 5: Persist configuration parameters to DataStore. The embeddings themselves now | COMMENT |
| LOW | …mtasks/videomomentfinder/VideoMomentFinderViewModel.kt | 1523 | // Step 6: Update UI state with the processed project and clear progress. | COMMENT |
| LOW | …mtasks/videomomentfinder/VideoMomentFinderViewModel.kt | 1537 | // Step 7: Automatically execute search if a pending query was specified. | COMMENT |
| LOW | …/main/assets/skills/query-wikipedia/scripts/index.html | 31 | // Step 1: Fuzzy search to get the exact title and the clean introduction | COMMENT |
| LOW | …/main/assets/skills/query-wikipedia/scripts/index.html | 56 | // Step 2: Fetch the HTML of Section 0 (the top of the page) to grab the infobox | COMMENT |
| LOW | …/main/assets/skills/query-wikipedia/scripts/index.html | 96 | // Step 3: Combine Infobox and Extract | COMMENT |
| LOW | …/main/assets/skills/query-wikipedia/scripts/index.html | 107 | // Step 4: Apply language-based safety caps | COMMENT |
| LOW | skills/built-in/query-wikipedia/scripts/index.html | 31 | // Step 1: Fuzzy search to get the exact title and the clean introduction | COMMENT |
| LOW | skills/built-in/query-wikipedia/scripts/index.html | 56 | // Step 2: Fetch the HTML of Section 0 (the top of the page) to grab the infobox | COMMENT |
| LOW | skills/built-in/query-wikipedia/scripts/index.html | 96 | // Step 3: Combine Infobox and Extract | COMMENT |
| LOW | skills/built-in/query-wikipedia/scripts/index.html | 107 | // Step 4: Apply language-based safety caps | COMMENT |
| LOW | skills/featured/mood-music/SKILL.md | 16 | ### Step 1: Fetch Available Genres | COMMENT |
| LOW | skills/featured/mood-music/SKILL.md | 21 | ### Step 2: Analyze and Generate | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | …oogle/ai/edge/gallery/ui/llmchat/LlmChatModelHelper.kt | 484 | // Step 1: Start the turn before processing the input, so its latency includes the input | COMMENT |
| LOW⚡ | …oogle/ai/edge/gallery/ui/llmchat/LlmChatModelHelper.kt | 490 | // Step 2: Assemble multimodal prompt attachments (images, audio clips, and text). | COMMENT |
| LOW⚡ | …oogle/ai/edge/gallery/ui/llmchat/LlmChatModelHelper.kt | 503 | // Step 3: Configure extra runtime parameters (such as thinking reasoning mode). | COMMENT |
| LOW⚡ | …oogle/ai/edge/gallery/ui/llmchat/LlmChatModelHelper.kt | 512 | // Step 4: Dispatch asynchronous streaming inference to the native LiteRT-LM engine. | COMMENT |
| LOW⚡ | …mtasks/videomomentfinder/VideoMomentFinderViewModel.kt | 879 | // Step 7: Merge adjacent or overlapping matches for scrubber range indicators. | COMMENT |
| LOW⚡ | …mtasks/videomomentfinder/VideoMomentFinderViewModel.kt | 882 | // Step 8: Publish search results (sorted by similarity score descending) and merged | COMMENT |
| LOW | …mtasks/videomomentfinder/VideoMomentFinderViewModel.kt | 704 | // Step 1: Update UI state to indicate that a search is in progress. Previous results are | COMMENT |
| LOW | …mtasks/videomomentfinder/VideoMomentFinderViewModel.kt | 718 | // Step 2: Ensure the retrieval service is available. | COMMENT |
| LOW | …mtasks/videomomentfinder/VideoMomentFinderViewModel.kt | 730 | // Step 3: Validate video duration and local video file existence. | COMMENT |
| LOW | …mtasks/videomomentfinder/VideoMomentFinderViewModel.kt | 753 | // Step 4: Query the vector store for the top K windows belonging to this project. | COMMENT |
| LOW | …mtasks/videomomentfinder/VideoMomentFinderViewModel.kt | 777 | // Step 5: Map retrieved records back to their time windows. | COMMENT |
| LOW | …mtasks/videomomentfinder/VideoMomentFinderViewModel.kt | 822 | // Step 6: Extract representative preview frames for each unmerged moment in top-K | COMMENT |
| LOW | …mtasks/videomomentfinder/VideoMomentFinderViewModel.kt | 1190 | // Step 1: Validate video duration and file existence. A zero duration means the import | COMMENT |
| LOW | …mtasks/videomomentfinder/VideoMomentFinderViewModel.kt | 1246 | // Step 2: Calculate sliding time windows and sample frame timestamps. | COMMENT |
| LOW | …mtasks/videomomentfinder/VideoMomentFinderViewModel.kt | 1281 | // Step 3: Decide whether this pass interleaves audio with the frames it indexes. | COMMENT |
| LOW | …mtasks/videomomentfinder/VideoMomentFinderViewModel.kt | 1317 | // Step 4: Extract each window's frames and matching audio, then index their embedding. | COMMENT |
| LOW | …mtasks/videomomentfinder/VideoMomentFinderViewModel.kt | 1481 | // Step 5: Persist configuration parameters to DataStore. The embeddings themselves now | COMMENT |
| LOW | …mtasks/videomomentfinder/VideoMomentFinderViewModel.kt | 1523 | // Step 6: Update UI state with the processed project and clear progress. | COMMENT |
| LOW | …mtasks/videomomentfinder/VideoMomentFinderViewModel.kt | 1537 | // Step 7: Automatically execute search if a pending query was specified. | COMMENT |
| LOW | …/main/assets/skills/query-wikipedia/scripts/index.html | 31 | // Step 1: Fuzzy search to get the exact title and the clean introduction | COMMENT |
| LOW | …/main/assets/skills/query-wikipedia/scripts/index.html | 56 | // Step 2: Fetch the HTML of Section 0 (the top of the page) to grab the infobox | COMMENT |
| LOW | …/main/assets/skills/query-wikipedia/scripts/index.html | 96 | // Step 3: Combine Infobox and Extract | COMMENT |
| LOW | …/main/assets/skills/query-wikipedia/scripts/index.html | 107 | // Step 4: Apply language-based safety caps | COMMENT |
| LOW | skills/built-in/query-wikipedia/scripts/index.html | 31 | // Step 1: Fuzzy search to get the exact title and the clean introduction | COMMENT |
| LOW | skills/built-in/query-wikipedia/scripts/index.html | 56 | // Step 2: Fetch the HTML of Section 0 (the top of the page) to grab the infobox | COMMENT |
| LOW | skills/built-in/query-wikipedia/scripts/index.html | 96 | // Step 3: Combine Infobox and Extract | COMMENT |
| LOW | skills/built-in/query-wikipedia/scripts/index.html | 107 | // Step 4: Apply language-based safety caps | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | model_allowlists/README.md | 1 | # This is a readme file | COMMENT |
| LOW | …c/main/java/com/google/ai/edge/gallery/MainActivity.kt | 141 | // Show splash screen. | COMMENT |
| LOW | …om/google/ai/edge/gallery/ui/modelmanager/ModelList.kt | 441 | alpha = animation.descriptionProgress * 0.6f | COMMENT |
| LOW | …om/google/ai/edge/gallery/ui/modelmanager/ModelList.kt | 461 | // } | COMMENT |
| LOW | …/java/com/google/ai/edge/gallery/ui/common/TaskIcon.kt | 121 | // @Composable | COMMENT |
| LOW | …va/com/google/ai/edge/gallery/ui/common/ModelPicker.kt | 161 | showMemoryWarning = false | COMMENT |
| LOW | …i/edge/gallery/ui/common/chat/BenchmarkConfigDialog.kt | 101 | // @Preview(showBackground = true) | COMMENT |
| LOW | …ai/edge/gallery/ui/common/chat/MessageBodyBenchmark.kt | 101 | } | COMMENT |
| LOW | …ai/edge/gallery/ui/common/chat/MessageBodyBenchmark.kt | 121 | // "stat2" to 0.4f, | COMMENT |
| LOW | …ge/gallery/ui/common/chat/ModelInitializationStatus.kt | 81 | } | COMMENT |
| LOW | …e/gallery/ui/common/chat/MessageBodyPromptTemplates.kt | 121 | } | COMMENT |
| LOW | …e/gallery/ui/common/chat/MessageBodyPromptTemplates.kt | 141 | // templates = | COMMENT |
| LOW | …i/edge/gallery/ui/common/chat/TextInputHistorySheet.kt | 201 | // @Composable | COMMENT |
| LOW | …oogle/ai/edge/gallery/ui/common/chat/MessageLatency.kt | 41 | COMMENT | |
| LOW | …google/ai/edge/gallery/ui/common/chat/MessageSender.kt | 201 | // fun MessageSenderPreview() { | COMMENT |
| LOW | …google/ai/edge/gallery/ui/common/chat/MessageSender.kt | 221 | // values = listOf(), | COMMENT |
| LOW | …google/ai/edge/gallery/ui/common/chat/MessageSender.kt | 241 | // iterationTotal = 200, | COMMENT |
| LOW | …edge/gallery/ui/common/chat/MessageBodyBenchmarkLlm.kt | 41 | DataCard(label = stat.label, unit = stat.unit, value = message.statValues[stat.id]) | COMMENT |
| LOW | …edge/gallery/ui/common/chat/MessageBodyBenchmarkLlm.kt | 61 | // running = false, | COMMENT |
| LOW | …e/ai/edge/gallery/ui/common/chat/MessageBodyWarning.kt | 61 | // fun MessageBodyWarningPreview() { | COMMENT |
| LOW | …/ai/edge/gallery/ui/common/chat/MessageActionButton.kt | 81 | // MessageActionButton(label = "run", icon = Icons.Default.PlayArrow, onClick = {}) | COMMENT |
| LOW | …ogle/ai/edge/gallery/ui/common/chat/MessageBodyInfo.kt | 61 | // GalleryTheme { | COMMENT |
| LOW | …ge/gallery/ui/common/chat/MessageBodyClassification.kt | 101 | // message = | COMMENT |
| LOW | …ogle/ai/edge/gallery/ui/common/modelitem/StatusIcon.kt | 121 | // fun StatusIconPreview() { | COMMENT |
| LOW | …e/ai/edge/gallery/customtasks/common/CustomTaskData.kt | 61 | val onNavUp: () -> Unit, | COMMENT |
| LOW | …in/java/com/google/ai/edge/gallery/data/ConfigValue.kt | 21 | // @Serializable | COMMENT |
| LOW | …in/java/com/google/ai/edge/gallery/data/ConfigValue.kt | 41 | // override fun serialize(encoder: Encoder, value: ConfigValue) { | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | …id/src/app/src/main/assets/tinygarden/main-K5DSW5YL.js | 19 | `);return r>=0?n.slice(0,r):n}function xa(e,t){return e?t?`${e} ${t}`:e:t||""}var Tm=U({__forward_ref__:U});function hi( | CODE |
| HIGH | …id/src/app/src/main/assets/tinygarden/main-K5DSW5YL.js | 19 | `);return r>=0?n.slice(0,r):n}function xa(e,t){return e?t?`${e} ${t}`:e:t||""}var Tm=U({__forward_ref__:U});function hi( | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | …/edge/gallery/ui/modelmanager/ModelManagerViewModel.kt | 127 | private const val PLACEHOLDER_FILENAME = "placeholder" | CODE |
| LOW | …gallery/ui/common/modelitem/OptionalComponentsPanel.kt | 79 | return File(model.getPath(context = context, fileName = "placeholder")).parentFile | CODE |
| LOW | …gallery/ui/common/modelitem/OptionalComponentsPanel.kt | 80 | ?: File(model.getPath(context = context, fileName = "placeholder")) | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | .github/workflows/static.yml | 36 | # Create the nested directory structure | COMMENT |