From a56be832b05ce758d6583512a3caae63580a3e1d Mon Sep 17 00:00:00 2001 From: Eli Mallon Date: Wed, 1 Jul 2026 15:07:46 -0700 Subject: [PATCH] e2e: create a livestream record so the test stream appears in feeds Livestream records are normally created by the app via place.stream.live.startLivestream when a logged-in user goes live; nothing creates one for a key-based WHIP stream, so the harness's stream never showed up in getLiveUsers and the node logged 'ManifestBuilder: no livestream found' forever. Create the record directly on the test account's PDS; the node keeps lastSeenAt fresh on our behalf via SP_DEV_ACCOUNT_CREDS. Co-Authored-By: Claude Fable 5 --- pkg/cmd/e2e.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/pkg/cmd/e2e.go b/pkg/cmd/e2e.go index 3763b306c..1c3c71316 100644 --- a/pkg/cmd/e2e.go +++ b/pkg/cmd/e2e.go @@ -208,6 +208,25 @@ func runE2E(ctx context.Context, devEnvPath string) error { }); err != nil { return fmt.Errorf("register stream key: %w", err) } + // Create a livestream record so the stream shows up in feeds; normally the + // app does this via place.stream.live.startLivestream when a user goes + // live. The node keeps lastSeenAt fresh on our behalf via + // SP_DEV_ACCOUNT_CREDS while segments are ingesting. + now := time.Now().UTC().Format(util.ISO8601) + livestream := streamplace.Livestream{ + LexiconTypeID: "place.stream.livestream", + CreatedAt: now, + LastSeenAt: &now, + Title: "e2e test stream", + } + if _, err := comatproto.RepoCreateRecord(ctx, xrpcc, &comatproto.RepoCreateRecord_Input{ + Collection: "place.stream.livestream", + Repo: out.Did, + Record: &lexutil.LexiconTypeDecoder{Val: &livestream}, + }); err != nil { + return fmt.Errorf("create livestream record: %w", err) + } + // Give the node a moment to index the key before we start streaming. time.Sleep(1 * time.Second) -- 2.51.2