Verification
How this course was verified
This page states what was checked, how, and what was not checked. It was written after the final full replay; the per-lesson table below is generated from that replay's report.
Summary
| Check | Result |
|---|---|
| Full replay of all 50 lessons, in order, from an empty directory | all 50 lessons replayed without a failure (finished 2026-11-28T13:33:51.671Z) |
| Tests at the end of the course (reference implementation) | 137 tests, 137 passing, 0 failing (npm test at the end of lesson 10.5) |
Lessons whose end-of-lesson npm test passed |
43 of 43 lessons that have a test suite (lessons before 1.5 have none) |
| Strict building build (every check block has a current recorded output; every screenshot exists; every lesson has the eight required sections) | passed with 0 problems |
Run from a fresh git clone with an empty database (lesson 10.3, executed by the replay) |
migrate, seed, npm run check (131 tests) and a real page request all succeeded |
| Explorer data | exported from the final reference app after db:reset (22 entities, 15 policies, a 12-step trace of a real GET /issues/101) |
How the course is verified
The lessons are the single source of truth. A replay tool (course/tools/replay.mjs) reads the lessons in order and, in an empty directory, does what a learner does:
- creates every file shown as Create file or Replace whole file, and applies every Edit as an exact find-and-replace (a hunk that does not match exactly once stops the replay);
- runs every Run and Run and compare command, and checks the exit code and, where the lesson states one, an expected pattern in the output;
- starts the dev server where the lesson does, restarts it when files change (as
node --watchdoes), and records server log excerpts; - runs SQL blocks in
psqlinside the Docker container; - takes screenshots in Google Chrome through
playwright-core, logging in through the real login form where a user is named; - runs
npm testat the end of each lesson (or reuses the lesson's own final run), then commits and tagslesson/<id>.
Every output shown on the building (terminal output, psql results, server logs, screenshots) comes from that run. The building builder refuses, in strict mode, to publish a lesson whose recorded output is missing or older than the lesson text.
Output normalization, applied to recorded text only: the replay's absolute paths become /Users/you/code/caretaker, the home directory becomes /Users/you, and ANSI colour codes are removed. curl runs with --no-progress-meter through a .curlrc (curl hides its progress meter in a terminal; the replay is not a terminal). Docker Compose prints plain progress lines when its output is not a terminal; the course says so in lesson 0.1. Times, durations, IDs of new rows, cookies and request IDs are real and differ between runs.
Environment of the final run
macOS 26.7.2 (darwin-arm64), Node.js 22.23.1, npm 10.9.8, Git 2.54.0, Docker version 29.9.3, build 5457199, Google Chrome 158 (screenshots).
The reference application pins: Express 5.3.0, EJS 7.0.2, pg 8.23.1, express-session 1.19.0, connect-pg-simple 10.0.0, argon2 0.45.2, express-rate-limit 8.7.4, @cedar-policy/cedar-wasm 4.14.0 (Cedar language 4.6), Supertest 7.3.2, PostgreSQL image postgres:18.7-alpine. @cedar-policy/cedar-wasm@4.14.1 was found to be a broken publish (2 files, about 6 kB) and is avoided; lesson 6.1 shows the check.
Behaviour verified by the reference implementation's tests
The 137 tests at the end of the course (131 before the capstone) cover, among others:
- the complete access matrix from lesson 5.1, one row per request and every user, kept green from Module 5 (plain JavaScript) through Modules 6 to 10 (Cedar);
- list parity: for 6 users × 30 issues and 6 users × 4 inspections, the SQL list contains exactly what Cedar allows;
- tenant isolation: 95 attacks with foreign identifiers by three outsiders and one insider, each refused, with an MD5 fingerprint of ten tables unchanged;
- revocation taking effect on the next request with the same session;
- forged headers, query strings and form fields (roles, user IDs, building IDs, reporter, organisation) having no effect;
- unauthorized grant attempts (self-changes,
building_adminby a building admin), separation of duties, and the capstone's self-assignment forbid; - the four decision outcomes: allow, explicit deny (forbid), implicit deny, failure; the policy store validates against the schema;
- authentication: argon2id hashing, session regeneration at login, cookie attributes, CSRF tokens on every POST form, login throttling, security headers.
Website checks
Run against the built building (npm run serve) in the app's browser pane and in Google Chrome through playwright-core:
node tools/check-building.mjs(npm run checkincourse/) opened all 107 pages in Chrome (landing page, course map, verification page, 50 lessons, 47 checkpoint pages, the explorer index and six explorer pages) and found no page errors, no console errors and no broken internal links among 147 checked;- the five real-engine explorers load Cedar 4.14.0 (WebAssembly) and evaluate with the exported data: the playground presets give the expected decisions (allow by
building-read; deny byforbid-self-approval); the request trace re-runs the recorded call live and matches the recorded decision; the role-explosion explorer is labelled as a counting model; - copy buttons copy the exact block text (checked in Chrome with clipboard permission: clipboard content equal to the source). The app's own browser pane blocks clipboard access; the button then says "Press Ctrl+C";
- keyboard:
/opens search, typing and Enter open the matching lesson section,[and]move between lessons,mmarks a lesson complete,tchanges the theme,?opens the shortcut list, Escape closes dialogs; - progress: marking complete persists across reloads (localStorage); the landing page offers "Resume lesson …" for the last lesson opened;
- light, dark and system themes switch, including the diagrams; at 375 px wide the lesson page has no horizontal scroll and the navigation becomes a drawer;
- with
prefers-reduced-motion: reduce, transitions in the explorers are disabled; - the capstone solution is closed behind a disclosure, and its text is excluded from search.
Not verified, and known limitations
- Platforms. Everything was run on macOS (arm64) with Docker Desktop. The Windows (WSL 2) and Linux notes in the lessons were written from documentation and were not executed.
- Node.js 24. The course supports Node 22 and 24 LTS; only Node 22.23.1 was used.
- Screen readers. Keyboard operation and labels were checked; no screen-reader session was performed.
- Explorer keyboard focus. The explorer agent verified hover and click on chips; focus issues could not be exercised while the browser pane was in the background.
- Effort estimates are computed from the amount of text, code and commands in each lesson, not measured with learners.
- Security scope. Caretaker is learning-grade: lesson 10.3 lists what production would need (separate database users, secrets management, HTTPS, MFA and password reset, shared rate-limit store, session invalidation on password change, backups, monitoring). Row-level security is demonstrated in psql, not wired into the app.
- Optional decision service (lesson 9.2) is tested with Supertest and curl; the app itself keeps its in-process engine.
Per-lesson replay results
Replay environment: darwin-arm64, Node v22.23.1, Docker version 29.9.3, build 5457199. Finished 2026-11-28T13:33:51.671Z.
| Lesson | Title | Replay | Tests at lesson end | Commit |
|---|---|---|---|---|
| 0.1 | What we are building | ✓ replayed | – | – |
| 0.2 | Install and verify your tools | ✓ replayed | – | – |
| 0.3 | Terminal, folders and environment variables | ✓ replayed | – | – |
| 1.1 | npm init and a first Express server | ✓ replayed | – | d2d3f13 |
| 1.2 | Routes, requests and responses | ✓ replayed | – | e753e00 |
| 1.3 | Middleware, JSON bodies and errors | ✓ replayed | – | 08e58c4 |
| 1.4 | HTML pages with EJS | ✓ replayed | – | 5921b20 |
| 1.5 | First tests, and the limits of memory | ✓ replayed | ✓ tests 7, pass 7, fail 0 | e7329af |
| 2.1 | PostgreSQL with Docker Compose | ✓ replayed | ✓ tests 7, pass 7, fail 0 | b1c4cd3 |
| 2.2 | Tables, keys and constraints | ✓ replayed | ✓ tests 7, pass 7, fail 0 | da42290 |
| 2.3 | Migrations you can run twice | ✓ replayed | ✓ tests 7, pass 7, fail 0 | af48e24 |
| 2.4 | Seed data and reading it with SQL | ✓ replayed | ✓ tests 7, pass 7, fail 0 | c9ee520 |
| 2.5 | Connect Express to PostgreSQL | ✓ replayed | ✓ tests 5, pass 5, fail 0 | 6eba359 |
| 2.6 | Safe writes and a test database | ✓ replayed | ✓ tests 7, pass 7, fail 0 | a09f004 |
| 3.1 | Routers, and organisations you can create and edit | ✓ replayed | ✓ tests 12, pass 12, fail 0 | af6edac |
| 3.2 | Buildings, unique names and safe deletes | ✓ replayed | ✓ tests 18, pass 18, fail 0 | 6669662 |
| 3.3 | Edit, move and delete issues | ✓ replayed | ✓ tests 22, pass 22, fail 0 | 6c2da1f |
| 3.4 | Paging, sorting and filtering | ✓ replayed | ✓ tests 27, pass 27, fail 0 | 1d53be5 |
| 3.5 | Inspections, a state machine and transactions | ✓ replayed | ✓ tests 33, pass 33, fail 0 | 7274ad2 |
| 3.6 | A dashboard, and the CRUD app as a whole | ✓ replayed | ✓ tests 35, pass 35, fail 0 | ec77da9 |
| 4.1 | Users and password hashing | ✓ replayed | ✓ tests 35, pass 35, fail 0 | 673bacd |
| 4.2 | Registration, login and sessions | ✓ replayed | ✓ tests 40, pass 40, fail 0 | 16fa1df |
| 4.3 | Require login, and keep sessions safe | ✓ replayed | ✓ tests 47, pass 47, fail 0 | edfb94c |
| 4.4 | CSRF tokens, login throttling, and "logged in" is not "allowed" | ✓ replayed | ✓ tests 52, pass 52, fail 0 | 2510736 |
| 5.1 | Memberships, building roles and the access matrix | ✓ replayed | ✓ tests 56, pass 56, fail 0 | 6fb95d8 |
| 5.2 | Authorizing issues in plain JavaScript | ✓ replayed | ✓ tests 64, pass 64, fail 0 | 886a78f |
| 5.3 | Lists and tenant isolation | ✓ replayed | ✓ tests 69, pass 69, fail 0 | bbf92aa |
| 5.4 | Buildings, organisations and inspections | ✓ replayed | ✓ tests 77, pass 77, fail 0 | 847472a |
| 5.5 | Role explosion and the access matrix as a test | ✓ replayed | ✓ tests 88, pass 88, fail 0 | c51c4d8 |
| 6.1 | The first Cedar decision | ✓ replayed | ✓ tests 88, pass 88, fail 0 | 44c8e7c |
| 6.2 | A schema, and policies that are checked before they run | ✓ replayed | ✓ tests 89, pass 89, fail 0 | 29492d0 |
| 6.3 | From database rows to Cedar entities | ✓ replayed | ✓ tests 90, pass 90, fail 0 | 9410fba |
| 6.4 | Cedar behind can(): the first route | ✓ replayed | ✓ tests 89, pass 89, fail 0 | 5379594 |
| 6.5 | Every route on Cedar | ✓ replayed | ✓ tests 90, pass 90, fail 0 | 87c32bb |
| 6.6 | Forbid, precedence, errors and failures | ✓ replayed | ✓ tests 95, pass 95, fail 0 | 21024d6 |
| 7.1 | Facts, parents and action groups | ✓ replayed | ✓ tests 95, pass 95, fail 0 | e6dd730 |
| 7.2 | Policy templates, compared | ✓ replayed | ✓ tests 95, pass 95, fail 0 | 49ec0a8 |
| 7.3 | Members and controlled onboarding | ✓ replayed | ✓ tests 101, pass 101, fail 0 | 63bd3e9 |
| 7.4 | Grant and revoke building roles | ✓ replayed | ✓ tests 109, pass 109, fail 0 | db0c522 |
| 8.1 | Lists and policies, kept aligned | ✓ replayed | ✓ tests 111, pass 111, fail 0 | 292038b |
| 8.2 | Creates and moves | ✓ replayed | ✓ tests 116, pass 116, fail 0 | c3227ac |
| 8.3 | An isolation test suite | ✓ replayed | ✓ tests 120, pass 120, fail 0 | 20db85d |
| 9.1 | Forged input, and what Cedar cannot know | ✓ replayed | ✓ tests 124, pass 124, fail 0 | 543085a |
| 9.2 | PDP, PIP, PEP and PAP, and a separate decision service | ✓ replayed | ✓ tests 128, pass 128, fail 0 | fbfcd34 |
| 9.3 | Defence in depth, stale data and races | ✓ replayed | ✓ tests 128, pass 128, fail 0 | fbfcd34 |
| 10.1 | Hardening, logging and configuration | ✓ replayed | ✓ tests 131, pass 131, fail 0 | 6ba0ab4 |
| 10.2 | The whole application, as six users | ✓ replayed | ✓ tests 131, pass 131, fail 0 | 6ba0ab4 |
| 10.3 | From a clean checkout, and what production needs | ✓ replayed | ✓ tests 131, pass 131, fail 0 | 85a65bd |
| 10.4 | Recap, and your capstone feature | ✓ replayed | ✓ tests 131, pass 131, fail 0 | 85a65bd |
| 10.5 | Capstone solution: work orders | ✓ replayed | ✓ tests 137, pass 137, fail 0 | eaa3738 |