Unit 6 of 10 · about 5 hours · implement, measure

Adversarial, crash, outage and rollback tests with secret-free replay

The strongest component guarantee can fail at a crash window or during an emergency rollback. The integrated campaign tests authority and state while dependencies, policy and releases change.

You'll be able to

  • Test normal, overload, outage, bad-release and human-escalation regimes across the integrated workflow.
  • Reproduce state transitions and verifier outcomes from secret-free synthetic records without executing real effects.
  • Run an incident procedure that contains harm, preserves evidence and checks recovery after rollback.

Covers

Adversarial, crash, outage, stale-policy and rollback testsSecret-free replay of model, retrieval, tool and state behavior
1

Read

In this order, only the parts listed

0 of 4 done

  1. Crash, authority and ambiguity matrixDurable Tool-Using Workflow

    Milestones B, D and F; Correctness requirements; Failure-injection requirements

  2. Poisoning, deletion and degraded retrievalEvidence-Grounded Retrieval System

    Milestones D and F; Correctness requirements

    Add index rollback with current deletion and permission checks; the project does not name index rollback as a milestone.

  3. LLM 0.36: pause and history replay limitsLLM (command-line tool and library), pinned

    test_pause_chain_sync_model_stops_remaining_calls, test_pause_chain_async_model_siblings_complete, test_resume_skips_calls_that_already_have_results; llm/logs.py functions message_hash and _canonical_attachment

    Keep the reconstruction unit's dependency pins. The attachment helper hashes a URL, not its future response body; message hashes are not a self-contained replay bundle.

  4. Incident roles, mitigation and drillsManaging Incidents and Incident Response

    Chapter 14: Elements of Incident Management Process; When to Declare an Incident. Workbook Chapter 9: Case Study 1, Case Study 2 and Putting Best Practices into Practice at https://sre.google/workbook/incident-response/ (pages read 2026-10-18)

    Apply the procedure to your local outage and bad-release drills. One person may fill several roles; retain the decision log and practice a handoff rather than assembling a production team.

2

Focus on

  • Compose faults at the joins: poisoned evidence followed by a tool proposal, revocation during approval, effect committed before outcome persistence, and a bad index or prompt release during recovery.
  • Use synthetic secret-free fixtures for model events, retrieval evidence, tool results, clock decisions and starting state. Redaction that changes a decision creates a different replay task; label it rather than claiming fidelity.
  • Separate replay from re-execution. Replay must not call a live model, fetch changing evidence or execute an external effect; rerunning a generation is a new trial.
  • Declare and mitigate before deep diagnosis. Restore service without weakening authorization, then verify current permissions, deletion, effect counts and task outcomes before closing the incident.
Common mistakes · 3
  • Inferring remote exactly-once effects from skipped tool-result IDs. A remote commit before result persistence still needs effect-side deduplication or reconciliation.
  • Assuming async pause cancels sibling effects. The pinned LLM test explicitly waits for a sibling to finish.
  • Keeping a replay bundle forever because it has no API keys. User content, identifiers, embeddings and tool results can still be sensitive.
3

Try it yourself

Closed-book, before checking anything

Predict and rerun the three named LLM pause/resume tests on CPU: a sequential later tool does not start after the pause; an async sibling can finish; a call with a recorded result is skipped on resume. Then replay one synthetic agentlab crash-after-effect fixture with network access disabled and effect dispatch replaced by a verifier. It must reproduce the recorded state and explicit ambiguity or reconciled outcome, not issue the effect again. Use the incident procedure for an injected model outage and a seeded bad release; retain mitigation, rollback and recovery checks.
4

Quiz yourself

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

0 got · 0 missed

  1. 1.What should replay do with a timeout-after-commit record?Answer

    Reproduce the recorded evidence and declared unresolved or reconciled state without sending another effect. Missing evidence must remain missing, not be guessed.

  2. 2.Does hashing an attachment URL preserve its content for replay?Answer

    No. It identifies the URL sent. Its bytes may later change or disappear; a permitted synthetic content fixture and content identity are needed for content-level replay.

  3. 3.A rollback stops errors but exposes deleted evidence. Is the incident resolved?Answer

    No. Availability recovered while a correctness and privacy invariant failed. Block exposure and restore a compatible, currently authorized evidence path.

You're done when

All five regimes have task and invariant evidence, clean replay needs no secrets or live effects, and outage and bad-release recovery have explicit incident timelines and post-recovery checks.

Only when you can do this without notes.

Leads to

Notes

Resources · 4 for this unit, 6 more in the section
  • Evidence-Grounded Retrieval SystemRoadmap-Final · required

    Close the deferred clauses: Milestones B (instrumentation), D (injected failure attribution), E (paired optimization) and F (blinded query and delete campaign with a clean rebuild), the correctness requirements and the rubric. Index rollback and an honest negative result are this track's additions, not project headings.

  • Durable Tool-Using WorkflowRoadmap-Final · required

    Close Milestones B, D, E and F and the correctness requirements: crash-window replay, approval bound to the exact effect, fencing, ambiguous outcomes surfaced instead of claimed exactly-once, the matched deterministic, routed and agentic comparison, and clean reproduction. Finish the existing system rather than rebuilding it; delegation stays optional.

  • LLM (command-line tool and library), pinnedSimon Willison · required

    At commit 2465dfc (version 0.36), trace the path from llm.cli:cli through the OpenAI-compatible adapter in llm/default_plugins/openai_models.py to llm/models.py, llm/logs.py and llm/migrations.py. Run tests/test_openai_endpoint.py, test_migrate.py, test_pause_resume.py and test_tools.py on CPU, point llm openai endpoint at your local server, then make one bounded, tested change such as versioned usage normalization or a tool-chain budget, with a migration and a secret-free replay fixture.

  • Managing Incidents and Incident ResponseGoogle SRE · support

    Read SRE book Chapter 14 (elements of incident management, when to declare an incident) and Workbook Chapter 9 Incident Response with its case studies. Write the incident procedure for the integrated system and run it once against an injected fault.

Also in this section

  • AI Engineering and Agentic Systems CheckpointRoadmap-Final · primary

    Execute the complete checkpoint now: explain ownership, derive budgets and contracts, pass versioned evaluation, prove tenant isolation and replay safety, red-team the system, measure the joint frontier, then reconstruct and modify a production-like application.

  • AI Product Architecture Case StudiesEngineering Handbook · support

    Pick two of case studies 8.30 to 8.33 (ChatGPT, Enterprise RAG, Coding Agent, Perplexity Search; slugs chatgpt-conversational-ai, enterprise-rag, coding-agent, perplexity-ai-search), reconstruct each decomposition, identify its hidden assumptions and compare it with yours. Recompute the capacity tables before trusting a number: several are wrong (8.31's per-tenant index cost, 8.33's daily query volume).

  • AI and ML System Design HandbookEngineering Handbook · reference

    Part 9 chapters 0 to 8 are overview-depth architecture notes for serving, RAG, vector search, agents, evaluation, LLMOps, cost and safety. Use them as a checklist for omissions in the integrated design; serving (00, 02) belongs to the Inference track.

  • AI Agents in Depth - Integration ReviewBojie Li · support

    Use 5.1.4 harness engineering, 7.9 and 7.10 and Chapter 9 (9.3.2 safety boundaries for continual evolution, Experiment 9-6 canary and rollback) as a final review. The offline chapter9/harness-safety-gate tests (no API key) show a release gate that rejects a seeded bad candidate.

  • The Hitchhiker's Guide to Agentic AI - ProductionHaggai Roitman · support

    Use v3 Chapter 27 (27.5 testing, 27.6 observability, 27.7 deployment) and 28.7 human-in-the-loop UI to audit the integrated system. Verify claims against official documentation.

  • AI Engineering Handbook - AI Product EngineeringHandbook Academy · support

    Use Part 11 to connect evaluation and system evidence to product decisions, feedback and iteration. Finish with a decision memo that distinguishes model capability, orchestration, retrieval, tool, evaluator and user-experience effects.