Unit 11 of 15 · about 4 hours · explain

Consistency, durability and delivery contract extraction and ML data-plane provenance closure

Extension work starts by writing down what the system promises today. An unwritten contract cannot be preserved, and a data plane without provenance cannot be retrained or deleted safely.

You'll be able to

  • Extract consistency, durability and delivery contracts with each claim's boundary and assumption stated.
  • Derive provenance closure for one ML data path: which versioned inputs and transform versions each artifact depends on, and what deletion or retraining invalidates.
  • Write the contract down so a history checker could accept or reject histories against it.

Covers

Consistency, durability and delivery contract extractionML data-plane provenance closure
1

Read

In this order, only the parts listed

0 of 4 done

  1. Chapters 9 and 10 review: uncertainty, consistency and consensusDDIA 2e - Chapters 9, 10 and 14 Review

    Chapter 9 (printed pp. 345-400) on faults, clocks, leases and system models plus Chapter 10 (printed pp. 401-450) on linearizability, logical clocks and consensus; extract one contract sentence per guarantee with its assumption

    Review only: rebuild from the earlier sections on time, identity, membership and failure; replication, consistency and convergence; and consensus, replicated logs and coordination. Point back to their units by title instead of re-reading at full depth.

  2. Chapter 13: Trust, but VerifyDDIA 2e - Chapters 9, 10 and 14 Review

    Printed p. 575: system models as assumptions, what fsync and memory-corruption assumptions buy, and why unlikely violations matter at scale

    Read the pages around p. 575, not the whole chapter.

  3. HLD Handbook: feature stores and model servingHLD Handbook - CRDTs, Multi-Region and Architecture Trade-offs

    Point-in-time correctness, the model registry section and the shadow-then-canary rollout: what each promises about versions, freshness and promotion

    Use the chapter's reported numbers (throughput, latency budgets, drift thresholds) as worked-example figures, not as targets.

  4. HLD Handbook: data infrastructure freshness and metadataHLD Handbook - CRDTs, Multi-Region and Architecture Trade-offs

    Freshness (CDC, dirty flag, TTL) and the metadata schema and ACL propagation sections: what freshness promise each mechanism carries

2

Focus on

  • A contract names the guarantee, the boundary and the assumption. A bare linearizable reads label is not a contract; the path exceptions and the timing assumption beside it make it one.
  • Provenance closure means every artifact resolves to versioned inputs plus the transform version. A feature value without its event timestamp and code version is not reproducible.
  • Deletion propagates along the same edges as derivation. If training rows derive from raw events, deleting a user means re-deriving every downstream artifact or stating why not.
  • Point-in-time correctness is the ML instance: reconstruct features as they were knowable at prediction time. Keep event time and availability time with versioned snapshots, so late arrivals and corrections cannot leak into historical features.
Common mistakes · 3
  • Copying a vendor consistency label as the contract. Labels need the path exceptions (stale reads, async replicas) written beside them.
  • Recording the transform without its version. Re-running new code over old inputs is a different derivation with the same name.
  • Treating the Handbook fraud exercise as a sizing result. Its numbers illustrate the design pressure (label delay); they do not size your pipeline.
3

Try it yourself

Closed-book, before checking anything

Closed-book, write a three-line contract for one store you built earlier (consistency, durability, delivery) with each line's boundary, plus the provenance chain from raw event to trained artifact for one feature.
4

Quiz yourself

Answer first, then mark it. Missed ones go to Review.

0 got · 0 missed

  1. 1.What three parts make one contract line?Answer

    The guarantee, its boundary (which paths and operations it covers), and the assumption it needs (clocks, quorums, fsync). A line missing any part cannot be checked.

  2. 2.Why must a chargeback feature use the transaction timestamp, not the training-job timestamp?Answer

    Point-in-time correctness: the feature may use only chargebacks known before the transaction, so filter on when each resolution became available, not just its event time. The job timestamp leaks future resolutions into training.

  3. 3.A user deletes their raw events. What does provenance closure require?Answer

    Every derived artifact (features, labels, models, indexes) is identified and re-derived or explicitly excluded, because derivation edges are also deletion edges.

  4. 4.DDIA's Trust, but Verify calls system models assumptions. What follows for your contract?Answer

    Each assumption (fsync persists, memory is not corrupted) is a stated risk with a likelihood, not a fact. The contract says what you assume and what would break it.

5

Practice

  • HLD Handbook: fraud feature-store design exercise

    Exercise: the fraud-detection stack (five features across batch and streaming, point-in-time correctness, shadow-then-canary); do it before opening the solution

    Cover the solution after: compare its point-in-time mechanism (historical lookup with event time) and its page-worthy metric with yours.

You're done when

Your three-line contract for an earlier store names every boundary and assumption, and your one-feature provenance chain resolves to versioned inputs plus transform versions with deletion consequences stated.

Only when you can do this without notes.

Leads to

Notes

Resources · 2 for this unit, 13 more in the section
  • DDIA 2e - Chapters 9, 10 and 14 ReviewMartin Kleppmann and Chris Riccomini · required

    Revisit uncertainty, consistency, consensus and responsible system design while extracting the final contract. Use the book to challenge assumptions and alternatives, not to replace executable evidence.

  • HLD Handbook - CRDTs, Multi-Region and Architecture Trade-offsHLD Handbook · support

    Read the CRDT, multi-region, distributed SQL and relevant case-study chapters only after the formal core passes. Use its design prompts to prepare the final comparison and defense.

Also in this section

  • TLA+ Video CourseLeslie Lamport · primary

    Complete lectures 1 to 10 (lectures 8, 9 and 10 have two parts each) and check the corrections page, while specifying a reduced transaction, workflow or replicated-log model from the capstone. Run TLC after every extension, report the model bounds with every result, and retain the first meaningful counterexample rather than polishing only the final model.

  • TLA+ ExamplesTLA+ Foundation · support

    Check specifications/transaction_commit/ (TCommit.tla, TwoPhase.tla, PaxosCommit.tla with their .cfg files) with TLC alongside the lectures, and read the Paxos specifications for depth. specifications/TwoPhase/ is a hardware handshake, not transaction commit.

  • Cambridge Concurrent and Distributed Systems Notes (Kleppmann) - CRDTs and CollaborationUniversity of Cambridge (Martin Kleppmann) · support

    Use Section 8.1 (operation-based and state-based CRDTs, operational transformation) for the CRDT unit, and work Exercise 21 (prove the operation-based map CRDT converges) and Exercise 22 (its multi-value variant).

  • A Comprehensive Study of Convergent and Commutative Replicated Data Types (Shapiro et al., 2011)INRIA report (Berkeley course copy) · support

    Read Sections 1 to 3 (state-based and operation-based definitions, the semilattice and delivery conditions) and one example type for your implementation, not the whole catalog.

  • Learn TLA+Hillel Wayne · support

    Use the core lessons and the examples as a second explanation when a lecture stalls, and as the PlusCal reference if you write algorithms rather than raw actions.

  • Hypothesis - Stateful TestingHypothesis · required

    Use RuleBasedStateMachine against a reference model for property-based state-machine tests of your extension, keep the failing seeds and shrunk examples, and plant a bug to show the machine detects it.

  • MIT 6.5840 - Verification Lecture and Final ProjectMIT PDOS · required

    Study the Spring 2026 verification lecture and IronFleet reading, then use the final-project guidance to frame a bounded real-system extension, evaluation and report. Course grading and staff review are unavailable to self-study, so use the roadmap defense rubric.

  • Jepsen - Consistency Models and AnalysesJepsen · required

    Use the framework's generator, client, nemesis and checker roles to design the campaign, Knossos for single-register linearizability and Elle for transactional anomalies on recorded histories, and the public analyses for fault models. A simplified local checker must declare its object, model and completeness limits.

  • Elle: Inferring Isolation Anomalies from Experimental Observations (Kingsbury and Alvaro)arXiv · required

    Read how Elle infers version orders from list-append and register histories and detects cycles for G0 to G2. It needs complete histories, and a clean run is not a proof of serializability.

  • How Amazon Web Services Uses Formal Methods (Newcombe et al., 2015)Amazon Science · support

    Read it for why industrial teams specify designs in TLA+ and which bugs model checking found that testing missed. Its effort figures are anecdotes, not benchmarks.

  • FoundationDB: A Distributed Unbundled Transactional Key Value Store (Zhou et al., 2021)FoundationDB · support

    Read the simulation-testing section (deterministic single-threaded simulation, fault injection, seed replay) as the model for your own scheduler, and the architecture for unbundled transactions.

  • CMU 15-721 - Selected Advanced Database Systems UnitsCarnegie Mellon Database Group · depth

    Select at most one lecture group that informs your extension: #02 and #03 (data formats and encoding), #08 (scheduling and coordination) or #17 to #22 (system analyses such as BigQuery, Databricks, Snowflake, DuckDB and Redshift), with their papers. The course project needs a group, cloud credits and staff sign-off, so there is no runnable self-study project.

  • Replicated Log and Stream Processor - Final CapstoneRoadmap-Final · support

    Finish the protocol and invariant specification, deterministic fault campaign, bounded real-code extension, fallback, ablations, workload regions, negative result, operations dossier and independent reproduction package.