Page 4 of 8~245 min topic

Disaster recovery lab

Inject a controlled disaster recovery failure

Executable checks prove restore validates citation gold set before traffic; corrupt snapshot rejected on fixtures — including the known misshape behind DR-2026-07-30.

~35 min this pageValidation

1Learn the idea

Read

Schema and policy checks

Add executable validation at the trust boundaries of regional RAG platform restore with PostgreSQL + object storage + vector indexes. Reject unknown fields where they matter, bound string sizes, and coerce only after auth/signature checks when raw bytes are security-relevant. Invariant under test: restore validates citation gold set before traffic; corrupt snapshot rejected. A TypeScript type or Python annotation is not runtime validation — pair them with parsers.

Read

Golden and adversarial fixtures

Automate the fixtures from setup, including a recreation of DR-2026-07-30. Assert both the visible error and the absence of side effects (no provider call, no queue write, no flag flip). Where metrics matter, assert label enums stay bounded.

Read

Implementation artifact

Read

Corrupt snapshot must fail validate_gold and block cut_traffic

Read

Gate semantics

Document which failures are client mistakes (4xx) versus operator/config mistakes (5xx/503). Oracle still stands: drill DR-2026-07-30: restore completes 97m; gold citation_precision ≥ 0.95. Validation should make accidental “success with empty body” impossible for DR lead failing over region A → B within RTO 2h / RPO 15m.

Read

Stage depth

Property ideas: shuffled field order, Unicode edges, maximum-length strings, and replayed timestamps. Where money, identity, or citations matter, assertion messages should cite the field name. Do not snapshot entire provider payloads in tests; assert semantically. If validation fails open “to keep the demo working,” you have inverted the lab. Tie at least one CI job to the DR-2026-07-30 fixture so main cannot regress silently. Re-read restore validates citation gold set before traffic; corrupt snapshot rejected after each new parser — convenience helpers love to bypass it.

Read

Field notes for `disaster-recovery-lab` / `validation`

Table-drive status codes and error codes so reviewers see coverage at a glance. Include a Unicode normalization case if user text is accepted. Verify that oversized bodies fail before CPU-heavy work. Where digests or versions are pinned, assert mismatch behavior. Keep golden files small enough to read in review. CI should fail on skipped tests that mark the incident fixture as xfail without a ticket link. In this chapter the product is regional RAG platform restore with PostgreSQL + object storage + vector indexes, the human stakeholder is DR lead failing over region A → B within RTO 2h / RPO 15m, and the incident id you design against is DR-2026-07-30. Re-state the oracle in your notes — drill DR-2026-07-30: restore completes 97m; gold citation_precision ≥ 0.95 — and keep the invariant visible: restore validates citation gold set before traffic; corrupt snapshot rejected. Track rto_minutes, rpo_minutes, citation_precision_post_restore as the scoreboard. Surface under change control: region-b https://b.rag.example. If you only have forty minutes, finish the fixture for traffic cut before vector rebuild finishes — fluent ungrounded answers before polishing UI. Promotion language stays ternary: promote, hold, or roll back based on evidence, not hope.

Go deeper

Before you start

Why this matters

List three fixtures: one golden success, one schema/auth reject, and one regression for DR-2026-07-30. For each, write the exact assertion (status, code, metric, or citation) that must turn red if broken.

Check your understanding

Page assessment

Answer from memory. Completion is saved from this evidence, not from opening the next page.

1. Do parsers run before side effects?
2. Is DR-2026-07-30 represented as a fixture?
3. Are side-effect absences asserted?

All responses are required.