commit 645f0175dfb59df39480cd171647875a91faec3b Author: oppiliappan Date: Tue Apr 21 16:21:57 2026 +0100 knotserver: fix ingesting empty pulls Signed-off-by: oppiliappan diff --git a/flake.lock b/flake.lock index 6570b0b3e..ea4a23613 100644 Binary files a/flake.lock and b/flake.lock differ diff --git a/knotserver/ingester.go b/knotserver/ingester.go index 41fdc27bb..daa041667 100644 --- a/knotserver/ingester.go +++ b/knotserver/ingester.go @@ -181,6 +181,10 @@ func (h *Knot) fetchLatestSubmission(ctx context.Context, did, rkey string, reco return nil, fmt.Errorf("failed to resolve PR owner handle: %w", err) } + if len(record.Rounds) == 0 { + return nil, fmt.Errorf("failed to fetch latest submission, no rounds in record") + } + roundNumber := len(record.Rounds) - 1 round := record.Rounds[roundNumber]