Etude · Campaign Cascade
Review this PR.
30 seconds. Approve, decline, or skip. No context, no test plan.
You just got tagged on a pull request. You don't own this repo. You don't know the author. There's no test plan. The clock is running.
Pull request
Open Refactor MetricsRollup to use streaming aggregation
Description
automated migration step from RFC-094
internal/rollup/aggregator.go
func (a *Aggregator) Flush(ctx context.Context) error
batch := a.buf.Drain()
- if err := a.sink.Write(ctx, batch); err != nil
- return fmt.Errorf("flush: %w", err)
-
+ _ = a.sink.Write(ctx, batch)
a.lastFlush = time.Now()
return nil
func (a *Aggregator) shouldFlush() bool
- return a.buf.Size() >= a.cfg.BatchSize
+ return a.buf.Size() >= 4096
time remaining 30 s
The trap
There was no good answer.
The anti-pattern: a human in the loop without context-in-hand has three exits, all bad. The fix is not "review more carefully" — it's to remove the human from where they cannot add value.