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
This commit is contained in:
2026-11-11 14:45:50 +01:00
parent 435d1206e4
commit 46c125c07c
2 changed files with 19 additions and 3 deletions
@@ -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)
}
}
}
@@ -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"`