From 46c125c07cf4cd4642b6f19d15f579dc14565f52 Mon Sep 17 00:00:00 2001 From: jochen Date: Wed, 11 Nov 2026 14:45:50 +0100 Subject: [PATCH] The gate keeps no mark of an own ask of a check: the dead field is gone and a row holds it (milestone 47/G, W11.8, issue 1794: its cause went with the gate's checks, issue 1318) Claude-Session: https://claude.ai/code/session_01JG73KEq4zoDfM9WtYpcQgZ (Joined from 70ded58f.) Builds: design 47 G (main file G row: issues 1785, 1794) (GATE) Claude-Session: https://claude.ai/code/session_01JG73KEq4zoDfM9WtYpcQgZ --- .../cmd/mesh-delivery-gate/adr661_test.go | 19 +++++++++++++++++++ .../cmd/mesh-delivery-gate/ready.go | 3 --- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/modules/mesh-delivery-gate/cmd/mesh-delivery-gate/adr661_test.go b/modules/mesh-delivery-gate/cmd/mesh-delivery-gate/adr661_test.go index 164d3a1f7..19e7d353e 100644 --- a/modules/mesh-delivery-gate/cmd/mesh-delivery-gate/adr661_test.go +++ b/modules/mesh-delivery-gate/cmd/mesh-delivery-gate/adr661_test.go @@ -1,6 +1,8 @@ package main import ( + "encoding/json" + "reflect" "strings" "testing" "time" @@ -134,3 +136,20 @@ func TestNoCheckGatesAMergeAtTheGate(t *testing.T) { t.Run(name, run) } } + +// Issue 1794: the gate keeps no mark of an own ask of a check, so no verdict of another check of the head can clear one while +// the gate's own is in flight: since issue 1318 the gate asks no check, only the checker's verdict at the heads is read, and a +// run holds no field that marks an ask of one. +func TestTheGateAsksNoCheckOfItsOwnSoNoMarkOfOneCanBeClearedByAnother(t *testing.T) { + typ := reflect.TypeOf(ReadyRun{}) + for i := 0; i < typ.NumField(); i++ { + if f := typ.Field(i).Name; strings.HasPrefix(f, "OwnAsk") || strings.HasPrefix(f, "OwnCheck") { + t.Errorf("ReadyRun holds %s: a mark of a check the gate asked itself, which it no longer asks", f) + } + } + for _, key := range []string{"own_asked_at", "own_ask"} { + if raw, _ := json.Marshal(ReadyRun{}); strings.Contains(string(raw), key) { + t.Errorf("a run is kept with %s", key) + } + } +} diff --git a/modules/mesh-delivery-gate/cmd/mesh-delivery-gate/ready.go b/modules/mesh-delivery-gate/cmd/mesh-delivery-gate/ready.go index 18749f9f6..3898e05de 100644 --- a/modules/mesh-delivery-gate/cmd/mesh-delivery-gate/ready.go +++ b/modules/mesh-delivery-gate/cmd/mesh-delivery-gate/ready.go @@ -81,9 +81,6 @@ type ReadyRun struct { // (merges.go). MergeCommit string `json:"merge_commit,omitempty"` SourceMoved bool `json:"source_moved,omitempty"` - // OwnAskedAt is when its own check was asked after the merge tool refused it for a pending status of its own (issue - // 1049): once for the head this run is for. - OwnAskedAt time.Time `json:"own_asked_at,omitempty"` // Urgent is set once a refusal of this head was one that is urgent at once: its severity never steps down to a // warning after (issue 1275, AC6). Urgent bool `json:"urgent,omitempty"`