The writers of findings give the seat's time.Time (artifact-store-tools, distribution, gitea, mesh-config; B5d; ADR 0634; issue 1966)

Claude-Session: https://claude.ai/code/session_01NcbgfFSnn24M3GcqttoU7i
This commit is contained in:
2026-11-05 15:13:16 +01:00
parent 916bdde6a4
commit 4104143d16
6 changed files with 8 additions and 9 deletions
@@ -77,7 +77,7 @@ func finding(kind, subject, words string, raised bool) {
f := meshconditions.FindingsByKeyValue{V: meshconditionsclient.FindingVersion, Key: key, Kind: kind, Ref: key[strings.LastIndex(key, ".")+1:],
Subject: meshconditions.Subject{Scope: meshconditionsclient.ScopeSeat, ID: "distribution"}, Severity: meshconditionsclient.Warning,
Summary: words, Headline: words, Explanation: words, Resolved: "cleared once it no longer holds",
Source: kind, Observer: "distribution", At: time.Now().UTC().Format(time.RFC3339Nano)}
Source: kind, Observer: "distribution", At: time.Now().UTC()}
if _, err := stdio.State(meshconditions.StateFindings).Put(key, f); err != nil {
logf("the finding %s could not be written: %v", key, err)
}
@@ -189,7 +189,7 @@ func findingsKV(kv jetstream.KeyValue, logf func(string, ...any)) func(kind, sub
f := meshconditions.FindingsByKeyValue{V: meshconditionsclient.FindingVersion, Key: key, Kind: kind, Ref: key[strings.LastIndex(key, ".")+1:],
Subject: meshconditions.Subject{Scope: meshconditionsclient.ScopeSeat, ID: holder.Self}, Severity: meshconditionsclient.Warning,
Summary: words, Headline: words, Explanation: words + "; registry_old_name or registry_direct_writes drops a retired node by hand",
Resolved: "cleared when the window closes", Source: kind, Observer: holder.Self, At: time.Now().UTC().Format(time.RFC3339Nano)}
Resolved: "cleared when the window closes", Source: kind, Observer: holder.Self, At: time.Now().UTC()}
b, _ := json.Marshal(f)
if _, err := kv.Put(ctx, key, b); err != nil {
logf("the finding %s could not be written: %v", key, err)