fix: sanitize analytics crash and model values#325
Merged
Conversation
Contributor
There was a problem hiding this comment.
All reported issues were addressed across 3 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
The allowlist missed 4 of 5 SUPPORTED_BEDROCK_MODELS (cubic review find) plus the non-Gemma local registry entries (llama3.2:3b, qwen3.5:9b, gpt-oss:20b), so built-in dropdown selections were mislabeled 'custom'. All are fixed public identifiers - no privacy impact.
Contributor
There was a problem hiding this comment.
1 issue found across 2 files (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="app/analytics-helpers.js">
<violation number="1" location="app/analytics-helpers.js:265">
P3: The new `llama3.2:3b` allowlist entry is not covered by a test assertion. The regression tests verify the other newly added models (`qwen3.5:9b`, `gpt-oss:20b`, and the Bedrock entries), so adding a quick assertion for `llama3.2:3b` would keep the coverage consistent with the test description.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
| 'gemma4:e2b-nvfp4', | ||
| 'gemma4:e4b-nvfp4', | ||
| 'gemma4:12b-nvfp4', | ||
| 'llama3.2:3b', |
Contributor
There was a problem hiding this comment.
P3: The new llama3.2:3b allowlist entry is not covered by a test assertion. The regression tests verify the other newly added models (qwen3.5:9b, gpt-oss:20b, and the Bedrock entries), so adding a quick assertion for llama3.2:3b would keep the coverage consistent with the test description.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At app/analytics-helpers.js, line 265:
<comment>The new `llama3.2:3b` allowlist entry is not covered by a test assertion. The regression tests verify the other newly added models (`qwen3.5:9b`, `gpt-oss:20b`, and the Bedrock entries), so adding a quick assertion for `llama3.2:3b` would keep the coverage consistent with the test description.</comment>
<file context>
@@ -255,22 +255,33 @@ function captureSanitizedException(posthogClient, err, distinctId) {
'gemma4:e2b-nvfp4',
'gemma4:e4b-nvfp4',
'gemma4:12b-nvfp4',
+ 'llama3.2:3b',
+ 'qwen3.5:9b',
+ 'gpt-oss:20b',
</file context>
ruzin
approved these changes
Jul 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Verification
Summary by cubic
Sanitizes analytics crash reports and model values to prevent leaking local paths or private model names. Fixes curated built-in models being mislabeled as "custom" in analytics.
captureSanitizedExceptionso only redacted errors reach PostHog.custom. Apply in summarization/transcription contexts and formodel_changedevents.Written for commit 861cb7c. Summary will update on new commits.