i2goSignals

goSignals v0.12.0-alpha.11

Released: TBD Compare: v0.12.0-alpha.10…v0.12.0-alpha.11

Why this release

alpha.11 lands the community half of the event-retention and reset-accounting design (enterprise Q91 / ADR 0055). Two changes make the data plane able to bound how long delivered events are retained, and make stream reset bill as real egress the way the metering model always intended. Both are additive: the purge engine ships dormant (keep-forever default), and streams that set no retention window and never reset are byte-for-byte unchanged.

The headline is a per-stream retention window + ack-anchored refcount purge (#226, PR #227). A new RetentionWindowDays on the stream state record (kept off the SSF wire) lets a stream cap how long an event is retained after all subscribers have acked it; a refcount-based purge engine reclaims events once they are both past the window and fully acked, and a daily per-stream occupancy sampler records the point-in-time retained-event count that the enterprise metering pipeline averages into a Mean Retained Events figure. The engine is wired but default-off — with no window configured, retention is unbounded exactly as before.

The companion closes a metering bypass on stream reset (#225, PR #228). ResetEventStream re-drives already-delivered events through the fan-out, but the fan-out metering hook was bypassed at the reset re-queue path, so that re-driven egress went uncounted. The fix emits the re-queued events as chargeable events_out tagged source: reset, so a reset is billed as fresh egress — while protocol replay (a failed-ack re-poll of an already-metered event) remains free by construction. The family continues to ship byte-matched at the tag (v0.12.0-alpha.11).

Per-stream retention window + purge

Reset egress metering fix

Verification

go test -race ./... is green module-wide. New coverage includes the retention engine (pkg/services/retention_test.go), the memory-DAO retention path (pkg/dao/memory/event_dao_retention_test.go), and the stream-state retention field (pkg/ssfModels/model_stream_state_retention_test.go). Per-PR gates (gofmt -l, go vet, -race) pass with no new warnings.