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

@@ -76,9 +76,17 @@ cat > "$TMPFILE" <<'EPOCHS'
(epoch 18)
(eval "(get (erlang-eval-ast \"delivery:delivery_set([{actor, alice}, {to, followers}], [], follower_graph:new()) =:= []\") :name)")
;; public audience symbol -> [] for v2 (Step 7c will populate)
;; public audience symbol -> sender's followers for v2 (§13.4)
(epoch 19)
(eval "(get (erlang-eval-ast \"delivery:delivery_set([{actor, alice}, {to, public}], []) =:= []\") :name)")
(eval "(get (erlang-eval-ast \"F = [{actor, bob}, {type, follow}, {object, alice}], A = [{actor, alice}, {type, accept}, {object, F}], S = follower_graph:fold(A, follower_graph:fold(F, follower_graph:new())), delivery:delivery_set([{actor, alice}, {to, public}], [], S) =:= [bob]\") :name)")
;; public with empty follower-graph -> []
(epoch 28)
(eval "(get (erlang-eval-ast \"delivery:delivery_set([{actor, alice}, {to, public}], [], follower_graph:new()) =:= []\") :name)")
;; public + followers in same audience deduped (both expand identically)
(epoch 29)
(eval "(get (erlang-eval-ast \"F = [{actor, bob}, {type, follow}, {object, alice}], A = [{actor, alice}, {type, accept}, {object, F}], S = follower_graph:fold(A, follower_graph:fold(F, follower_graph:new())), delivery:delivery_set([{actor, alice}, {to, [public, followers]}], [], S) =:= [bob]\") :name)")
;; Mixed explicit + followers, followers carry two peers
(epoch 20)
@@ -136,7 +144,9 @@ check 15 "duplicates within :to deduped" "true"
check 16 ":to/:cc overlap deduped" "true"
check 17 "followers expands via graph" "true"
check 18 "empty follower-graph -> []" "true"
check 19 "public v2 -> []" "true"
check 19 "public -> sender's followers" "true"
check 28 "public empty graph -> []" "true"
check 29 "public + followers dedupe" "true"
check 20 "mixed explicit + followers" "true"
check 21 "followers + overlap deduped" "true"
check 22 "collect_recipients raw flat" "true"