|
| 1 | +# Changelog |
| 2 | + |
| 3 | +All notable changes to this project will be documented in this file. |
| 4 | + |
| 5 | +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), |
| 6 | +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). |
| 7 | + |
| 8 | +## [1.0.0] - 2026-04-06 |
| 9 | + |
| 10 | +### Highlights |
| 11 | + |
| 12 | +FiberSSE reaches stable release. Production-tested at [PersonaCart](https://personacart.com) across 7 real-time publishers, 300+ concurrent connections, multi-tenant SaaS with full tenant isolation. |
| 13 | + |
| 14 | +- **Go Report Card: A+** (all 7 checks pass, zero issues) |
| 15 | +- **Test Coverage: 88.6%** (77 tests + 42 benchmarks) |
| 16 | +- **CI/CD: GitHub Actions** (Go 1.24 + 1.25 matrix, race detector, staticcheck) |
| 17 | +- **Listed on [awesome-go](https://github.com/avelino/awesome-go)** |
| 18 | +- **React SDK: [fibersse-react](https://www.npmjs.com/package/fibersse-react)** on npm |
| 19 | + |
| 20 | +### Added |
| 21 | +- 3 runnable examples: `basic/`, `chat/`, `polling-replacement/` |
| 22 | +- 12 godoc `Example*` functions for pkg.go.dev |
| 23 | +- `CONTRIBUTING.md` with development setup guide |
| 24 | +- `CHANGELOG.md` (this file) |
| 25 | +- `CLAUDE.md` — AI agent integration instructions |
| 26 | +- CI pipeline with codecov integration |
| 27 | +- 18-row feature comparison table vs Fiber's SSE recipe in README |
| 28 | + |
| 29 | +### Changed |
| 30 | +- Refactored `Handler()` (cyclomatic complexity 23 → 5 sub-functions) |
| 31 | +- Refactored `routeEvent()` (complexity 22 → 3 sub-functions) |
| 32 | +- Refactored `FanOut()` (complexity 19 → 2 sub-functions) |
| 33 | +- All functions now pass `gocyclo -over 15` check |
| 34 | + |
| 35 | +### Fixed |
| 36 | +- Zero `gofmt -s` issues (hub.go, metrics.go reformatted) |
| 37 | +- Zero `golint` warnings (3 missing godoc comments added) |
| 38 | +- Zero `misspell` findings |
| 39 | +- Zero `ineffassign` findings |
| 40 | + |
| 41 | +## [0.5.0] - 2026-04-03 |
| 42 | + |
| 43 | +### Added |
| 44 | +- 11 integration tests with real Fiber HTTP server + SSE client |
| 45 | +- 42 micro-benchmarks covering all hot paths |
| 46 | +- Blog post: "How We Eliminated 90% of API Calls" |
| 47 | + |
| 48 | +### Benchmark Results (Apple M4 Max) |
| 49 | +- Publish to 1 connection: **477ns** |
| 50 | +- Publish to 1,000 connections: **82μs** |
| 51 | +- Topic match (exact): **8ns, 0 allocs** |
| 52 | +- Connection send: **14ns, 0 allocs** |
| 53 | +- Backpressure drop: **2ns, 0 allocs** |
| 54 | +- Event coalescing (same key): **21ns, 0 allocs** |
| 55 | + |
| 56 | +## [0.4.0] - 2026-04-03 |
| 57 | + |
| 58 | +### Added |
| 59 | +- `InvalidateForTenantWithHint()` — tenant-scoped invalidation with data hints |
| 60 | +- `BatchDomainEvents()` — publish multiple resource changes as single SSE frame |
| 61 | +- `Progress()` now accepts optional hint map |
| 62 | +- `OnPause` / `OnResume` lifecycle callbacks on `HubConfig` |
| 63 | +- Per-event-type breakdown in `Stats()` and `Metrics()` |
| 64 | +- `fibersse_events_by_type_total{type="..."}` Prometheus metric |
| 65 | +- TanStack Query + SWR integration section in README |
| 66 | + |
| 67 | +## [0.3.0] - 2026-04-03 |
| 68 | + |
| 69 | +### Added — "Kill Polling" Toolkit |
| 70 | +- `Invalidate()`, `InvalidateForTenant()`, `InvalidateWithHint()` — cache invalidation signals |
| 71 | +- `DomainEvent()` — one-line structured events from any handler/worker |
| 72 | +- `Progress()` — coalesced progress tracking (5%→8% sends only 8%) |
| 73 | +- `Complete()` — instant completion signals |
| 74 | +- `Signal()`, `SignalForTenant()`, `SignalThrottled()` — generic refresh signals |
| 75 | +- `CLAUDE.md` — instructions for AI coding agents |
| 76 | + |
| 77 | +## [0.2.0] - 2026-04-03 |
| 78 | + |
| 79 | +### Fixed — Critical Production Issues |
| 80 | +- **Memory leak**: `MemoryTicketStore` — unconsumed tickets never evicted. Added background cleanup goroutine (30s sweep) |
| 81 | +- **Memory leak**: `AdaptiveThrottler.lastFlush` — stale entries for disconnected connections. Added periodic cleanup (5 min) |
| 82 | +- **Race condition**: Shutdown watcher — `trySend()` on already-closed connection. Added `IsClosed()` check |
| 83 | +- **Lock contention**: `flushAll` — held `RLock` for entire iteration. Changed to snapshot-and-release pattern |
| 84 | +- **Replay bug**: Wildcard topic matching ignored in `Last-Event-ID` replay. Added wildcard support |
| 85 | +- Removed unused `atomicMax` function |
| 86 | +- `formatFloat` now handles NaN/Inf values |
| 87 | + |
| 88 | +## [0.1.0] - 2026-04-03 |
| 89 | + |
| 90 | +### Added — Initial Release |
| 91 | +- Hub pattern with single-goroutine event loop |
| 92 | +- 3 priority lanes: Instant (P0), Batched (P1), Coalesced (P2) |
| 93 | +- Event coalescing: last-writer-wins per key |
| 94 | +- NATS-style topic wildcards (`*` and `>` patterns) |
| 95 | +- Adaptive throttling: AIMD-based per-connection flush interval |
| 96 | +- Connection groups: publish by metadata |
| 97 | +- Client visibility hints: pause P1/P2 for hidden tabs |
| 98 | +- Built-in auth: JWT validation + one-time ticket helpers |
| 99 | +- Auto fan-out: bridge Redis/NATS pub/sub to SSE |
| 100 | +- Prometheus + JSON metrics endpoints |
| 101 | +- Last-Event-ID replay with pluggable Replayer interface |
| 102 | +- Event TTL: drop stale events automatically |
| 103 | +- Graceful drain: Kubernetes-style shutdown with Retry-After |
| 104 | +- Backpressure: bounded buffers, drop slow clients |
| 105 | +- 29 tests, MIT license |
| 106 | + |
| 107 | +[1.0.0]: https://github.com/vinod-morya/fibersse/compare/v0.5.0...v1.0.0 |
| 108 | +[0.5.0]: https://github.com/vinod-morya/fibersse/compare/v0.4.0...v0.5.0 |
| 109 | +[0.4.0]: https://github.com/vinod-morya/fibersse/compare/v0.3.0...v0.4.0 |
| 110 | +[0.3.0]: https://github.com/vinod-morya/fibersse/compare/v0.2.0...v0.3.0 |
| 111 | +[0.2.0]: https://github.com/vinod-morya/fibersse/compare/v0.1.0...v0.2.0 |
| 112 | +[0.1.0]: https://github.com/vinod-morya/fibersse/releases/tag/v0.1.0 |
0 commit comments