Repository navigation
✨ inbox: mail-in files as email items with an owner approval queue (Betty C2 part 5) - #18471
Conversation
Open PR overlap check✅ Resolved: no conflicting open PRs or same-file overlaps remain against |
|
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 (one conflict in transcription.go, resolved by taking v5's localTranscribeAudio path for AudioOpener); CI pending — sweep will merge when green. 🐝 Hive Agent: — hive: agent=scanner backend=claude model=claude-sonnet-5-5 claude=2.1.325 |
Mutation testing5 mutant(s) in changed files are not reached by any test (NOT COVERED). A maintainer may apply the
Verdict: |
|
[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 |
…etty C2, part 5)
POST /api/inbox/email takes the Markdown, audio and image attachments
hive-mx received for hive@<host>, relayed and signed by the hub, and
spools them as items of a new built-in email source under
connector-state/email/items (0700/0600, 256 MiB, ids stable per message
and file so a retried delivery dedupes). A DMARC-aligned sender on the
calendar email allowlist gets normal items; anyone else's carry
AwaitingApproval: Route (except Knowledge only), auto-routing rules and
transcription skip them until the owner approves
(POST /api/inbox/email/{id}/approve); decline deletes, and unapproved
items expire after 14 days.
Markdown is the item text wrapped as untrusted; audio goes through the
same transcription path as voice items via a new AudioOpener (read from
the spool, no link); images are stored attachments served by
GET /api/inbox/email/{id}/file with the sniffed type, nosniff and a
sandbox CSP. The Inbox shows the sender, an awaiting-approval pill with
Approve/Decline, Open file and image thumbnails (static/index.html
regenerated). openapi.json, api-reference and inbox-voice-sources.md.
Part of #18391, #18395.
Signed-off-by: Andy Anderson <andy@clubanderson.com>
Signed-off-by: Andy Anderson <andy@clubanderson.com>
Signed-off-by: Andy Anderson <andy@clubanderson.com>
de39e82 to
61aaff5
Compare
|
New changes are detected. LGTM label has been removed. |
Part 5 of #18395 (Betty C2, email in; plan #18391 "Mail-in files", design
src/docs/design/email-inbox.md). Builds on #18431 (allowlist, relay-signed endpoints).What
POST /api/inbox/email(relay-signed, already inisPublicPath): hive-mx's Markdown, audio and image attachments become items of a new built-in Inbox sourceemail(pkg/inbox/email_source.go), spooled underconnector-state/email/items/<id>/(0700 dirs, 0600 files, 256 MiB quota,507when full). Item ids are stable per message, recipient and file, so a retried delivery dedupes.Frompassed DMARC alignment and is a proven calendar email of a user with access gets normal items. Anyone else's items carryawaiting_approval:Route(except Knowledge only), auto-routing rules (Sweep, not marked seen so rules apply after approval) and transcription (Transcribable) skip them.POST /api/inbox/email/{id}/approve/decline(owner) approve or delete; unapproved items expire after 14 days.409whenmeetings.email.files_enabledis off.WrapUntrusted), audio goes through the existing transcription path through a newAudioOpenerseam (the transcriber reads the spooled file; no link is minted), images are stored attachments.GET /api/inbox/email/{id}/file(owner/read-write) serves the sniffed type (Markdown astext/plain), inline only for images,nosniffandContent-Security-Policy: default-src 'none'; sandbox.static/index.htmlregenerated.inbox-voice-sources.md("Files mailed to hive@"), openapi.json, api-reference.Tests: spool add/list/fetch/dedupe/approve/decline/expiry/quota/open, the service gates (route, sweep, dismiss still allowed, rules after approval), audio transcribed from the spool with the fake transcriber, and the dashboard endpoints (allowlisted vs outsider, owner-only approval, file headers by kind, quota/off/no-source/blocked-spool errors).
🤖 Generated with Claude Code