#172: clear the empty-Site suppression row only for sidecar-down

Only sidecar-down ever writes a Site=='' row, so the loop's empty-Site
clear for the other three conditions was a no-op delete on every pass.
Move it out of the per-condition loop, scoped to ConditionSidecarDown.
This commit is contained in:
2026-08-23 02:48:14 +07:00
parent b58945894d
commit c655586202
+7 -6
View File
@@ -647,12 +647,13 @@ func (p *Poller) ownerNotices(ctx context.Context, row store.LanePass) {
log.Printf("latest poll %s: clear owner notice: %v", row.Site, err) log.Printf("latest poll %s: clear owner notice: %v", row.Site, err)
} }
} }
// The site-wide conditions suppress under the empty Site; clear that }
// row too, so a lifted sidecar-down fires again when it returns. // sidecar-down suppresses under the empty Site — one row across all
if !hasFault(faults, cond, "") { // browser Lanes (AC4) — so clear that row when it is absent from this
if err := p.Store.ClearNotice(cond, ""); err != nil { // pass's fault list, and a lifted sidecar fires again when it returns.
log.Printf("latest poll %s: clear owner notice: %v", row.Site, err) if !hasFault(faults, ConditionSidecarDown, "") {
} if err := p.Store.ClearNotice(ConditionSidecarDown, ""); err != nil {
log.Printf("latest poll %s: clear owner notice: %v", row.Site, err)
} }
} }
} }