Skip to content

feat(berd-call): report voice conversation telemetry - #466

Merged
johnmatthewtennant merged 4 commits into
mainfrom
berd-call-telemetry
Nov 4, 2026
Merged

johnmatthewtennant merged 4 commits into
mainfrom
berd-call-telemetry

Conversation

@johnmatthewtennant

Copy link
Copy Markdown
Contributor

Context

Berd.app reports voice usage, but the standalone Berd Call CLI doesn't, so calls started from agents are invisible. The gateway side is squareup/berd-monitoring#42, which accepts berd-call-otlp-logs-v1 from service.name=berd-call and shares the selected-voice validator with app schema v4.

Solution

  • Events. berd_voice_conversation_started carries input_backend, output_backend, voice_mode=chained and, when valid, tts_rate and tts_voice. berd_voice_conversation_ended adds duration_ms, user_utterance_count (final transcripts only), assistant_response_count (completed speech only) and end_reason. The reason is user for an explicit stop, clean-shutdown for parent exit and error for a fatal failure. The voice is a catalog id for the selected backend, custom otherwise, and omitted when empty, the same rules as feat(voice): report the selected voice in voice telemetry #460.
  • Consent is Berd's. berd_call::telemetry_store now owns the settings file, schema check, atomic writes and installation id for both the app and the CLI. The app still passes its Tauri app-data dir. The CLI resolves the same platform path. berd-call telemetry [status|enable|disable] edits that shared preference. A missing or invalid file means off.
  • The app honors external revocation. consent_granted rereads the persisted preference at the upload and bootstrap boundaries alongside the epoch checks, so disabling via the CLI stops a running Berd.app.
  • Builds mirror the app. telemetry-enforced is the CLI's twin of block-telemetry-enforced, enabled from the same VITE_TELEMETRY_ENFORCED=1. build-macos.sh passes the environment (empty, so the feature is compiled out, when a custom build sets VITE_TELEMETRY=0), the distro's telemetry.channel (default public) and the release version. Builds without an environment, including local dev, send nothing.
  • Failure is quiet. Exports run on a background thread with short timeouts and never affect the call. The end event waits at most 5 s to flush.

Validation

  • Linux Blox: just tauri-test (includes berd-call, app telemetry with and without block-telemetry-enforced), just tauri-check, just clippy, just tauri-fmt-check.
  • Red/green: reverting the persisted-consent reread fails an_external_revocation_stops_a_running_app_from_uploading, and restoring it passes.
  • macOS Blox: berd-call compiles, including host_session. All telemetry tests pass with and without telemetry-enforced. just release-scripts-test passes 110/110. Existing failures in untouched code remain: siri::tests::exact_uninstalled_voice_is_rejected_without_synthesis also fails on main, outbound and menu_bar timing tests are intermittent, and berd-call clippy has existing lints in status_sounds, saved_settings, main and host_session.
  • Generated start and end payloads pass the redesign shared and imported agent cards #42 gateway with its built server (Aidan).
  • Not yet run: a live call against the combined gateway. That is the next step.

🤖 Generated with Claude Code

johnmatthewtennant and others added 2 commits November 4, 2026 09:26
The standalone Berd Call CLI now sends berd_voice_conversation_started
and berd_voice_conversation_ended to the gateway as service berd-call
under schema berd-call-otlp-logs-v1. Events carry the input and output
backends, the TTS rate and catalog voice (or "custom"), and on end the
duration, final user utterances, completed assistant responses and
end reason.

Consent is Berd's: a shared telemetry_store holds the settings file and
installation id for both the app and the CLI, and `berd-call telemetry
status|enable|disable` edits the same preference. Internal builds
enforce it through telemetry-enforced, mirroring the app's
block-telemetry-enforced. The app now rereads the persisted preference
at its upload boundaries, so a CLI disable stops a running Berd.app.

Signed-off-by: John Matthew Tennant <jtennant@block.xyz>
Co-authored-by: Maeve <be734facf808af9bc7720a1cb69aeb2a3d136149938eedf4d0667a70ef433961@buzz.block.builderlab.xyz>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Consent granted mid-call starts reporting at a later session, so the
ended counts now cover the same span as its duration.

Signed-off-by: John Matthew Tennant <jtennant@block.xyz>
Co-authored-by: Maeve <be734facf808af9bc7720a1cb69aeb2a3d136149938eedf4d0667a70ef433961@buzz.block.builderlab.xyz>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@johnmatthewtennant
johnmatthewtennant marked this pull request as ready for review November 4, 2026 14:33
@johnmatthewtennant
johnmatthewtennant requested a review from a team November 4, 2026 14:33
Signed-off-by: John Matthew Tennant <jtennant@block.xyz>
Co-authored-by: Maeve <be734facf808af9bc7720a1cb69aeb2a3d136149938eedf4d0667a70ef433961@buzz.block.builderlab.xyz>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kalvinnchau
kalvinnchau previously approved these changes Nov 4, 2026

@kalvinnchau kalvinnchau left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 LGTM. Nit: the berd-call telemetry help text (cli_help.rs) lists start, end, duration, turn counts and audio backends, but events also carry tts_rate and tts_voice; worth listing them since this is the consent disclosure.

The help text is the CLI's consent disclosure, so it names the end reason, speech rate, voice, app version and installation id that events also carry.

Signed-off-by: John Matthew Tennant <jtennant@block.xyz>
Co-authored-by: Maeve <be734facf808af9bc7720a1cb69aeb2a3d136149938eedf4d0667a70ef433961@buzz.block.builderlab.xyz>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@johnmatthewtennant

Copy link
Copy Markdown
Contributor Author

🤖 Good catch, thanks. 4c34e02 lists every field events carry in the berd-call telemetry help: end reason, speech rate and voice, plus the app version and random installation id.

@johnmatthewtennant
johnmatthewtennant merged commit fcb3e5d into main Nov 4, 2026
10 checks passed
@johnmatthewtennant
johnmatthewtennant deleted the berd-call-telemetry branch November 4, 2026 16:18
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