> **Plain-language companion:** [v0.55.0.md](v0.55.0.md)

## v0.55.0 — Final Pre-1.0 Polish

**Status: In progress.**  Derived from [ROADMAP.md](../ROADMAP.md).

> **Release Theme**
> Final pre-1.0 polish pass: GUC-configurable invalidation ring (up to 4,096),
> api/mod.rs and monitor.rs module decomposition, serde_json NOTIFY payloads,
> multi-column IN rewrite to EXISTS, DVM parse metrics, reserved-prefix docs,
> GUC rationale comments, and PR coverage gate.

---

### Scalability

| ID  | Title | Effort | Priority |
|-----|-------|--------|----------|
| M-1 | Raise invalidation ring max to 4,096 and update GUC default to 1,024 | 0.5d | HIGH |

### Code Quality / Maintainability

| ID  | Title | Effort | Priority |
|-----|-------|--------|----------|
| M-2 | api/mod.rs decomposition into create.rs, alter.rs, refresh.rs | 1d | HIGH |
| M-3 | monitor.rs decomposition into monitor/alert.rs, health.rs, tree.rs | 1d | HIGH |

### Security / Correctness

| ID  | Title | Effort | Priority |
|-----|-------|--------|----------|
| M-4 | serde_json NOTIFY payloads (replace manual string escaping) | 0.5d | HIGH |
| M-5 | Multi-column IN subquery rewrite to EXISTS | 0.5d | MEDIUM |

### Observability

| ID  | Title | Effort | Priority |
|-----|-------|--------|----------|
| M-6 | DVM parse metrics (pg_trickle_dvm_parse_ms, pg_trickle_delta_query_size_bytes) | 0.5d | MEDIUM |

### Documentation

| ID  | Title | Effort | Priority |
|-----|-------|--------|----------|
| M-7 | Document __PGS_/__PGT_ reserved column-name prefixes in SQL_REFERENCE.md | 0.25d | MEDIUM |
| M-8 | Add rationale comments to all magic-number GUC defaults in config.rs | 0.5d | MEDIUM |

### CI / Quality Gate

| ID  | Title | Effort | Priority |
|-----|-------|--------|----------|
| M-9 | Add coverage reporting to PR gate | 0.25d | MEDIUM |

---

### Recommended Implementation Order

| Phase | Items | Description |
|-------|-------|-------------|
| Phase 1 | M-1, M-8 | GUC changes — simple, low-risk |
| Phase 2 | M-4, M-7 | Security and docs — quick wins |
| Phase 3 | M-2, M-3 | Module decomposition — large refactor |
| Phase 4 | M-5, M-6 | DVM parser feature and metrics |
| Phase 5 | M-9 | CI coverage gate |

---

### Implementation Status

| ID  | Title | Status |
|-----|-------|--------|
| M-1 | Raise invalidation ring max to 4,096; update GUC default to 1,024 | ⬜ Not started |
| M-2 | api/mod.rs decomposition | ⬜ Not started |
| M-3 | monitor.rs decomposition | ⬜ Not started |
| M-4 | serde_json NOTIFY payloads | ⬜ Not started |
| M-5 | Multi-column IN subquery rewrite to EXISTS | ⬜ Not started |
| M-6 | DVM parse metrics | ⬜ Not started |
| M-7 | Reserved-prefix docs | ⬜ Not started |
| M-8 | GUC rationale comments | ⬜ Not started |
| M-9 | PR coverage gate | ⬜ Not started |

---

### Files Changed

| File | Change |
|------|--------|
| `src/shmem.rs` | Raise `INVALIDATION_RING_MAX_CAPACITY` from 1,024 to 4,096 |
| `src/config.rs` | Update ring GUC max to 4,096, default to 1,024; add rationale comments |
| `src/api/create.rs` | New — create_stream_table and creation helpers |
| `src/api/alter.rs` | New — alter/drop/resume/repair and migration helpers |
| `src/api/refresh.rs` | New — refresh_stream_table and execution helpers |
| `src/api/mod.rs` | Reduced to shared helpers and re-exports |
| `src/monitor/mod.rs` | Formerly monitor.rs — SQL-callable functions, re-exports |
| `src/monitor/alert.rs` | New — AlertEvent, emit_alert, alert_* functions |
| `src/monitor/health.rs` | New — health_check, health_summary, slot health, CDC health |
| `src/monitor/tree.rs` | New — dependency_tree, render_dependency_tree, DFS |
| `src/dvm/parser/rewrites.rs` | Multi-column IN → EXISTS rewrite pass |
| `src/shmem.rs` | DVM parse metric atomics |
| `docs/SQL_REFERENCE.md` | Reserved-prefix documentation |
| `.github/workflows/ci.yml` | Codecov coverage gate |
| `sql/pg_trickle--0.54.0--0.55.0.sql` | Upgrade migration (no schema changes) |

---

### Exit Criteria

- [ ] All items ✅ Done
- [ ] `just test-unit` passes with 0 failures
- [ ] `just lint` exits 0 with zero warnings
- [ ] CHANGELOG.md entry written
- [ ] ROADMAP.md v0.55.0 row marked ✅ Released
