# Changelog

All notable changes to `mgf-livepush` are documented here.

The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/);
the project follows [SemVer](https://semver.org/spec/v2.0.0.html). Per
the 0.x window ([SemVer 0.x](https://semver.org/#spec-item-4) and rule
**AP-03** from `mgf-standard/docs/standards/API_DESIGN.md`), MINOR
releases MAY break the public API. Pin tightly:

```toml
mgf-livepush = ">=0.X.0,<0.Y"   # one minor at a time
```

The release-engineering discipline that produces this changelog is in
[`mgf-standard/docs/standards/RELEASING.md`](https://codeberg.org/magogi-admin/mgf_common/src/branch/main/docs/standards/RELEASING.md).

---

## [0.1.8] - 2026-06-26

### Changed
- Adopt **mgf-common 0.49** — widen the pin to `<0.50` (the framework-neutral
  Svix webhook HMAC primitive `mgf.common.webhooks` + the AP-14 identity /
  lifecycle / doctor public seams; additive). Republished so consumers that
  pin `mgf-common>=0.49` (mgf-fed, mgf-fastapi) can resolve `mgf-livepush`.

## [0.1.7] - 2026-06-16

### Changed
- Widened the `mgf-common` pin to `<0.48` — mgf-common 0.47 is the pure-library release (the end-user CLI moved to `mgf-fed[cli]`); the importable API is unchanged.
- Regenerated `.woodpecker` so the supervisor lane calls `mtest` (the moved `mgf-common test` frontend is gone).

## [Unreleased]

Nothing yet.

---


## [0.1.6] — 2026-06-08 — depth-audit close-out (public API + LG)

### Added
- `mgf.livepush.__version__` (AP-13); CI tag-coherence asserts it.
- `PUBLIC_API.md` (tiers + master-HEAD banner) + `PUBLIC_API.json` + generator +
  CI pins (AP-10/11, DOC-01/08/09); resolves the README/STARTHERE links (OP-04).
- Tag-driven Codeberg publish pipeline + sbom step (earlier batches).

### Changed
- Both slot-cap WARNING records now carry a stable `event` field
  (`mgf.livepush.slot_acquire_failed` / `slot_release_failed`), catalogued in
  docs/reference/EVENTS.md (LG-15/16).
- Tests restructured into canonical tests/{unit,smoke,integration,e2e}/.
- Declined (CFM-04 §3): AP-14 (consumer-fixture import-linter).

## [0.1.5] — 2026-06-06 — federation cohort: mgf-common 0.46 walk

Walk the `mgf-common` pin ceiling `<0.46 → <0.47` to accept the
library-API-neutral `mgf-common 0.46.0` (CLI-only release: new
`federation`/`design` commands + a `doctor --standards` gate; no library
surface change).

---

## [0.1.4] — 2026-06-04 — federation cohort: mgf-common 0.45 walk

PATCH: pin widened to `mgf-common>=0.41,<0.46` to accept mgf-common 0.45
(Codeberg cutover — PKG-01..12). `mgf-*` resolve from the `codeberg-mgf`
index (PKG-06). No API change.

---

## [0.1.3] — 2026-06-01 — federation cohort: adopt mgf-common 0.44

PATCH: pin widened to `mgf-common>=0.41,<0.45` to accept the mgf-common 0.44 line
(which extracted the standards corpus + federation contract to the
`mgf-standard` sibling; pulled in transitively). `FEDERATION.md` stub +
`.claude/commands/sync.md` repointed at `mgf-standard`. No API change.

---

## [0.1.2] — 2026-05-28 — federation cohort publish (mgf-common 0.42.x)

Federation cohort wave: mgf-livepush accepts **mgf-common 0.42.x** (pin widened to
`>=0.41,<0.43`) and ships to PyPI, carrying the previously-unpublished 0.1.1 work.

---

## [0.1.1] — 2026-05-28 — test hardening + reliability tests

### Added

- Adopt `mgf-test-supervisor` + TS-04 `filterwarnings=["error"]` + a coverage
  gate + the full federation marker taxonomy + a tier-0 smoke set.
- Reliability tests: SlotCap no-oversell under concurrency (atomic-INCR
  guarantee pinned), fail-open contract, SSE slot-release on cancel.
- `USERS.md` (DOC-16).

### Notes

- Test + dev-config only; no public API or runtime-behaviour change.

---

## [0.1.0] — 2026-05-28

> **Maiden voyage** — extracted from PlasmaMapper's Phase-4 push
> surface after the pre-release core re-design hardened it
> (heartbeat cadence, slot lifecycle, disconnect cleanup, and the
> dev/prod-proxy buffering recipe). PlasmaMapper is consumer #1.
> A `mgf-common` federation sibling under the `mgf.*` namespace.

### Added

- **`mgf.livepush.SSEStreamService`** — the SSE streaming
  primitive. `open_stream(...)` acquires a connection slot,
  subscribes to a broker channel, and returns an `SSEStream`
  (`.headers` + `.body`, an async byte iterator) with proxy-safe
  headers already set. Framework-agnostic core — wrap `.body` in
  whatever streaming response your framework provides.
- **`SSEStream` / `sse_headers`** — the `(headers, body)` result
  plus the proxy-safe response headers (`Cache-Control: no-cache,
  no-transform`, `X-Accel-Buffering: no`) that keep live push
  flowing through buffering proxies.
- **`Broker` / `Subscription`** — the pluggable pub/sub **broker
  seam** (Protocols). A consumer can swap the backing transport
  (Redis pub/sub for Redis Streams / NATS) without touching the
  SSE machinery.
- **`RedisBroker`** — the Redis pub/sub broker adapter, behind the
  opt-in `[redis]` extra. Consumers on another broker don't pay
  the `redis` dependency.
- **`MockBroker`** — an in-process broker adapter for tests; no
  Redis required.
- **`SlotCap`** — per-key connection-**slot cap** via Redis
  INCR/DECR with a TTL. Fail-open by design; returns
  `429 (Retry-After: 5)` automatically when a per-key cap is full.
- **`CapExceededError` / `LivePushError`** — typed errors
  (subclasses of `mgf-common`'s `AppError`).
- **`mgf.livepush.fastapi.sse_streaming_response`** — a one-line
  FastAPI `StreamingResponse` wrapper, behind the opt-in
  `[fastapi]` extra. The core stays framework-agnostic; FastAPI
  lives only inside this adapter (enforced by import-linter).

### Engineering

- **`mgf-common>=0.41,<0.42`** runtime dependency. AP-03 0.x
  window pin discipline applies — bump in lock-step with
  mgf-common's next minor.
- PEP 420 namespace package (no top-level `mgf/__init__.py`); the
  wheel ships `src/mgf/` as-is so `mgf.livepush` coexists as a
  SIBLING (not a subpackage) of `mgf.common` and the other
  federation siblings.
- import-linter contract keeps the core
  (`_sse` / `_broker` / `_slotcap` / `_errors`) free of any
  FastAPI import — framework code is confined to the
  `mgf.livepush.fastapi` adapter.
