Skip to content

resource

Durable Inbox and Outbox: Educator Guide

Read the planned learning contract for durable inbox and outbox delivery in Chapter 7. Review prerequisites and proposed tasks; completed notebooks and solutions are not available yet.

Planned construction brief. The complete lesson, runnable notebooks and checkpoint are not available yet.

PLANNED — construction brief; no completed notebook or solution is published for this chapter.

This slot belongs to the single nineteen-chapter edition. Read the detailed chapter scope in the textbook's Chapter 7. The existing course material for later chapters remains available using its supplied reference runtime; completing it does not demonstrate construction of this missing foundation.

The planned exercises are two independent ninety-minute units. Unit A builds and connects the component from its first principles. Unit B introduces a failure, requires a repair, and tests a changed case. Both will introduce every new library and concept where used, include predictions and progressive hints, and retain the learner's implementation and evidence.

The solutions volume will explain each design decision, show the failed approach and repair, and include independently calculated expectations. The educator materials will include local student and worked copies, preparation instructions, misconception prompts, timing observations and an assessment rubric. These are requirements, not claims of delivery.

Planned learning contract: Durable work inbox and report outbox

Starting knowledge and new concepts: The SQLite construction and memory chapters. Introduce work identity, state transitions, idempotency, claims, leases, cursors and an outbox before combining them.

Unit A construction: Admit a request and advance its input cursor in one transaction; have a worker claim and finish the request and create one report atomically.

MinutesWork
0–10Predict duplicate-request behavior
10–30Draw rows, identities and allowed transitions
30–60Construct admission and claim operations
60–80Connect finish to report creation and test duplicate input
80–90Retain the work and report ledger

Unit B diagnosis and transfer: Inject a failure after admission and before cursor advancement, then a lost acknowledgement after report delivery. Separate known failure from unknown delivery.

MinutesWork
0–15Retrieve transaction and identity invariants
15–35Inject a crash between admission and cursor write
35–60Repair the transaction and demonstrate restart
60–80Handle a lost delivery acknowledgement without guessing
80–90Explain pending, sent and unknown reports

Independent acceptance examples: Two deliveries of request ID 42 create one work row. An admission exception advances no cursor. One terminal result creates one report. A lost send acknowledgement becomes UNKNOWN and does not authorize an automatic duplicate send.

Before teaching this chapter, require the completed student and worked notebooks to pass fresh-kernel execution. Rehearse the failures above and ask learners to predict the retained state before showing results. Collect a first attempt, highest hint used, an unseen-case explanation and actual minutes. Do not schedule this brief as if it were a finished ninety-minute lesson.

Back to this asset

Keep building with Prof Rod

Found this material through a colleague, classroom or shared download? Get the complete book at profrod.ai/book and join the Prof Rod learner community. Bring one result, one question or one failure you learned from. Share this resource with another learner and keep its source links with it so they can find the full course and future updates.

SOURCE PROVENANCE

Derived from github.com/profrodai/sovereign-agent/blob/5b825f3a58461bce8aba1173acf0b6d175c44b64/book/educator/ch07/profrod-sovereign-agent-ch07-durable-inbox-outbox-educator-guide.md