diff --git a/modules/mesh-delivery-forge-bridge/cmd/mesh-delivery-forge-bridge/acts.go b/modules/mesh-delivery-forge-bridge/cmd/mesh-delivery-forge-bridge/acts.go index 45b98eb0..446d3aa1 100644 --- a/modules/mesh-delivery-forge-bridge/cmd/mesh-delivery-forge-bridge/acts.go +++ b/modules/mesh-delivery-forge-bridge/cmd/mesh-delivery-forge-bridge/acts.go @@ -28,6 +28,11 @@ func (o *owing) actOf(ctx context.Context, of string, p Performed, id string) ([ if err != nil { return nil, err } + // A value of the form before H-A-182 names no pull request: every act the bridge decodes names its repository (a + // status may name no number, said on `.0` as the gate says it), so one with none is the old form, never read again. + if p.Repository == "" { + return nil, fmt.Errorf("performed names no pull request for the act %s of %s: kept in its old form, it expires with the state's TTL", id, of) + } if o.acts == nil { return nil, fmt.Errorf("the bridge reads no stream owed, so the act %s of %s cannot be performed again", id, of) } diff --git a/modules/mesh-delivery-forge-bridge/cmd/mesh-delivery-forge-bridge/gate_test.go b/modules/mesh-delivery-forge-bridge/cmd/mesh-delivery-forge-bridge/gate_test.go index 3663ed36..517a56d2 100644 --- a/modules/mesh-delivery-forge-bridge/cmd/mesh-delivery-forge-bridge/gate_test.go +++ b/modules/mesh-delivery-forge-bridge/cmd/mesh-delivery-forge-bridge/gate_test.go @@ -183,9 +183,14 @@ func TestWhatIsOwedIsPerformedSaidAndKept(t *testing.T) { {"again, an act nobody holds", groups.OwedAsk{Kind: groups.OwedAgain, Of: seat.Seat, ID: "x"}, 2, 3, "", "holds no owed act"}, {"the backlog", groups.OwedAsk{Kind: groups.OwedBacklog}, 2, 3, "", "backlog"}, {"again, the stream no longer holding it", groups.OwedAsk{Kind: groups.OwedAgain, Of: seat.Seat, ID: status}, 2, 3, "", "no longer holds"}, + {"again, a value of the old form", groups.OwedAsk{Kind: groups.OwedAgain, Of: seat.Seat, ID: "old"}, 2, 3, "", "names no pull request"}, } { - if c.name == "again, the stream no longer holding it" { + switch c.name { + case "again, the stream no longer holding it": acts.held = nil + case "again, a value of the old form": + // Kept before H-A-182: the outcome and the whole act, no pull request; the stream is not read for it. + kept[performedKey(seat.Seat, "old")] = []byte(`{"ended":{"v":1,"of":"mesh-delivery","id":"old","outcome":"performed","at":"2026-11-09T21:00:00Z"},"owed":{"id":"old"}}`) } a := o.answer(context.Background(), c.ask, backlog) if !a.Done() || a.Outcome != c.outcome || !strings.Contains(a.Answer, c.answers) || len(f.calls) != c.calls || len(pub.data) != c.said {