Unit 13 of 15 · about 6 hours · implement
One bounded real-code contribution with a reference fallback and layered tests
The track ends in real code, not in models. A bounded change with a fallback is the difference between a contribution and a rewrite nobody can review.
You'll be able to
- Scope one bounded extension to a real or realistic codebase with a hypothesis, a compatibility path and a reference fallback.
- Layer unit, property, integration and fault tests so each layer can fail independently.
- Frame the work in the MIT final-project shape (proposal, code, short write-up, demo) evaluated by the roadmap defense rubric.
Covers
Read
In this order, only the parts listed
0 of 3 done
- MIT 6.5840 final project guidance (Spring 2026)MIT 6.5840 - Verification Lecture and Final Project
Deliverables (proposal under a page, code plus about 3 pages of write-up, in-class demo), the effort bar (at least Lab 5), and the half-baked ideas list for scope calibration (cross-shard transactions with 2PC, Dynamo-style async replication, geo-replicated storage, CRDT editor)
Course grading and staff review are unavailable to self-study, so the roadmap defense rubric replaces them. Never publish MIT lab solutions; the extension lives in your own repository.
- Replicated Log and Stream Processor: bounded extensionReplicated Log and Stream Processor - Final Capstone
Architecture constraints, Deliverables and Correctness requirements: the baseline contract and the test layers your contribution must keep passing
- Distributed Systems track: the extension requirementReplicated Log and Stream Processor - Final Capstone
Stage DS-9, the Implement and Design / extend checklists: a bounded protocol, storage, testing or observability extension with compatibility and fault tests
The checklist names no fallback; state your own safe fallback contract explicitly.
Focus on
- Bounded means reviewable: one mechanism, one boundary, one hypothesis about what improves. A second mechanism is a second contribution.
- Define when the fallback is safe and which failures it tolerates. After an ambiguous outcome, reconcile or keep the same logical request identity before using the old path, so committed effects are not duplicated and ownership and durability checks still apply.
- Compatibility is tested, not asserted: mixed-version runs, rollback runs and old-data reads belong in the layer that owns them.
- Each test layer answers a different question: units pin the mechanism, properties break ordering assumptions, integration wires the fallback, faults replay the campaign.
Common mistakes · 3
- Scoping by enthusiasm. The MIT bar is Lab-5-sized; bigger scope with the same evidence is a weaker contribution.
- Testing the fallback path only when it is convenient. The fallback runs under the same fault campaign as the new path, or it is untested code.
- Borrowing credibility from the paper the idea resembles. Your measurements need your setup; the paper's numbers describe its setup.
Try it yourself
Closed-book, before checking anything
Quiz yourself
Answer first, then mark it. Missed ones go to Review.
0 got · 0 missed
1.What four things does the MIT proposal require on under a page?Answer
Group members, the problem, how you plan to address it, and what you will specifically design and implement.
2.What makes a fallback a reference fallback rather than a second implementation?Answer
It is the pre-existing behavior, kept working and selected under a stated safety rule, with its use recorded. After an ambiguous outcome it reuses the request identity instead of retrying blindly, so it bounds the blast radius of the new path without duplicating effects.
3.Which test layer catches a duplicate-delivery bug in the new path?Answer
Property tests with a reference model first (ordering and duplication are their fault class); the fault campaign then replays it under scheduled duplicates.
4.Why does self-study replace staff review with the roadmap defense rubric?Answer
Grading and staff feedback need enrollment. The rubric's skeptical defense is the available independent check.
You're done when
Your one-page proposal names the mechanism, the compatibility path, the fallback trigger and the four layers, and each layer has a failing-then-passing run on file.
Only when you can do this without notes.
Leads to
Notes
Resources · 2 for this unit, 13 more in the section
- 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.
- 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.
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.tlawith their.cfgfiles) 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
RuleBasedStateMachineagainst 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. - 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.
- 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.
- 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.