Skip to content

✨ Inbox: auto-transcribe hive recordings - #18432

Merged
kubestellar-prow[bot] merged 1 commit into
v5from
feat/inbox-recording-autotx
Nov 16, 2026
Merged

kubestellar-prow[bot] merged 1 commit into
v5from
feat/inbox-recording-autotx

Conversation

@clubanderson

Copy link
Copy Markdown
Member

Third of the "record a meeting directly in hive" PRs (backend #18408, recorder #18422): a recording is transcribed automatically when it ends, and a general AudioOpener local-file transcription path.

What it adds

  • AudioOpener (pkg/inbox/audioopener.go): a general interface for any Inbox source whose audio lives on this hive's disk, such as dashboard recordings or uploaded audio and video files. OpenAudio(ctx, Item) (LocalAudio, error) returns the open file with its MIME type, size and modification time. Playback already serves such files with http.ServeContent. Transcription now opens them directly too (localTranscribeAudio), so the spoke never makes an HTTP call to itself. The provider gets the file's MIME type and size, retries reopen the file, and inbox.transcription.max_bytes is checked before upload. The hive still never decodes audio; the sandboxed whisper subprocess does (its ffmpeg already has the matroska/mov demuxers and the opus/aac decoders).
  • Auto-transcribe on finalize: a finished recording is queued with the hive's provider (auto means whisper first), with the same progress bar and ETA as any other Inbox transcription. It is audited as inbox_transcribe with the recorder as actor (or inbox-recording-sweep for idle auto-finalized ones).
  • Consent stays separate: recording does not imply the hive-wide transcription consent. Nothing runs until inbox.transcription is enabled with consent_acknowledged: true. From then on, every hive-recording item counts as opted in whatever inbox.transcription.mode says. Recordings made while transcription was off are picked up by the transcription sweep, which now also runs from the 10-minute recording ticker. Expired audio is never sent.
  • Recorder copy: the consent notice and the "saved" state now say the recording is transcribed automatically (or that transcription is off).
  • Docs: a "Transcription" section in src/docs/inbox-recording.md.

Tests

Go:

  • auto-transcribe is enqueued on finalize in manual mode, and the transcriber reads exactly the local file; a client that fails on any request proves there is no HTTP call
  • the transcript is written into the fact and served as content
  • nothing is transcribed while transcription is disabled; the item shows transcribe_unavailable=disabled
  • the sweep picks recordings up once transcription is enabled with consent
  • expired audio is neither swept nor uploaded (a manual run is skipped as unsupported)
  • max_bytes skip

🤖 Generated with Claude Code

@kubestellar-prow kubestellar-prow Bot added dco-signoff: yes Indicates the PR's author has signed the DCO. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Nov 16, 2026
@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Open PR overlap check

Base branch: v5

Conflicts are checked with every PR merged onto the current tip of v5, so a PR that only needs a rebase is not reported as conflicting with its siblings.

PR Title Relation Files
#18471 ✨ inbox: mail-in files as email items with an owner approval queue (Betty C2 part 5) CONFLICT src/cmd/hive/boot_inbox.go
src/pkg/dashboard/static/index.html
src/pkg/inbox/transcription.go (conflict)

@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Mutation testing

2 mutant(s) in changed files are not reached by any test (NOT COVERED). A maintainer may apply the mutation/acknowledged label to accept this.

File Line Mutation
src/cmd/hive/boot_inbox.go 277 CONDITIONALS_NEGATION
src/pkg/dashboard/api_inbox_recordings.go 80 CONDITIONALS_NEGATION

Verdict: uncovered (#17349).

@hivecommons-hive

hivecommons-hive Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor.

@clubanderson this PR is held at stage/071-needs-author and the hive will not merge it yet.

Failing checks:

  • overlayfs-exec-guard

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.

stage 080-awaiting-merge-admission → 071-needs-author: optional-check-failing:overlayfs-exec-guard

@hivecommons-hive

Copy link
Copy Markdown
Contributor

hive/scanner: branch is 4 commits behind v5 (baseline check: MERGE_BASE) and test (rest 4/4)/coverage are red. Please merge v5 and re-check; not pushing to a non-hive branch.


🐝 Hive Agent: scanner | Instance: hosted-available-oke-11-placeholder-r05x | SHA: unknown

— hive: agent=scanner backend=claude model=claude-sonnet-5-5 claude=2.1.325

@clubanderson
clubanderson force-pushed the feat/inbox-recording-autotx branch from 05e0514 to 7c63ee3 Compare November 16, 2026 16:06

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Decision needed: @clubanderson should recordings auto-transcribe when provider: auto would fall back to Deepgram (cloud), or only when the resolved provider is local whisper?

Read the diff against the tree at the PR head (Transcribe, precheck, resolveProvider, TranscribeSweep callers). The auto-transcribe plumbing looks correct to me: autoTranscribeRecording (recordingsource.go:~333) goes through Service.Transcribe (transcription.go:298), so the Enabled and ConsentAcknowledged gates, the busy/already-done checks and precheck still apply, and ErrRecordingExpired is now mapped to a skip rather than a failure (transcription.go:415). One point is worth a maintainer's eye.

Docs overstate "audio stays on the hive" (low–medium, privacy wording) — src/docs/inbox-recording.md (new "Transcription" section) says provider: auto "picks the built-in whisper first, so the audio stays on the hive". resolveProvider (transcription_providers.go:83-92) falls back to Deepgram when no earlier provider in autoProviderOrder is available. So on a hive where whisper is not available, a meeting recording is sent to a third-party API automatically at stop time. The recorder consent text is also silent on this: it says only "this hive transcribes the recording automatically" (inbox-recorder.js:112). The hive-wide consent presumably covers cloud providers, but recordings of people are the most sensitive audio this feature handles. Suggest either stating the fallback in the docs and consent copy, or having recordings only auto-transcribe when the resolved provider is local.

Suggestion, not a defect: TestRecordingAutoTranscribedOnFinalize uses a fake transcriber, so it cannot show which provider auto resolves to; a test pinning that resolution for a recording would back the docs claim.

— hive: agent=reviewer-2 backend=claude model=claude-sonnet-5-5 claude=2.1.325

@clubanderson
clubanderson force-pushed the feat/inbox-recording-autotx branch from 7c63ee3 to f4a6606 Compare November 16, 2026 16:19
@kubestellar-prow kubestellar-prow Bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Nov 16, 2026
@clubanderson clubanderson added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Nov 16, 2026
@kubestellar-prow

Copy link
Copy Markdown
Contributor

[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

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

A finished recording is queued for transcription with the hive's
provider as soon as it is finalized. AudioOpener (now in its own file,
general to any source whose audio is on this hive's disk, such as
uploads) lets the transcriber open the local file directly, so the
spoke never calls its own HTTP API. Recording does not imply
transcription consent: nothing runs until inbox.transcription is enabled
with consent, after which recordings count as opted in regardless of
mode and the sweep (also run from the recording ticker) catches up on
recordings made while it was off.

Signed-off-by: Andy Anderson <andy@clubanderson.com>
@clubanderson
clubanderson force-pushed the feat/inbox-recording-autotx branch from f4a6606 to b192799 Compare November 16, 2026 19:38
@kubestellar-prow kubestellar-prow Bot removed the lgtm Indicates that a PR is ready to be merged. label Nov 16, 2026
@kubestellar-prow

Copy link
Copy Markdown
Contributor

New changes are detected. LGTM label has been removed.

@clubanderson clubanderson added the lgtm Indicates that a PR is ready to be merged. label Nov 16, 2026
@kubestellar-prow
kubestellar-prow Bot merged commit 2b17a49 into v5 Nov 16, 2026
95 of 97 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the feat/inbox-recording-autotx branch November 16, 2026 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. conflicts-with-open-pr Open PR has a merge conflict with another open PR dco-signoff: yes Indicates the PR's author has signed the DCO. lgtm Indicates that a PR is ready to be merged. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant