Unit 14 of 15 · about 5 hours · explain, implement
Model-registry state, artifact checksums, retrieval-index freshness and dataset version identity
A model version, a dataset path and an index name are pointers, and pointers move. Lineage plus checksums plus watermarks turn them into identities a later audit can resolve.
You'll be able to
- Promote and roll back model versions through registry aliases with lineage to the producing run.
- Verify artifacts and checkpoints by checksum before serving or evaluating them.
- Build immutable retrieval-index generations from a recorded input frontier and switch readers between them atomically.
- Give every dataset and evaluation input a content identity independent of its path.
Covers
Read
In this order, only the parts listed
0 of 3 done
- Model Registry: versions, lineage, aliases, stagesMLflow Model Registry Docs
Why Model Registry (version control, lineage and traceability); Concepts (annotations and descriptions); Model Registry in practice (aliases such as @champion, stages, tags)
Stages are deprecated since MLflow 2.9 (Model Registry Workflows, Migrating from Stages); use aliases and tags. Page read 2026-10-15.
- Dataset identity: checksum sidecars and pipeline locksDVC Docs - Data Versioning
dvc add, Description and Example: Single file, for.dvccontent-hash sidecars; for pipeline definition and lock state, thedvc.yamlpage with itsdvc.lock filesection (https://doc.dvc.org/user-guide/project-structure/dvcyaml-files); for transfer, https://doc.dvc.org/command-reference/push and https://doc.dvc.org/command-reference/pull (page read 2026-10-15) - Serving versions: feature services and materialize refreshFeast Documentation - Point-in-Time Joins and Feature Retrieval
Feature Services (one service per model version); Retrieving online features; Pre-computed feature vectors (rebuilt on
materializeandmaterialize-incremental) (page read 2026-10-15)Read as the serving-state pattern: named feature groups and refreshed vectors. Feast defines no global input-offset snapshot; the build frontier and the generation swap are your own design. The join mechanics belong to the previous unit.
Focus on
- An alias resolves to a version, and a version resolves to its producing run. Treat registered artifact bytes and run identity as immutable by policy; tags, descriptions and aliases may change under audit.
- Record trusted artifact and dataset-content digests with the code commit, configuration, dependencies, seeds and execution inputs. Read the dataset digest from the
.dvcoutput entry, not the hash of the sidecar file; hashes verify inputs, and only a rerun shows reproducibility. - Say whether your build metadata is a completeness frontier or an exact snapshot boundary. A completeness watermark through offset 1000 guarantees inclusion through it but may allow newer visible writes; only an immutable build capped at offset 1000 with an atomic generation switch excludes later writes. Partitioned inputs need a per-partition frontier.
- DVC tracks content, git tracks the pointer. The small
.dvcfile commits to git while the bytes live in cache or remote;pullrestores exactly the committed bytes.
Common mistakes · 3
- Versioning the pointer file but not fetching the bytes. A
.dvcsidecar withoutpullreproduces the hash of data you do not have. - Reading index freshness from wall-clock age. Staleness is measured against the build's input frontier: which writes are included, not how old the files are.
- Confusing copying bytes with promoting a registry version. Move the serving alias to the verified version and keep its producing-run identity; byte-identical copies keep the same content identity.
Try it yourself
Closed-book, before checking anything
@champion before and after a promotion and a rollback, and list what an evaluation rerun must match: artifact and dataset-content digests, code commit, configuration, dependencies and seeds.Quiz yourself
Answer first, then mark it. Missed ones go to Review.
0 got · 0 missed
1.
@championpoints at v3, then v4 is promoted, then rolled back. What does@championresolve to at each step?Answerv3, then v4, then v3 again. Promotion repoints the alias; rollback repoints it back. Neither step rewrites v3 or v4 or their lineage.
2.An evaluation reruns with the same dataset path but a different
.dvchash. Is it the same evaluation?AnswerNo. Identity is the content hash, not the path. Different bytes mean a different input even under the same filename.
3.An index build records a completeness watermark through offset 1000, and offset 1042 just committed. Which rows may a served query reflect?Answer
Every row through offset 1000, and possibly some newer ones: a completeness watermark is a lower bound. Only an immutable generation capped at offset 1000 with an atomic switch excludes offset 1042.
4.A recreated registry key reuses version number 2 after v2 was deleted. What breaks?Answer
Lineage: two different artifacts claim one identity, and old references to v2 become ambiguous. Versions are append-only; the versioned store in the deletion unit keeps history across expiry for the same reason.
Practice
- AlgoMaster: Build a Versioned TTL Key-Value Store
Monotonic versions per key across expiry and deletion;
compareAndSetandremoveact only on live matching versionsTreat versions as append-only registry discipline in miniature. The section mini-project covers this: build immutable retrieval-index generations from an identified dataset and per-partition offset frontier, verify document counts and deletions against an independent reference, publish a generation pointer atomically, and test a crash before and after publication plus rollback to a retained generation.
You're done when
You resolve alias moves without touching versions, list every input an evaluation rerun must match, and say for any served read which generation and frontier it came from.
Only when you can do this without notes.
Leads to
Notes
Resources · 3 for this unit, 14 more in the section
- Feast Documentation - Point-in-Time Joins and Feature RetrievalFeast · support
Read Point-in-time joins (entity dataframes,
get_historical_features, TTL backward scan,filter_by_created_timestamp) and Feature retrieval (event_timestampas the inclusive upper bound,get_online_featureswithout timestamps, feature services per model version, materialize refresh). Work the join logic on tiny local tables; do not deploy Feast. Page read 2026-10-15 (v0.66-branch documentation). - MLflow Model Registry DocsMLflow · support
Read the Model Registry page (registered models, versions, lineage to the producing run, aliases such as @champion, and tags) and the registry tutorial promotion flow. Stages are deprecated since MLflow 2.9; use aliases and tags. Page read 2026-10-15; the versioned docs move, so re-pin the version you read.
- DVC Docs - Data VersioningDVC · support
Read
dvc add(Description and Example: Single file) for.dvccontent-hash sidecars, thedvc.yamlpage with itsdvc.lock filesection for pipeline state, andpushandpullfor transfer. A local directory remote is enough; do not set up cloud storage. Page read 2026-10-15.
Also in this section
- HLD Handbook - Reliability, Operations and Security at ScaleHLD Handbook · primary
Read Part 6 observability, SLOs, resilience, overload, deployments, chaos, incidents and health, then Part 7 authentication, mTLS, secrets, tenancy and data governance chapters relevant to the capstone. Skip unrelated case studies.
- DDIA 2e - Chapters 2, 5 and 14Martin Kleppmann and Chris Riccomini · support
Use Chapter 2 "Describing Performance" for percentile and response-time vocabulary and Chapter 5 for compatibility during rolling upgrades. Chapter 14 is about predictive analytics, privacy and data governance, not operations: read its "Privacy and Tracking" section for the retention and deletion units.
- Google SRE Books - SLOs, Monitoring, Overload, Cascades, Incidents and RecoveryGoogle · required
Read SRE Chapter 4 (service level objectives), 6 (monitoring distributed systems), 21 (handling overload), 22 (addressing cascading failures), 14 (managing incidents) and 15 (postmortem culture); Workbook Chapter 2 (implementing SLOs) and 5 (alerting on SLOs); and Building Secure and Reliable Systems Chapter 5 (least privilege) and 9 (design for recovery). Convert each into one alert, limit, load test or runbook action in the capstone.
- Metastable Failures in Distributed Systems (Bronson et al., 2021)HotOS · support
Read the trigger and sustaining-effect model of metastable failure and the retry and shedding design prompts. Its model illustrates; it does not predict.
- Metastable Failures in the Wild (Huang et al., 2022)USENIX OSDI · support
Read the incident study for how retries and load sustain outages after the trigger ends; it is a sample of public reports, not a rate.
- Simple Testing Can Prevent Most Critical Failures (Yuan et al., 2014)USENIX OSDI · support
Read the findings on error-handling code and how few nodes and events reproduce most failures, as the case for testing error paths in your campaign. Its bounds come from one sample of 2014 systems.
- Gray Failure: The Achilles' Heel of Cloud-Scale Systems (Huang et al., 2017)Microsoft Research · support
Read the gray-failure model (differential observability between a detector and its clients) as vocabulary for telemetry and failure detection.
- The Internals of PostgreSQL - Base Backup and Point-in-Time RecoveryHironobu Suzuki · support
Read Chapter 10 (base backup, how PITR replays WAL, timelines and incremental backup) as the real-engine model for backup integrity, recovery points and restore verification. Note the date you read it.
- Building Distributed Systems - The Tracer, The Securitor and The MigratorBuild Distributed Systems · optional
Only the first three tasks of each track are free: in The Tracer, trace-context propagation, span lifecycle and a collector; in The Securitor, JWTs, the OAuth 2 code flow with PKCE and sessions; in The Migrator, schema migrations, expand and contract, and zero-downtime change. Tasks are graded in the browser after login, so treat a pass as a drill and keep your local harness as the evidence.
- SPIFFE Workload Identity and Workload APISPIFFE Project · support
Read the SPIFFE ID, X.509-SVID and trust bundle specifications and the Workload API (
FetchX509SVID,FetchX509Bundles) to design service identity, short-lived credentials and bundle rotation. A local mock is sufficient unless a real SPIRE deployment answers a specific gap. - OpenTelemetry Signals and Semantic ConventionsOpenTelemetry · support
Read signals and context propagation (W3C Trace Context
traceparent, inject and extract, baggage rules), then the semantic conventions (1.44.0) for the RPC and messaging areas with their stability status. Define bounded attributes for request, node, partition, term and offset identities, and never infer global order from display timestamps. - Replicated Log and Stream Processor - Production ContractRoadmap-Final · support
Add workload identity, tenant checks, audit, SLOs, capacity limits, backup and verified restore, mixed-version migration, rollback and reduced point-in-time ML data paths. Run one compound incident from detection through recovery.
- OWASP Threat Modeling Cheat SheetOWASP · reference
Use System Modeling (data-flow diagrams, trust boundaries, stores and processes), Threat Identification (the STRIDE table applied to components, data flows and trust boundaries) and Response and Mitigations to build the unit threat model.
- PostgreSQL 18 Documentation - Recovery Targets, Backup Verification and RewindPostgreSQL Global Development Group · reference
Read Section 19.5.6 Recovery Target, the
pg_verifybackupreference and thepg_rewindreference for recovery stopping points, manifest checks and rejoining a diverged primary.