# v0.42.0 — Documentation Truthfulness, Test Quality & Fuzz Automation

> **Full technical details:** [v0.42.0.md-full.md](v0.42.0.md-full.md)

**Status: Planned** | **Scope: Large**

> Implement the missing `repair_stream_table` function, rewrite the catalog
> generator, fix all stale docs, replace 116 fixed sleeps with state-polling
> helpers, add differential aggregate property tests, and automate fuzz targets
> in CI.

---

## What is this?

Two complementary assessment dimensions — documentation drift and test quality
— are addressed together. Both share the same root cause: code moves faster
than the surrounding infrastructure (docs, tests, CI) that keeps it honest.
Fixing one without the other leaves the project looking more trustworthy than
it is.

---

## Implement `repair_stream_table` and fix catalog generation

Backup/restore docs tell users to call `pgtrickle.repair_stream_table(name)`
after restore — but the function does not exist. v0.42.0 implements it and
gates the restore runbook with an E2E test. Alongside it, the regex-based
catalog generator is replaced with Rust-aware extraction, both catalogs are
regenerated, and a CI check prevents future drift.

---

## SQL reference freshness and stale-term audit

`create_stream_table` docs omit recent parameters, deprecated GUCs appear as
active tuning knobs, and architecture docs reference old single-file modules.
v0.42.0 fixes all of these, adds `just docs-lint`, and gates generated reference
freshness in CI.

---

## Replace fixed sleeps with state-polling helpers

116 fixed sleeps across the E2E suite make tests slow and flaky. v0.42.0
introduces `wait_for_refresh_history`, `wait_for_cdc_mode`,
`wait_for_scheduler_tick`, and `wait_for_job_status` helpers and replaces the
highest-impact sleeps across WAL CDC, scheduler, cascade, and bgworker tests.

---

## Aggregate correctness property tests and fuzz CI

`SUM(CASE ...)` has only a FULL-mode coverage example; the GROUP_RESCAN
fallback can regress silently. v0.42.0 adds differential E2E tests and upgrades
CASE detection to the parsed AST level. FULL JOIN aggregate property tests
compare DIFF vs FULL across multi-cycle sequences. Fuzz targets finally run in
CI with a scheduled smoke job and corpus replay on PRs.

---

## Also in v0.42.0

- WAL decoder SQL parameterization for adversarial payload safety
- Stale EC-06 comments replaced with current keyless design notes
- Keyless multiset property test

---

## Scope

v0.42.0 is a large release, merging what were formerly two separate versions.
The work is coherent: both docs and test quality are trust infrastructure that
should land together before moving to performance and security hardening.

> **Source:** [plans/PLAN_OVERALL_ASSESSMENT_9.md](../plans/PLAN_OVERALL_ASSESSMENT_9.md)
> findings FEAT-01, DOC-01–08, CQ-03, CQ-04, TEST-01–02, TEST-05–06, TEST-09,
> CI-05–07, OPS-05, COR-04, COR-05, COR-07, COR-08.

---

*Previous: [v0.41.0 — DVM Correctness: Structural Cache Keys, Placeholder Safety & WAL Transition Guards](v0.41.0.md)*
*Next: [v0.43.0 — Performance Tunability, Diagnostics & Refresh Intelligence](v0.43.0.md)*
