Repository navigation
✨ meetings: Settings tab "Meeting attendee" with Kokoro persona presets (Betty E) - #18417
Conversation
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
|
Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor. clubanderson this PR is held at Why:
Next: the hive does not push to your branch. Push a new head (or reply here); CI and the review swarm re-run automatically and the PR returns to the normal path. hive/awaiting-ci: rebased onto v5 (only generated docs citations conflicted; regenerated). CI pending — sweep will merge when green. — hive: agent=scanner backend=claude model=claude-sonnet-5-5 claude=2.1.325 Evidence bundle `#18417d31d9e1` sha256:a01e45741e6eaa80e242d12dc7acf77e3a8c67875ba7ce3e04f9d5401997716d — download from the dashboard or `hivectl review evidence #18417`. |
|
Merge conflict with v5 in generated api-reference docs (auth.md, configuration.md, packs-and-acmm.md); deferred this kick for a regeneration/rebase rather than a hand merge. 🐝 Hive Agent: — hive: agent=scanner backend=claude model=claude-sonnet-5-5 claude=2.1.325 |
Mutation testing⏱️ The 900s mutation budget ran out, so 1 package(s) were not fully mutated and the results below do not cover them:
❌ gremlins did not produce a report for 1 package(s), so no verdict can be derived from this run (see the job log):
1 mutant(s) in changed files are not reached by any test (NOT COVERED). A maintainer may apply the
Verdict: |
3a7fbf5 to
6ca975a
Compare
There was a problem hiding this comment.
Correctness review (head 3a7fbf5): 1 in-scope finding, one fix to apply.
PUT leaves the live config changed when the save fails. handleMeetingsPersonaPut (src/pkg/dashboard/api_meetings_persona.go ~L501-509) assigns s.deps.Config.Meetings.Persona = next and VoiceOnAddress on the shared config. It does this without a lock and before s.saveConfig(). If saveConfig fails, the handler returns 500, but the in-memory config keeps the unsaved values. That has three effects:
- The next GET reports the unsaved persona as effective.
restart_requiredis computed from that in-memory config, so it can be true for a persona that was never persisted.- A later successful save of another setting would persist it.
Two concurrent PUTs also race on the same struct. I could not read how the sibling handlers that call saveConfig handle this (for example api_meetings.go), so apply the same pattern they use if there is one. Fix: snapshot the old values and restore them if the save fails, and take a mutex around the read-modify-write.
+ s.meetingsAttendee.mu.Lock()
+ defer s.meetingsAttendee.mu.Unlock()
+ oldPersona, oldVoice := s.deps.Config.Meetings.Persona, s.deps.Config.Meetings.VoiceOnAddress
s.deps.Config.Meetings.Persona = next
...
if err := s.saveConfig(); err != nil {
+ s.deps.Config.Meetings.Persona, s.deps.Config.Meetings.VoiceOnAddress = oldPersona, oldVoice
jsonError(w, "saving config: "+err.Error(), http.StatusInternalServerError)The meetingsAttendee mutex is also taken by meetingsAttendeeDeps, which meetingsPersonaSettings calls. Release the lock before calling it (use a dedicated mutex, or unlock before the final jsonResponse) to avoid a deadlock.
Open question, not a finding. I could not confirm that the leave and name matcher handles non-Latin aliases. The Hindi, Japanese and Chinese presets have aliases and names in native script, while the PR body says leave phrases stay Latin because of ASCII word boundaries. Please confirm the alias matcher is not subject to the same limit.
Not checked: the UI JS, openapi.json and the test files.
— hive: agent=adjudicator backend=claude model=claude-sonnet-5-5 claude=2.1.325
|
[APPROVALNOTIFIER] This PR is APPROVED Approval requirements bypassed by manually added approval. This pull-request has been approved by: The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Correctness delta re-review at 9cbc07d (previous head 3a7fbf5)
The delta is mostly v5 merges. The PR's own files changed only slightly; I did not review the unrelated merged-in inbox, campaigns and spektacular code.
Still present (in-scope, changes_requested): PUT mutates live config with no rollback on save failure.
src/pkg/dashboard/api_meetings_persona.go:501-512: handleMeetingsPersonaPut assigns s.deps.Config.Meetings.Persona = next and VoiceOnAddress, then calls s.saveConfig(). If the save fails it returns 500, but the in-memory config already holds the new persona. The attendee and the GET endpoint then serve a persona that was never persisted and that the UI was told failed, and it silently reverts on the next reload.
saveConfig (api.go:756) does not lock either. I checked api_config.go and found no configMu, so the missing lock matches the repo convention and I am not asking for one. The rollback is cheap, though:
prevPersona := s.deps.Config.Meetings.Persona
prevVoice := s.deps.Config.Meetings.VoiceOnAddress
s.deps.Config.Meetings.Persona = next
if req.VoiceOnAddress != nil {
v := *req.VoiceOnAddress
s.deps.Config.Meetings.VoiceOnAddress = &v
}
if err := s.saveConfig(); err != nil {
s.deps.Config.Meetings.Persona = prevPersona
s.deps.Config.Meetings.VoiceOnAddress = prevVoice
jsonError(w, "saving config: "+err.Error(), http.StatusInternalServerError)
return
}
Other earlier notes
- Security: the sample endpoint (
api_meetings_persona.go:535-590) still has no rate limit and still accepts GET. This is out-of-scope for correctness and I did not re-list it. - Style notes (pronoun in
meeting-attendee.js, boot snapshot accessor, doc-comment wrap at ~line 462): I did not re-verify these. They do not bear on correctness.
No new correctness defects found in the PR's own files in this delta.
— hive: agent=adjudicator backend=claude model=claude-sonnet-5-5 claude=2.1.325
|
New changes are detected. LGTM label has been removed. |
…ts (Betty E) A new Settings tab manages the meeting attendee persona. - config: eleven presets built only from voices Kokoro-FastAPI v0.10.0 ships (Betty Bee default; American and British English, Spanish, French, Italian, Brazilian Portuguese, Hindi, Japanese, Mandarin) with intros and sample lines in their language; the Kokoro voice catalog, voice types (bot-style listed as coming later), preset order, override sources and the persona sample line. - dashboard: GET/PUT /api/meetings/persona (owner or read-write; effective persona, presets, overrides, voices, restart_required, attendee email section) and POST /api/meetings/persona/sample (Kokoro speech through a TTS resolver; 503 TTS not configured until it is wired). Email-in data arrives through SetMeetingsAttendeeEmail. - UI: Persona (preset cards, editable fields, voice list by language, live intro preview, Play sample), Behaviour (unprompted caps, voice on address) and Email (address, access list, approvals, switches disabled until email-in). - openapi.json, API reference, meetings.md, settings.md. Part of #18391. Fixes #18396. Signed-off-by: Andy Anderson <andy@clubanderson.com>
Signed-off-by: Andy Anderson <andy@clubanderson.com>
The dashboard CSP has no media-src, so a blob URL cannot play and the downloads ratchet forbids createObjectURL. The <audio> element now plays GET /api/meetings/persona/sample with the form's unsaved voice, language and name as query parameters. Signed-off-by: Andy Anderson <andy@clubanderson.com>
01658ad to
d31d9e1
Compare
…n (Betty C2, part 6) (#18487) The Email section of Settings, Meeting attendee (#18417) is live once the calendar email allowlist is wired: SetMailAllowlist installs a MeetingsAttendeeEmail that reports each user's calendar emails with proof status (verified/pending), the mail-in files awaiting approval and the meetings.email switches. Each user adds, proves (code and instruction shown) and removes their own addresses under My calendar emails (GET/POST/DELETE /api/meetings/calendar-emails). The owner's switches save through PUT /api/meetings/persona with an optional email block (owner only, 403 otherwise). static/index.html regenerated; meetings.md and api-reference. Part of #18391, #18395. Signed-off-by: Andy Anderson <andy@clubanderson.com>
Part of #18391. Fixes #18396.
A new Settings tab, Meeting attendee, manages the hive's meeting persona.
Presets (Kokoro-backed)
Every preset uses a voice that Kokoro-FastAPI v0.10.0 (the image in namespace
meetings) ships, verified againstapi/src/voices/v1_0at that tag:af_heart(female)am_michael(male)bf_emma(female)bm_george(male)ef_doraff_siwisif_sarapf_dorahf_alphajf_alphazf_xiaobeiEach one has its intro, plain (humor off) intro and sample line in its language. Leave phrases stay in Latin script because the leave matcher uses ASCII word boundaries. A bot-style voice is listed as coming later, because Kokoro has no such voice.
API (owner or read-write)
GET /api/meetings/persona: the effective persona, the presets, which fields are overridden (configorenv), the Kokoro voices, voice types,restart_required(the saved persona differs from the one the hive booted with),tts_configured, and the email section.PUT /api/meetings/persona: preset and/or overrides plusvoice_on_address. A value equal to the preset's is stored as no override. The request is validated and saved to hive.yaml.POST /api/meetings/persona/samplecalls Kokoro/v1/audio/speechand returns mp3, capped at 2 MiB. By default it usesmeetings.tts_urland the meetings TTS token that phase B added (the same service Quorum speaks Discord replies through).SetMeetingsTTSResolvercan override that. Without a URL the endpoint returns 503 "TTS not configured".GET /api/meetings/persona/sampletakes the same fields as query parameters. The browser<audio>element plays it from the dashboard origin, because the dashboard CSP has nomedia-srcand the downloads ratchet forbidscreateObjectURL.SetMeetingsAttendeeEmail(phase C2). Until thenemail.availableis false and the UI shows the section with its controls disabled. The address (hive@<dashboard host>) and the live access list are shown already.UI
The tab has three sections:
static/index.htmlwas regenerated by concatenating the manifest, and the result is byte-identical to whatConcatIndexproduces.Docs and guards
meetings.md(new "Meeting attendee settings" section),settings.md,dashboard-sections.md, the API reference andopenapi.json.🤖 Generated with Claude Code