Complete M7.5 durable batch outcomes and commit resolution
ADR-0063: manifest v2 (360 bytes) binds a per-tick validation trace object and a canonical decision block by SHA-256. Publication replays the trace from the committed predecessor's verified payload and requires every report and the candidate bytes, derives deaths deterministically, uploads payload and trace with verified read-back, then sends manifest and decisions to one fenced statement. RegionBatch seals at a terminal transition or 64 ticks and refuses ticks until durable confirmation. Schema v5 records the checkpoint, its decisions and outbox rows atomically; a unique index keeps one terminal outcome per actor (EVL08), triggers make commits/decisions immutable (EVL09), an exact retry of a committed ID returns the original receipt, changed bytes conflict, and read-only resolve_region_commit answers committed/absent/ conflict. Outbox pending/acknowledge give idempotent at-least-once delivery. Recovery reconciles durable deaths with restored lifecycle (and archive deaths for the lineage profile). Validated: Windows CTest 58/58; Linux GCC Debug/Release, clang-tidy and ASan/UBSan CTest 58/58 each; PostgreSQL suites Release, analysis, ASan (lost response, committed-after-timeout, terminated orphan retry, changed bytes, repeated/partial/reordered decisions, gap, outbox redelivery, history quarantine); five mutations each caught. No Docker/Gitea CI, process kill, broker or deployment. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -2213,3 +2213,55 @@ Only clean-to-v1 and exact-v1 restart are supported migration paths at this gate
|
||||
- checkpoint publication 3.5-5.0 ms for 23-37 KiB payloads.
|
||||
- Not executed: Docker/Gitea CI, remote storage, process kill, reproduction within
|
||||
a batch (the fixture has none), durable history rows (M7.5) and TSan.
|
||||
|
||||
## M7.5 durable batch outcomes - 2026-09-28
|
||||
|
||||
- Windows MSVC Release CTest passed 58/58, including the new `region-batch-contracts`:
|
||||
- recorder sealing at a death or at 64 ticks, early flush, confirm matching, and
|
||||
a refused tick recording nothing;
|
||||
- trace round trip, size (19,552 bytes at 64 ticks), range, contiguity and
|
||||
header binding;
|
||||
- decision order, uniqueness, range, and refusal of unknown values.
|
||||
The manifest v2 golden layout, v1 decoding and batch-evidence structural rules
|
||||
were also covered.
|
||||
- WSL Linux: the `checks` build set (GCC14 Debug and Release, clang19 analysis,
|
||||
clang19 ASan/UBSan) passed CTest 58/58 each, and the repository format check
|
||||
passed.
|
||||
- The first PostgreSQL clang-tidy build flagged a returned const-reference
|
||||
parameter and two unchecked optional accesses; all three were fixed. Final
|
||||
PostgreSQL suites: Release 2 runs, analysis 2, ASan/UBSan 4, all passing.
|
||||
- Real-database coverage:
|
||||
- Durable death at tick 20, with decisions and outbox rows in the same commit.
|
||||
- Outbox: redelivered, acknowledged true then false, then empty; invalid limit
|
||||
and unknown rows refused.
|
||||
- A lost response retried with identical bytes returns the same receipt and
|
||||
records no second death; resolution says committed.
|
||||
- A changed manifest or changed decisions conflict (EVL07/22023). Other regions
|
||||
and unknown IDs resolve as conflict and absent.
|
||||
- A repeated death is EVL08. A forged same-size block, a partial block and a
|
||||
reordered block are 22023. A gap is EVL03. None of these moved the head or
|
||||
decisions.
|
||||
- A 300 ms client timeout while queued on the lease row became unknown; once the
|
||||
lock cleared the server committed, resolution returned committed and the retry
|
||||
was idempotent.
|
||||
- A terminated orphan request resolved as absent, and the same bytes were
|
||||
retried and committed.
|
||||
- A missing predecessor payload is `predecessor`. State advanced outside the
|
||||
batch fails replay. Batches from the wrong predecessor and unsealed batches are
|
||||
refused before upload.
|
||||
- Recovery reconciles decisions. An owner-inserted death the state does not
|
||||
show quarantines with `history`, and cannot be deleted (EVL09).
|
||||
- Commit and decision UPDATE and DELETE are EVL09 even for the owner; the
|
||||
defense-in-depth test disables and restores the trigger explicitly.
|
||||
- Lineage profile: a death is recorded with the archived organism id and
|
||||
reconciled against the archive.
|
||||
- Migrations: clean→v5, v1→v5 and v3→v5 with an existing v1-manifest commit;
|
||||
tampered checksums for v2 through v5 and an unknown v6 are refused.
|
||||
- Mutations (scratch SQL copies; host source restored and rerun green), each
|
||||
caught: removing idempotent retry, outcome finality, the decision-digest check,
|
||||
decision recording, or recovery reconciliation.
|
||||
- Local measurements, including predecessor replay: Release 6.6-8.1 ms per batch;
|
||||
analysis about 20-23 ms; ASan about 19-21 ms. Manifest publish p50 about
|
||||
0.75-0.86 ms.
|
||||
- Not executed: Docker/Gitea CI, remote object store, process kill, a broker
|
||||
consumer, an injected failure between commit insert and statement end, and TSan.
|
||||
|
||||
Reference in New Issue
Block a user