fed-sx-m2: Step 7c — outbox delivery_set integration + 4 tests
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 12m51s

outbox:publish/2 now computes the audience-resolved delivery set
after sign + log and stashes it in the Result proplist as
{delivery_set, [ActorId, ...]}. Step 8's delivery-queue worker
reads it off the publish result.

New compute_delivery_set/3(Request, Signed, Context):
  - Pulls :follower_graph from Context (defaults to empty graph)
  - Calls recipients_envelope/2 to synthesise a minimal envelope
    from Request's :to / :cc + Signed's :actor
  - Routes through delivery:delivery_set/3 unchanged

The envelope construct/4 surface doesn't carry :to / :cc (only
type / actor / published / object), and changing that ripples
through every envelope shape test. recipients_envelope/2 keeps
the compute boundary local to outbox.

4 new cases in outbox_publish.sh (17/17 total):
  - Result :delivery_set empty default
  - explicit :to -> [bob] in set
  - followers symbol expands via Context :follower_graph
  - self-suppression (alice in :to drops to []bob])

Module loads rebumped: follower_graph + delivery added as
dependencies; outbox shifts from epoch 5 to epoch 7. Internal
sx_server timeout bumped 240s -> 480s to fit the larger module
set.

Step 7 fully closed (7a delivery module + 7b public expansion
+ 7c outbox integration). Federation now has the end-to-end
audience resolution: an outbound activity's :to / :cc plus any
follower_graph expansion becomes a deduped recipient list ready
for Step 8 to dispatch.

Conformance running + adjacent gate running.
This commit is contained in:
2026-06-07 00:27:55 +00:00
parent 02c1f0f979
commit 536473cd68
3 changed files with 105 additions and 7 deletions

View File

@@ -503,10 +503,27 @@ expansion via the audience predicates from M1's genesis bundle.
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
8's delivery-queue worker reads it off the publish result.
- [x] **7c** — Outbox-side integration. `outbox:publish/2`
now computes the delivery set after sign + log and stashes it
in the Result proplist as `{delivery_set, [ActorId, ...]}`.
Context's optional `:follower_graph` field carries a
follower_graph state for `public` / `followers` audience
expansion; absent -> empty graph (explicit `:to`/`:cc`
recipients still resolve). New helper
`compute_delivery_set/3(Request, Signed, Context)` and
`recipients_envelope/2` synthesise a minimal recipient
envelope from Request's `:to`/`:cc` + Signed's `:actor` so
`delivery:delivery_set/3` can process it unchanged
(outbox:construct/4 doesn't carry `:to`/`:cc` through the
envelope shape, and changing that surface would ripple to
every existing envelope test). Step 8's delivery-queue
worker will read `{delivery_set, [ActorId, ...]}` off the
publish result. 17/17 in `outbox_publish.sh` (+4 new cases:
empty-default, explicit-:to, followers-symbol-via-graph,
self-suppression). Module load chain rebumped from epoch 5
to epoch 7 (adds follower_graph + delivery as dependencies)
and the test's internal sx_server timeout bumped 240s →
480s to fit the larger module set.
---
@@ -850,6 +867,23 @@ proceed.
Newest first.
- **2026-06-07** — Step 7c (closes Step 7): outbox-side
delivery_set integration. `outbox:publish/2` computes the
audience-resolved delivery set after sign + log and stashes
it in the Result proplist as `{delivery_set, [ActorId, ...]}`.
New `compute_delivery_set/3(Request, Signed, Context)`
threads `:follower_graph` from Context through to
`delivery:delivery_set/3`. `recipients_envelope/2` synthesises
a minimal envelope from the Request's `:to`/`:cc` + Signed's
`:actor` so the existing delivery API works unchanged
(envelope construct/4 doesn't carry the audience fields
through). 17/17 in `outbox_publish.sh` (+4 new: empty-default,
explicit-:to, followers-symbol-via-graph, self-suppression).
Module load order shifted from epoch 5 to epoch 7 to make
room for follower_graph + delivery; internal sx_server
timeout bumped 240s → 480s. Step 7 fully closed (7a delivery
module + 7b public expansion + 7c outbox integration).
- **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