Skip to content

Fix/call analytics schema patches#332

Merged
cbmahoney merged 2 commits into
mainfrom
fix/call-analytics-schema-patches
Mar 29, 2026
Merged

Fix/call analytics schema patches#332
cbmahoney merged 2 commits into
mainfrom
fix/call-analytics-schema-patches

Conversation

@Mkpelevi

Copy link
Copy Markdown
Contributor

Summary

Schema patches (V70–V73): Added missing DB migrations to SchemaPatchRunner so the production Aurora instance picks them up on restart — renames stripe_customer_id → payment_customer_id and stripe_subscription_id → payment_subscription_id, drops NOT NULL on payment_subscription_id, and adds transcription_status column to call_recordings. Also adds V72b to drop NOT NULL on the legacy stripe_subscription_id column if it still exists on prod, fixing a payment insert failure.

Conference call speaker labels: PostCallTranscriptionService now queries CALL_JOIN telemetry events to determine how many participants were on the call and dynamically maps spk_0 → Speaker 1, spk_1 → Speaker 2, spk_2 → Speaker 3, etc. Previously hardcoded to 2 speakers, causing the 3rd participant on a conference call to always show as "Unidentified Speaker."

Call analytics duration & sentiment fix: post_call_telemetry_summary_screen.dart now anchors _callStart / _callEnd to CALL_JOIN / CALL_END typed events instead of the first and last telemetry record. Pre- and post-call sentiment samples were inflating the displayed duration (e.g. 44:31 instead of 19:24), which also skewed all sentiment percentages and timeline positions on the analytics page.

CareConnect Dev and others added 2 commits March 27, 2026 23:02
…ytics duration

Backend:
- SchemaPatchRunner: add V70a/b (rename stripe_customer_id → payment_customer_id),
  V71 (rename stripe_subscription_id → payment_subscription_id), V72 (drop NOT NULL
  on payment_subscription_id), V72b (drop NOT NULL on stripe_subscription_id to fix
  payment insert failure when old column still exists on prod DB), V73 (add
  transcription_status to call_recordings)
- PostCallTranscriptionService: build speaker label map dynamically from CALL_JOIN
  telemetry so conference calls with 3+ participants get Speaker 1/2/3 labels
  instead of marking the 3rd person as Unidentified Speaker

Frontend:
- post_call_telemetry_summary_screen: anchor _callStart/_callEnd to CALL_JOIN /
  CALL_END events instead of first/last telemetry event, fixing inflated duration
  display and misaligned sentiment percentages on the analytics page
@github-actions

Copy link
Copy Markdown

CareConnect Quality Gate Report

BLOCKED — One or more required checks failed. Fix the issues below before merging.

CareConnect — Security & Quality Analysis Report

Report Header

Field Value
Generated (UTC) 2026-03-28 20:21:13 UTC
Pipeline Run #629
Trigger pull_request
Scan Root .

All timestamps are reported in Coordinated Universal Time (UTC).

Pull Request

Field Value
PR Number #332
PR Author @Mkpelevi
Source Branch fix/call-analytics-schema-patches
Target Branch main

Commit Details

Field Value
Commit SHA c471fac (full)

Legend

Status Meaning
SUCCESS Tool ran and found no violations
FAILURE Tool found one or more violations
DISABLED Tool is not yet configured
Enforced Violations from this tool will block the merge
Advisory Violations are reported but will not block the merge

Tool Results Summary

Tool Category Status Role Findings
trufflehog Secrets Scan FAILURE Enforced 44 finding(s)
gitleaks Secrets Scan FAILURE Enforced 20 finding(s)
flutter_analyze SAST — Flutter FAILURE Enforced 1481 finding(s)
checkstyle SAST — Java FAILURE Enforced 29594 finding(s)
pmd SAST — Java FAILURE Enforced 11253 finding(s)
spotbugs SAST — Java FAILURE Enforced 710 finding(s)
semgrep SAST — Multi FAILURE Enforced 53 finding(s)
pylint SAST — Python FAILURE Enforced 180 finding(s)
bandit SAST — Python FAILURE Enforced 39 finding(s)
htmlhint SAST — Web FAILURE Enforced 623 finding(s)
stylelint SAST — Web FAILURE Enforced 15 finding(s)
dependency_check SCA — Multi SUCCESS Enforced
trivy SCA — Container FAILURE Enforced 39 finding(s)

Full artifact bundle available in the workflow run artifacts.

@cbmahoney cbmahoney merged commit b5ab0db into main Mar 29, 2026
1 check failed
@willywil548 willywil548 deleted the fix/call-analytics-schema-patches branch June 6, 2026 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants