CSE Roadmap

Core tier · about 3 hours · 4 parts

Part 3 of 4 · 2 min read

Exercises

Easy

Easy 1: Run it (30 minutes)

Run python -m pytest -q and python run_all.py in code/mini-durable.

Done when: you report cost and duplicate effects for the three strategies.

Easy 2: Find the window (30 minutes)

Write a test that crashes after an effect and before the journal write, with and without an idempotency key.

Done when: it shows a duplicate without the key and none with it.

Hint

use the after_effect crash position on the effect step.

Easy 3: List your effects (30 minutes)

For an agent you know, list each step as pure, effect or wait and mark which effects have a compensation.

Done when: each effect has an idempotency key plan.

Medium

Medium 1: SQLite journal (4 hours)

Store the journal in SQLite instead of a list.

Done when: killing the process (kill -9) mid-run and restarting completes the run without redoing journalled steps.

Hint

write the record and its result in one transaction after the step completes.

Medium 2: Versioned workflows (4 hours)

Keep several workflow versions and resume each journal with the version it started on.

Done when: a run begun before a change finishes on the old version while new runs use the new one.

Hint

store the structure hash and a version label in the journal header.

Medium 3: Timers (3 hours)

Add a journalled timer step that resumes after a delay without holding a worker.

Done when: a run suspends at the timer and resumes when the clock passes the deadline.

Hard

Hard 1: Chaos test (8 hours)

Kill real workers at random during real agent runs and compare restart versus journal. (I did not run this, so your numbers are the ground truth.)

Done when: you report cost per run, duplicate effects and completion rate.

Hard 2: Temporal port (8 hours)

Re-implement the 7-step agent as a Temporal workflow and activities. (I did not run this.)

Done when: a worker kill mid-run produces no repeated LLM calls for completed steps.

Hint

keep LLM and tool calls in activities, orchestration in the workflow function.

Hard 3: Saga failure (6 hours)

Make a compensation fail and design the escalation. (I did not run this.)

Done when: the run ends in a human-visible state with the audit log of what was undone and what was not.