From e75c97b52bfb271744fa74c99a53ee50f8c30993 Mon Sep 17 00:00:00 2001 From: Pierre-Olivier Mercier Date: Sat, 16 May 2026 13:06:47 +0800 Subject: [PATCH] checker: remove CollectedAt from DANEData The observation timestamp is already managed by the core; there is no need for the checker to record it separately. --- checker/collect.go | 6 ++---- checker/report.go | 4 +--- checker/types.go | 5 +---- 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/checker/collect.go b/checker/collect.go index e444d65..01b50f4 100644 --- a/checker/collect.go +++ b/checker/collect.go @@ -8,7 +8,6 @@ import ( "sort" "strconv" "strings" - "time" sdk "git.happydns.org/checker-sdk-go/checker" tlscontract "git.happydns.org/checker-tls/contract" @@ -192,9 +191,8 @@ func (p *daneProvider) Collect(ctx context.Context, opts sdk.CheckerOptions) (an } data := &DANEData{ - Targets: targets, - Invalid: invalid, - CollectedAt: time.Now().UTC(), + Targets: targets, + Invalid: invalid, } if v, ok := opts[OptionDNSSECValidated]; ok { if b, ok := v.(bool); ok { diff --git a/checker/report.go b/checker/report.go index 675388e..b0e035d 100644 --- a/checker/report.go +++ b/checker/report.go @@ -47,7 +47,6 @@ func (p *daneProvider) GetHTMLReport(ctx sdk.ReportContext) (string, error) { } view := reportView{ - CollectedAt: data.CollectedAt.Format("2006-01-02 15:04 MST"), TargetCount: len(data.Targets), Diagnoses: diagnose(data, probes), Rows: rows, @@ -65,7 +64,6 @@ func (p *daneProvider) GetHTMLReport(ctx sdk.ReportContext) (string, error) { // the per-row status label/class and leaf string keeps the template free of // branching beyond simple range/if. type reportView struct { - CollectedAt string TargetCount int Diagnoses []diagnosis Rows []reportRow @@ -246,7 +244,7 @@ var reportTemplate = template.Must(template.New("dane").Parse(`

DANE / TLSA

-

Collected {{.CollectedAt}} ยท {{.TargetCount}} endpoint(s).

+

{{.TargetCount}} endpoint(s).

{{with .Diagnoses}}

Action required

{{range .}}
diff --git a/checker/types.go b/checker/types.go index 2190b2b..65e6021 100644 --- a/checker/types.go +++ b/checker/types.go @@ -18,8 +18,6 @@ // SHA-512) are matched against the chain slot implied by the usage. package checker -import "time" - // ObservationKeyDANE is the observation key this checker writes. const ObservationKeyDANE = "dane_checks" @@ -89,8 +87,7 @@ type DANEData struct { // records set the AD bit. Only populated by the standalone interactive // flow (lookupTLSA); nil in managed mode where records come from the // user's zone config and DNSSEC posture is checked elsewhere. - DNSSECValidated *bool `json:"dnssec_validated,omitempty"` - CollectedAt time.Time `json:"collected_at"` + DNSSECValidated *bool `json:"dnssec_validated,omitempty"` } // InvalidRecord describes a TLSA record dropped during Collect.