# v0.87.6 - Deep Fuzzing, Shrinking, and Release Gate

> **Status:** Planned
> **Scope:** 6-8 person-weeks
> **User promise:** *"Known differential defect classes cannot return unnoticed."*
> **Blocked by:** [v0.87.5](v0.87.5.md)
> **Program:** [Composition-aware differential correctness](../plans/PLAN_DVM_COMPOSITION_CORRECTNESS.md)

## Theme

Turn the correctness system into a durable pull-request, nightly, weekly, and
release gate. Deep jobs increase query depth, source width, aggregate families,
simultaneous changes, execution strategies, and recovery pressure without
making pull-request feedback unbounded.

Every new failure is preserved, minimized, and promoted into the permanent
corpus. Curated negative controls prove that the gate still detects known
defect classes.

## Items

### COR-17: Automatic shrinking and corpus retention

Minimize failures by removing cycles, mutations, rows, query branches,
operators, columns, aliases, types, constraints, and execution settings in
that order. Keep a candidate only when it preserves the invariant, failure
class, and operator-path family.

Retain passing cases only when they add semantic coverage. Periodically remove
redundant cases with a greedy set-cover pass.

### COR-18: Tiered correctness jobs

Add bounded pull-request jobs for the oracle, permanent corpus, mandatory
composition matrix, and a light typed-generator sample. Add sharded main,
nightly, and weekly jobs with deeper trees and longer stateful traces.

Each failed job uploads the complete reproducer. Scheduled deep jobs keep rare
coverage work unless the resource policy requires cancellation.

### COR-19: Strategy, recovery, and resource pressure

Replay selected corpus cases across supported planner, apply, prepared
statement, cache, CDC, and refresh-mode variants. Add deterministic transaction
barriers, refresh failpoints, and explicit resource-boundary cases. Timing-only
sleeps do not count as concurrency control.

### COR-20: Machine-enforced release gate

A release candidate fails on any exact mismatch, unexpected refresh error,
backend crash, silent fallback, self-comparison, ignored DML failure, missing
mandatory coverage bucket, or undetected active negative control.

## Exit criteria

- [ ] `just dvm-shrink` reduces an injected #939 failure automatically.
- [ ] Every failed CI case uploads a standalone reproducer.
- [ ] The regression corpus and mandatory semantic coverage run on every pull
      request.
- [ ] Main, nightly, weekly, and release tiers use explicit budgets.
- [ ] Supported strategy and CDC variants converge to the direct query result.
- [ ] Every failpoint preserves the last committed correct result and later
      convergence.
- [ ] Every active negative control is detected by the release gate.
