fix: Resolve Sentry errors for insight validation, notifications, WebSocket, and telemetry#185
Conversation
Remove project-specific content (architecture, commands, dependencies, MCP config) and keep only the core LLM coding guidelines. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…Socket, and telemetry - Add project_id validation in question_handler and action_handler to prevent NotNullViolation on live_meeting_insights inserts (FASTAPI-2Y) - Fix OrganizationRole enum casing: .admin/.owner → .ADMIN (FASTAPI-3Z) - Handle WebSocket close code 1001 as graceful disconnect (FASTAPI-3Q) - Increase OTLP metrics export interval to 120s and timeout to 30s to avoid Grafana Cloud rate limiting and timeouts (FASTAPI-30, FASTAPI-3V) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
PR ReviewOverall this PR addresses real Sentry issues with targeted fixes. A few things worth discussing before merging. Critical: CLAUDE.md replacement The entire project-specific CLAUDE.md was replaced with a generic LLM behavioral guidelines document, removing critical project documentation: "DO NOT RUN FLUTTER APP/BACKEND" warnings, architecture overview, dependency constraint notes (retrofit cap and why), MCP server configuration, and design document references. This change is unrelated to the Sentry fixes and should be separated into its own PR or reverted if accidental. ticket_notification_service.py — Missing OWNER role The PR removes websocket_live_insights.py — Fragile string matching
action_handler.py / question_handler.py — Verify callers handle None Both handlers now return None when project_id is missing. Worth tracing callers to confirm they guard against None returns and won't try to use the result downstream. config.py / telemetry.py — LGTM Doubling the metrics export interval (60s to 120s) and tripling the timeout (10s to 30s) are clean, well-commented fixes for the Grafana rate limiting issues. No regression tests None of the bug fixes include automated tests — the test plan is manual-only. Unit tests for the project_id validation early-return paths in both handlers would help prevent future regressions. Reviewed with Claude Code |
Summary
Changes
project_idvalidation before DB insert to preventNotNullViolationwhen sessions use auto-generated IDs without linked projects (Fixes TELLMEMO-FASTAPI-2Y — 10 events, 4 users)OrganizationRoleenum —.admin/.owner→.ADMIN, remove non-existentownerrole (Fixes TELLMEMO-FASTAPI-3Z — 1 event)Test plan
🤖 Generated with Claude Code