Skip to content

Send meeting processing time and stage timings to PostHog - #1861

Merged
r3dbars merged 2 commits into
mainfrom
claude/faster-meeting-transcripts-5rfhxf
Sep 25, 2026
Merged

r3dbars merged 2 commits into
mainfrom
claude/faster-meeting-transcripts-5rfhxf

Conversation

@r3dbars

@r3dbars r3dbars commented Sep 25, 2026

Copy link
Copy Markdown
Owner

Requested by Justin · project thread

Why

Before: PostHog can't say how long a meeting takes to turn into a transcript. The only number is a guess from pairing the stop and save events, and it can't tell slow speech-to-text from a Mac that slept, a cold model, or a slow Mac.

After: every meeting_transcript_saved says how long the job took, how much of that the Mac slept, and how long each stage took, plus the speech model and Mac class. That's what we need to rank the "faster meeting transcripts" fixes on real users.

Product Impact

  • Affects: meetings
  • Lane: meeting reliability
  • Why this matters: meeting speed work needs real P50/P95/P99 per stage, model and Mac, not a proxy.

What changed

  • New MeetingPipelineTimings (Core): a task-local, lock-guarded recorder bound once per job in TranscriptionTaskManager (live, import, and failed-meeting retry paths). Stages add their own time: ensureModelsReadyForPipeline, AudioResampler.loadAndResample, DiarizationService.diarizeOffline (incl. ERes2Net re-embed), and each speech-to-text call via MeetingSTTAdapter. Sleep = wall clock minus systemUptime.
  • publishTranscriptSaved takes an optional snapshot and sets lastPipelineTimings before publishing, so the host never reads a previous save's numbers.
  • New MeetingProcessingTelemetry (app) rounds them: processing_ms, sleep_ms, models_ready_ms, resample_ms, diarize_ms, stt_ms (10 ms), stt_calls, stt_input_seconds, recording_minutes, plus stt_model, mac_chip, memory_gb_bucket.
  • Allowlist + reviewed-property PSVs, privacy doc and PostHog plan updated; tests: fast testMeetingProcessingTelemetry, SPM MeetingPipelineTimingsTests.

How I checked it

  • scripts/dev/agent-preflight.sh
  • bash scripts/dev/linux-checks.sh (48 passed)
  • Selected checks from .agents/test-matrix.yml for the files changed (CI)
  • bash build.sh --no-open (CI)
  • bash run-tests.sh (CI)
  • Performance budget passed
  • bash run-integration-smoke.sh (CI)
  • swift test (CI)
  • bash run-e2e-smoke.sh / swift test --package-path Tools/<Package> if the matrix maps them
  • Manual check:

Checks I could not run, and why:

  • All Swift builds and tests: cloud session on Linux, no Swift toolchain. Relying on CI for this head.

Mac or hardware test still needed? If yes:

  • Optional: record one meeting, then check local events.jsonl/PostHog debug for meeting_transcript_saved carrying processing_ms, stt_ms, stt_calls. On main those keys are absent.

Risk Review

  • Privacy / local-first behavior reviewed (durations, counts, model id, coarse Mac class only)
  • New analytics properties avoid the sanitizer's drop fragments (check-telemetry-keys.py PASS)
  • Checked the text-pin tests for every file I edited (check-source-pins.py --changed-only PASS)
  • Storage path or migration impact reviewed (none)
  • Public-facing copy stays concrete (no UI change)
  • Release/update impact reviewed (none)
  • Agent PRs got an independent deep review of the full diff
  • UI changes include sanitized visuals (no UI change)
  • No private transcripts, audio, tokens, personal paths, or customer data are included

Notes

The retranscribe-saved-meeting path stays untimed on purpose (sends no timings). Timing overhead is one uptime read per stage and per speech-to-text call.

Agent handoff

COORD_DONE: BRIEF | this PR | meeting speed telemetry | none | none | linux-checks, source pins, telemetry keys | CI + deep review

🤖 Generated with Claude Code

https://claude.ai/code/session_01LcH2PBaqN6yYkxeoaYrj45


Generated by Claude Code

meeting_transcript_saved now carries how long the job took from start to
saved (processing_ms), how much of that the Mac slept (sleep_ms), time per
stage (models_ready_ms, resample_ms, diarize_ms, stt_ms), the number of
speech-to-text calls and seconds of audio fed to them, the recording length
in whole minutes, the speech model, and the coarse Mac class. Timings are
rounded to 10 ms.

A task-local MeetingPipelineTimings recorder is bound per job in the task
manager, so each stage adds its own time without new parameters through
the pipeline.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LcH2PBaqN6yYkxeoaYrj45
@r3dbars r3dbars self-assigned this Sep 25, 2026
@r3dbars
r3dbars marked this pull request as ready for review September 25, 2026 17:14
@r3dbars
r3dbars merged commit dab74c8 into main Sep 25, 2026
8 checks passed
@r3dbars
r3dbars deleted the claude/faster-meeting-transcripts-5rfhxf branch September 25, 2026 17:24
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