Durable staging handoff, transactional outbox, at-least-once worker with lease fencing, idempotent versioned pipeline, three variants, operator tooling, contract tests and evidence. Includes the review fixes: reprocess source selection and failure settlement, replay guards, stale-job retirement, PNG structural/raster validation, migration rollback safety and audit events.
1.1 KiB
Track 2 — versioned pipeline and duplicate/stale delivery
Hypothesis: with the effect key (attachment_id, pipeline_version, variant),
deterministic object keys, a serving version that changes only when all v2
variants are committed, and stale-version acknowledgements, an at-least-once
pipeline loses no accepted work and never overwrites a newer result with an
older duplicate.
Method: N=3 repetitions. Each repetition creates fresh users/chat and runs:
- duplicate pipeline publication while the worker is stopped, followed by recovery;
- v1 ready -> explicit reprocess to v2 -> old v1 message delivered after v2 ready.
Invariants checked: unique variant rows per effect key; ready remains ready; serving pipeline version never regresses; original bytes/checksum unchanged; stale job state is not rewritten.
Limitations: this harness covers duplicate and stale/reorder delivery. Crash windows (before/after side effect, before/after ack, outbox gap) and lease takeover are covered by student-tests/lab5_faults.py; both are single-node Compose evidence, not a production availability claim. Delivery is at-least-once; exactly-once is not claimed.