Skip to content

✨ Inbox: record recordings directly in hive (backend) - #18408

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

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

Conversation

@clubanderson

Copy link
Copy Markdown
Member

First of the sequential "record a meeting directly in hive" PRs: the backend store and API. The dashboard recorder follows in the next PR; this one keeps inbox.recording.enabled default false.

What it adds

  • inbox.recording config: enabled (false here), retention_days 5, max_seconds 10800 (3h), max_bytes 200 MiB, quota_bytes 2 GiB, idle_finalize_minutes 120. max_bytes must not exceed quota_bytes.
  • API (owner and read-write only; read sessions get 403):
    • POST /api/inbox/recordings with {title, mime, consent_version, includes_tab_audio} returns {id, max_chunk_bytes, max_seconds, retention_days, transcribes}. The consent notice version and the user are stored in the recording's metadata. One active recording per user (409 with active_id).
    • POST /api/inbox/recordings/{id}/chunks?seq=N: raw body through http.MaxBytesReader (512 KiB), in order only (409 with expected_seq on a gap), idempotent re-send by sha256 (200 duplicate: true), each part fsynced. The first chunk is sniffed for a WebM (EBML) or MP4 (ftyp) signature; anything else is 415. The hive never decodes audio.
    • POST .../finalize: concatenates parts in order into audio.webm / audio.mp4, writes meta.json and a pending Knowledge fact in the personal layer (never published to the hub).
    • DELETE .../{id}: abort (the recorder, or an owner).
    • GET .../{id}/audio: same-origin http.ServeContent (Range), Cache-Control: no-store, Cross-Origin-Resource-Policy: same-origin; 410 "audio expired (kept 5 days)" after retention. The generic Inbox player path /api/inbox/hive-recording/{id}/audio/stream serves the same file from disk (no HTTP call to itself).
  • Storage under <knowledge data>/connector-state/recordings/<id>/, 0700 dirs and 0600 files.
  • A sweep at boot and every 10 min: finalizes recordings idle for 2h (removes ones with no audio) and deletes audio past retention_days, logged and audited. Transcripts and facts stay.
  • RecordingSource (hive-recording, builtin): implements Source and AudioSource, plus a new AudioOpener for local files. Items carry recorded_by, audio_expired and audio_retention_days; expired items are not transcribable.
  • Audit actions: inbox_recording_start, inbox_recording_finalize, inbox_recording_abort, inbox_recording_audio, inbox_recording_audio_expired.
  • Safari: fragmented MP4 (ftyp+moov, then moof+mdat per chunk) is valid when concatenated in order, so one recorder per recording and one file. Finalize walks the top-level MP4 boxes and logs a warning if they do not chain to EOF. A test builds such chunks and checks the concatenated box chain.
  • Docs: src/docs/inbox-recording.md (consent guidance, retention, storage), API reference rows, OpenAPI entries.

Tests

Go: role matrix (read and unverified owner 403), consent required and stored, one active per user, MIME and container sniff (rejects non-media), chunk order, gap 409, idempotent resend and mismatch, chunk size, max_bytes, quota, max_seconds, finalize concatenation (WebM and fragmented MP4 box walk), empty finalize, abort, retention sweep at 5 days keeps transcript and fact, configurable retention, idle auto-finalize, Range 206 and no-store on the audio endpoint, 410 after expiry, config defaults, YAML and validation.

🤖 Generated with Claude Code

@kubestellar-prow kubestellar-prow Bot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. dco-signoff: yes Indicates the PR's author has signed the DCO. 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
#18417 ✨ meetings: Settings tab "Meeting attendee" with Kokoro persona presets (Betty E) CONFLICT dashboard/openapi.json
src/docs/api-reference/auth.md (conflict)
src/docs/api-reference/configuration.md
src/docs/api-reference/knowledge.md
src/docs/api-reference/packs-and-acmm.md
src/pkg/dashboard/api.go
#18418 ✨ Inbox: add links to the Inbox, fetched under an SSRF guard CONFLICT dashboard/openapi.json (conflict)
src/cmd/hive/boot_inbox.go
src/docs/api-reference/knowledge.md (conflict)
src/pkg/inbox/service.go
#18416 ✨ meetings: Quorum v0.2.0 and Discord speech through the TTS service CONFLICT dashboard/openapi.json
src/docs/api-reference/knowledge.md (conflict)
#18415 ✨ Inbox: pills record where an item was shared, by whom and when CONFLICT src/cmd/hive/boot_inbox.go (conflict)
src/pkg/dashboard/api_inbox.go
src/pkg/inbox/inbox.go
src/pkg/inbox/service.go
#18419 ⚠️ Retire the inception API, watcher and brainstorm inception mode CONFLICT dashboard/openapi.json
src/docs/api-reference/auth.md (conflict)
src/docs/api-reference/configuration.md (conflict)
src/docs/api-reference/packs-and-acmm.md (conflict)
src/docs/documentation-map.md
src/pkg/dashboard/api.go
#18405 ✨ Inbox: send items into an Inception (spek) session CONFLICT dashboard/openapi.json
src/docs/api-reference/auth.md (conflict)
src/pkg/dashboard/api_inbox.go
src/pkg/inbox/inbox.go

@github-actions github-actions Bot added the conflicts-with-open-pr Open PR has a merge conflict with another open PR label Nov 16, 2026
@github-actions github-actions Bot removed the conflicts-with-open-pr Open PR has a merge conflict with another open PR label Nov 16, 2026
@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.

Why:

  • the branch conflicts with the base and needs a rebase

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 (clean, no conflicts); CI pending — sweep will merge when green.


🐝 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-backend branch from 8da1e84 to f1cc41e Compare November 16, 2026 13:09
@github-actions github-actions Bot added the conflicts-with-open-pr Open PR has a merge conflict with another open PR label Nov 16, 2026
@hivecommons-hive
hivecommons-hive Bot force-pushed the feat/inbox-recording-backend branch from f1cc41e to 0a5b177 Compare November 16, 2026 13:12
@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Mutation testing

⏱️ The 900s mutation budget ran out, so 2 package(s) were not fully mutated and the results below do not cover them:

  • pkg/dashboard: cut short (partial, no report)
  • pkg/inbox: skipped (not started)

4 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 22 ARITHMETIC_BASE
src/cmd/hive/boot_inbox.go 240 CONDITIONALS_NEGATION
src/pkg/config/inbox_recording.go 20 ARITHMETIC_BASE
src/pkg/config/inbox_recording.go 20 ARITHMETIC_BASE

Verdict: uncovered (#17349).

@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

Store recordings made in the hive's own dashboard: start (consent version
and user stored), ordered 512 KiB chunks fsynced per part with 409 gap
detection and idempotent re-send, finalize (in-order concatenation into
audio.webm or audio.mp4 plus a pending personal-layer Knowledge fact),
abort, and same-origin Range playback with no-store.

Caps: max_seconds 3h, max_bytes 200 MiB, quota_bytes 2 GiB; idle
recordings finish after 2h. A sweep deletes raw audio after
inbox.recording.retention_days (default 5) and keeps the transcript and
fact. RecordingSource lists recordings as hive-recording Inbox items.
Owner and read-write only, audited. Off by default in this PR.

Signed-off-by: Andy Anderson <andy@clubanderson.com>
@clubanderson
clubanderson force-pushed the feat/inbox-recording-backend branch from 0a5b177 to aa709d7 Compare November 16, 2026 13:41
@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.

@github-actions github-actions Bot added the conflicts-with-open-pr Open PR has a merge conflict with another open PR label Nov 16, 2026
@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 a5b2efb into v5 Nov 16, 2026
89 of 91 checks passed
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/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant