fed-sx-m2: Step 7b — public audience expansion + 3 tests
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 41s

delivery:expand_audience(public, Sender, Graph) now returns the
sender's followers (same as the followers symbol). Per design
§13.4 the practical Public fan-out semantics for an open social
network is 'every follower of the publishing actor'. The
explicit shared-inbox peer-instance model (Mastodon-style
per-instance broadcast) defers to v3 when there's a real
known-peer-instance registry to drive it.

19/19 in delivery_set.sh:
  - public symbol now expands to sender's followers (epoch 19,
    updated from v2 placeholder)
  - public with empty follower-graph -> [] (epoch 28)
  - public + followers in same audience dedupe (epoch 29)

Conformance 761/761.
This commit is contained in:
2026-06-06 23:39:00 +00:00
parent 086c576d48
commit 02c1f0f979
3 changed files with 41 additions and 14 deletions

View File

@@ -493,11 +493,16 @@ expansion via the audience predicates from M1's genesis bundle.
suppress_self + dedup helpers + expand_audience pass-through.
Module lives in `next/kernel/delivery.erl` (separate from
outbox so Step 8's delivery-queue gen_server has a clean home).
- [ ] **7b** — Public expansion: when Cfg or KernelState carries
a known-peer-instance set, `public` expands to one entry per
peer instance for the public-reach broadcast (Mastodon's
shared inbox per-instance pattern). v2 ships the empty case
via 7a so callers don't have to special-case the symbol.
- [x] **7b** — Public audience expansion. v2 default: `public`
expands to the sender's followers (same as `followers`) per
design §13.4 — the practical fan-out for an open social
network is "every follower of the publishing actor". The
explicit shared-inbox peer-instance model (Mastodon-style
per-instance broadcast) defers to v3 when there's a real
known-peer-instance registry to drive it. `public + followers`
in the same audience deduplicates because both symbols
expand identically. 19/19 in `delivery_set.sh` (2 new cases
+ 1 case updated from the v2 placeholder behavior).
- [ ] **7c** — Outbox-side integration: `outbox:publish/2`
computes the delivery set after sign + log and stashes it in
the Result proplist as `{delivery_set, [ActorId, ...]}`. Step
@@ -845,6 +850,16 @@ proceed.
Newest first.
- **2026-06-06** — Step 7b: public audience expansion.
`delivery:expand_audience(public, Sender, Graph)` now returns
the sender's followers (same as `followers`) — per design
§13.4 that's the practical fan-out semantics for an open
social network. The explicit shared-inbox peer-instance model
defers to v3. 19/19 in `delivery_set.sh` (+2 new cases:
public-with-empty-graph, public+followers-dedupe; +1 case
updated from the v2 placeholder). Conformance 761/761
preserved.
- **2026-06-06** — Step 7a: audience-resolving delivery set.
New `next/kernel/delivery.erl`: `delivery_set/2,3(Activity,
KernelState[, FollowerGraph])` returns a deduplicated list of