diff --git a/docs/content/docs/guides/deliverability.mdx b/docs/content/docs/guides/deliverability.mdx index 3ccb6a660..4755f012b 100644 --- a/docs/content/docs/guides/deliverability.mdx +++ b/docs/content/docs/guides/deliverability.mdx @@ -93,6 +93,8 @@ Warmup's non-spam share includes inbox and category tabs among classified receip Metric metadata specifies the population, numerator, denominator, missingness, unit, source, and classification policy. Warmup reports include their date range; the headline rate uses a seven-day window. The optional 95% Wilson interval assumes independent observations. Repeated mailboxes, seeds, routes, and timing violate that assumption, so this interval is not an efficacy claim or calibrated real-recipient inbox probability. +In the dashboard, a provider, a mail host or a window with fewer than 10 classified warmup receipts shows its counts instead of a share, and its bar draws one square per receipt, because one email moves a share that small by 10 points or more. The API still returns every rate. + Google, Microsoft, and Yahoo family totals are not interchangeable with their consumer and business services. Inspect the host-level breakdown when Gmail versus Google Workspace or Outlook.com versus Microsoft 365 matters. Hosts that cannot be distinguished remain unknown. Pool placement, organic recipient activity, opens, bounces, and complaints stay separate. A **rescue request** is an action attempt, not confirmed movement or proof that reputation recovered. diff --git a/docs/content/docs/guides/warmup.mdx b/docs/content/docs/guides/warmup.mdx index c8eb28d1a..18a714ddb 100644 --- a/docs/content/docs/guides/warmup.mdx +++ b/docs/content/docs/guides/warmup.mdx @@ -161,7 +161,7 @@ Outside-workspace partners broaden observations; unlinked self-hosted instances Within that order, partners are picked by weight rather than at random. Three things move the weight: -- **Host and domain coverage.** Eligible mail hosts start with balanced total weight, so a host with many custom domains does not crowd out a consumer host sharing one domain, such as Gmail. Recently used domains are downweighted within each host; partner no-repeat rules and daily receiving caps still apply. Gmail and Google Workspace are distinct hosts, as are Outlook.com and Microsoft 365. +- **Provider, host and domain coverage.** Google, Microsoft, Yahoo and other providers each start with an equal share of new threads, whatever number of smaller hosts the pool holds, so a long tail of small hosts cannot crowd out the providers your prospects use. Within a provider, each mail host starts with an equal share, so a host with many custom domains does not crowd out a consumer host sharing one domain, such as Gmail. Recently used domains are downweighted within each host; partner no-repeat rules and daily receiving caps still apply. Gmail and Google Workspace are distinct hosts, as are Outlook.com and Microsoft 365. - **Where you are landing.** Warmbly tracks your spam-placement rate separately for each recipient mail host over the last seven days: who actually runs that recipient's mail (Google Workspace, Microsoft 365, Zoho Mail, Hostinger and so on), read from the partner's mail servers rather than its address, so two custom domains on different hosts are judged apart. A mailbox landing in spam at one host but not the others is sent fewer partners on that host until the rate falls, without waiting for an overall health band to trip. A free Gmail or Outlook.com mailbox works the other way at Google, Microsoft and Yahoo: it is sent more partners where it lands in spam (up to twice as many), because the pool rescues its mail at the [recovery](#recovery-engagement) rate and that rescue is what repairs its standing with that provider. Other hosts still get fewer. - **Your routing rules**, when you have configured any. A rule's weight multiplies a partner's chance; a weight of `0` is not a weight but an exclusion, so that pairing never happens. diff --git a/internal/tasks/email_task.go b/internal/tasks/email_task.go index 1077f593e..381e6fb06 100644 --- a/internal/tasks/email_task.go +++ b/internal/tasks/email_task.go @@ -869,10 +869,17 @@ func pickWeightedPartner(candidates []uuid.UUID, sig partnerSignals) uuid.UUID { weights := make([]float64, len(candidates)) hostTotals := make(map[string]float64) - // Normalize only the coverage base; quality and customer rules still change host share. + groupHosts := make(map[string]map[string]struct{}) + // Normalize only the coverage base (equal per provider group, then per host + // within it); quality and customer rules still change the shares. for _, id := range candidates { if host := sig.hostsByID[id]; host != "" { hostTotals[host] += 1.0 / float64(1+sig.domainCounts[sig.domainsByID[id]]) + group := models.WarmupRecipientGroup(host, "") + if groupHosts[group] == nil { + groupHosts[group] = make(map[string]struct{}) + } + groupHosts[group][host] = struct{}{} } } var total float64 @@ -880,8 +887,9 @@ func pickWeightedPartner(candidates []uuid.UUID, sig partnerSignals) uuid.UUID { domain := sig.domainsByID[id] // Diversity base weight. w := 1.0 / float64(1+sig.domainCounts[domain]) - if hostTotal := hostTotals[sig.hostsByID[id]]; hostTotal > 0 { - w /= hostTotal + host := sig.hostsByID[id] + if hostTotal := hostTotals[host]; hostTotal > 0 { + w /= hostTotal * float64(len(groupHosts[models.WarmupRecipientGroup(host, "")])) } // Per-host placement feedback. diff --git a/internal/tasks/partner_selection_test.go b/internal/tasks/partner_selection_test.go index 7e5ab12cb..5d6983808 100644 --- a/internal/tasks/partner_selection_test.go +++ b/internal/tasks/partner_selection_test.go @@ -67,6 +67,32 @@ func TestPickWeightedPartnerRetainsDomainDiversityWithinAHost(t *testing.T) { } } +// A long tail of small hosts shares one provider group's weight, so it cannot outvote Google and Microsoft. +func TestPickWeightedPartnerBalancesProviderGroupsBeforeHosts(t *testing.T) { + google, microsoft := uuid.New(), uuid.New() + candidates := []uuid.UUID{google, microsoft} + sig := partnerSignals{ + domainsByID: map[uuid.UUID]string{google: "g.test", microsoft: "m.test"}, + hostsByID: map[uuid.UUID]string{google: "google_workspace", microsoft: "microsoft365"}, + } + for i, host := range []string{"other", "ionos", "zoho", "ovh", "hostinger", "rackspace"} { + id := uuid.New() + candidates = append(candidates, id) + sig.domainsByID[id] = fmt.Sprintf("small-%d.test", i) + sig.hostsByID[id] = host + } + groups := map[string]int{} + for range 6000 { + host := sig.hostsByID[pickWeightedPartner(candidates, sig)] + groups[models.WarmupRecipientGroup(host, "")]++ + } + for _, group := range []string{models.WarmupRecipientGoogle, models.WarmupRecipientMicrosoft, models.WarmupRecipientOther} { + if got := groups[group]; got < 1700 || got > 2300 { + t.Errorf("%s drawn %d/6000, want about a third: %v", group, got, groups) + } + } +} + func TestPickWeightedPartner_FallsBackToUniformWithoutDomains(t *testing.T) { a := uuid.New() b := uuid.New() diff --git a/web/src/components/app/placement/MailboxPlacementTab.tsx b/web/src/components/app/placement/MailboxPlacementTab.tsx index 7e96688c0..923282596 100644 --- a/web/src/components/app/placement/MailboxPlacementTab.tsx +++ b/web/src/components/app/placement/MailboxPlacementTab.tsx @@ -23,6 +23,8 @@ import { otherHostsNote, rateSentence, rescueSummary, + sampledShare, + shareWithheld, totals, utcWindow, viewDays, @@ -84,6 +86,8 @@ export default function MailboxPlacementTab({ mailboxId, poolHealth }: { mailbox const everDelivered = (report.summary.observed_receipts ?? report.summary.delivered) > 0 || rate.delivered > 0; const filtered = activeGroup !== "all"; const otherNote = otherHostsNote(rate); + const share = sampledShare(t.inboxRate, t.delivered); + const spamShare = sampledShare(t.spamRate, t.delivered); return (