Repository Public MIT
1# Implementation status — ATLAS IA platform23Last updated: 2026-11-22, night (fifth pass: licence and PDF downloads, S09 parity, redesign of the public site, MIT licence of the platform; see « Fifth pass » just below and §4). Legend: **done** (built and verified, evidence in §4) · **partial** (works, with a stated gap) · **not started** · **blocked** (waiting on a decision or on something outside this repository).45**Deployment.** As reported by the lead (not verified from this repository): commit `e78de56` is in production on node m4mm, with the slides of S01–S15 and S17–S21 and the lessons of S01–S05, S07, S09, S10 online. **Nothing of the fifth pass is deployed.** This pass touched no server, DNS record, cluster node, remote PM2 or git remote; commits are local. The runbook is `docs/DEPLOYMENT.md`, « Fifth pass ».67## Fifth pass (2026-11-22, night) — summary89| Item | Status | Evidence / gap |10|---|---|---|11| Licence fields (`license`, `licenseUrl`, `licenseCode`, `licenseDate`) through the importer, the manifest schema and the studio's course form | **done** | `tests/licence-downloads.test.ts`. The committed snapshot carries CC BY 4.0 / MIT: **only its `course` block was updated to match `course.yaml`; the snapshot was not re-imported** |12| Licence into an existing database: `pnpm studio course-licence` (working copy + public plan, identity/author/licence only; idempotent; `--dry-run`, `--force`, `--none`) | **done** | unit tests on a database put back in the previous version's shape; rehearsed on a database **created by the code of `e78de56`** (git worktree) |13| Licence notice on the site (footer, « À propos », « Conditions », FAQ and availability table of the home page, resources, laboratories, session page, viewer), structured data (`license`, published material only) | **done** | e2e: stated on 13 routes, no stale sentence anywhere; attribution line exact. The legal pages still say they were not legally reviewed — true |14| PDF of the slides: the two web exports in the slide pack with checksums, installed as two resources per session, served by `/telecharger/…` | **done** | allowed/denied matrix in unit tests and on a real server (licence absent → 404; slides offline → 404; switch off → 404; on → 200, `application/pdf`, attachment, SHA-256 of the pack); tampered packs refused whole; real repository: the pack holds the two public exports and not `-notes.pdf` |15| The instructor's switch: `pnpm studio slides-download on|off|status`, audited, republishes the session; also the « Téléchargement permis » box in the studio | **done** (CLI) / **partial** (studio) | the studio box is the existing resource editor: **not driven by an e2e test for these resources**; from the studio the change needs a publication of the session |16| Lab starter files, datasets, figure sources as download archives | **not started** | deliberately: nothing half-built. Starter files stay readable on the lesson page, stated to be under MIT; the site says no archive is offered |17| S09 parity after the course's fix (`trace[max(0, len(trace) - fenetre):]`) | **done** | fixtures regenerated from the course code, fix ported, challenge figures 9132 / 5424 / 4749 / 3614 asserted |18| Drift check: are the committed fixtures still what the course's code computes? | **done** | `tests/explorables-drift.test.ts` regenerates every fixture from the course repository into a scratch directory and names the session that moved (shown to fail on S09 with the old fixture). **Fixtures must be regenerated whenever the course's code changes**; the check runs only where the course repository and python3 are present (it does in `test:all` with `ATLAS_COURSE_REPO`) |19| Redesign of the public site (owner's request) | **partial** — see « Redesign » below | brief and system: `docs/DESIGN_SYSTEM.md`; before/after: `docs/screenshots/selection/` |20| Platform source under MIT (`LICENSE` with its scope, `package.json`, README, footer, « À propos ») | **done** | e2e |21| Explorables of S06, S11, S12, S08, S13, S19, S17, S20, S14, S15, S18, S21 | **not started** | the redesign took the remaining budget, in the priority order given by the lead |2223**Redesign — what was done.** Tokens and type for the whole site (one family, Fira Sans, the slides' font; Fraunces removed; refined palette in both themes; no squared-paper background; sentence-case labels; quieter tags; smaller radii; two shadows), so every screen changed. Recomposed screens: **header** (text navigation, search field with its `/` shortcut) and **footer** (credit, licence, source repositories); **home** (hero with a real slide of a published deck and a strip of other sessions, band of six real counts, the S01 explorable usable on the page when its lesson is online, session cards with real slide thumbnails); **programme** (parts as chapters, cards with thumbnails, level and prerequisites, local progress per part; theme tags no longer displayed, still searched); **session page** (breadcrumb, cover slide, offer as a quiet line instead of chips, lesson and step headings); **slide viewer** (scrubber with section marks, one row of compact controls, card shadow); the shared **« À manipuler »** frame for every explorable and diagram.2425**Redesign — what was NOT done, plainly.** The studio, the player page, quiz, glossary, search, learning paths, resources and legal pages inherit the new tokens but were not recomposed, and were not all looked at after the change (looked at: home, programme, a lesson page, a slides-only page, in the captures named in §4). No loading skeletons, no refreshed favicon or social card, no auto-advancing strip, no print review, no previous/next navigation redesign, no designed 500 page. No tablet (834 px) capture was read. A human designer should review: the type scale on long French titles, the light theme's greys on a real screen, the density of the lesson sidebar, the home page below the fold, and the studio.2627**Page weight, before → after** (first load in headless Chromium at 1440 px, local server **without** gateway compression, production-like data with 20 decks and 8 lessons; bytes of document + CSS + JS + fonts + images): home 1 279 → 1 722 kB (fonts −148 kB; +279 kB of slide images, +224 kB of script for the embedded explorable, +72 kB of HTML); programme 1 116 → 1 375 kB (+290 kB of thumbnails, fonts −50 kB); lesson page 2 539 → 2 484 kB; slides-only page 1 989 → 1 916 kB; other pages −60 to −80 kB (fonts). The home page and the programme are heavier, by the pictures of the course they now show; images are lazy and sized. Not measured: through the gateway (compression), on a phone, Core Web Vitals.2829## 1. Phases3031| Phase | Status | Note |32|---|---|---|33| 0 — Reconnaissance | **done** | `docs/ARCHITECTURE.md` §1. |34| 1 — Foundations | **done** | CI workflow written, **never run**. A `.gitignore` defect that kept `src/components/data/` out of git was fixed in this pass, with a guard (`pnpm clean-check`). |35| 2 — Public flagship | **done** | Now rendered on demand from live publications (see `ARCHITECTURE.md` §4). |36| 3 — Learning engine | **done, with the partial items of §3** | Unchanged. |37| 4 — Publishing studio | **done locally, with the partial items of §3 (§12, §13)** | Passkey studio, editorial model, publications, uploads, transcode worker, import/sync, tools. Tested with a virtual authenticator and synthetic media only. |38| 5 — Production hardening | **partial** | Built and tested: migrations, backup/restore drill, export, health, structured logs, security tests, threat model, PM2 file, env template, dependency audit. **Not started**: load tests, monitoring/alerting, scheduled and off-node backups, cost measurement, cross-browser checks of the studio, staging deployment. |39| 6 — Launch | **not started** | — |4041## 2. What the site shows4243- **Public site, as built here**: until a studio database exists, exactly what Phases 0–3 showed — the plan of the 24 sessions, all « À venir », nothing else. Once the studio is used, whatever was published through it, and only that. In this repository nothing real is published: the only publications ever made were made by tests, on throw-away databases, with synthetic media.44- **Development preview** (`ATLAS_PREVIEW=1`): unchanged — S01 of the committed snapshot, the synthetic test capsule, the exercise bench, the 15 diagrams. It never reads the studio database.45- **Studio** (`/admin`): works on any data directory; a fresh one is seeded from the committed snapshot (S01 in « Aperçu », S02–S08 drafts, the rest planned).4647## 3. Status by specification section4849### §2 Brand and design — done50Original vector mark and wordmark (`brand/`), favicon, Apple/PWA icons, social card, tokens (`brand/tokens.json` = CSS, tested), design system with light/dark themes and reduced motion, `docs/DESIGN_SYSTEM.md`. Screenshots at three widths and two themes for every major screen.51*Gap:* the wordmark SVG keeps live text (not outlined). No automated visual regression.5253### §3 Information architecture — done54`/`, `/programme`, `/seances/[slug]`, `/seances/[slug]/regarder`, `/ressources`, `/laboratoires`, `/parcours`, `/glossaire`, `/recherche`, `/a-propos`, `/accessibilite`, `/confidentialite`, `/conditions`; plus `/schemas` and `/schemas/[id]` (diagram library, 404 until a diagram is published) and `/apercu` (preview only, 404 in production). `/admin` (sign-in, enrolment, eight studio screens, private preview). 404 page, empty states, not-yet-published states, permanent redirects (former slugs + editorial list, now resolved at request time). The loading skeleton of Phases 2–3 was removed: pages are now rendered on demand, and under a loading boundary a missing page would have answered 200 instead of 404.55- **partial — offline:** a banner tells the visitor the connection dropped (tested); there is no service worker and no offline page. Nothing is promised offline.56- **partial — 500:** `error.tsx` and `global-error.tsx` exist; no test triggers them.5758### §5 Landing page — done59First screen states what, who, free, no account, where to begin; primary action is « Commencer gratuitement » when a session is open, « Parcourir le programme » when none is (the button does not pretend); fact sheet with counts computed from the manifest; six real outcomes quoted from the course plan; interactive prerequisite map built from the real `depends_on` data (keyboard-reachable, with a list alternative on small screens); entry points; prerequisites and equipment; availability table; instructor credit and non-endorsement notice; FAQ.60*Not present because it does not exist:* a course preview video.6162### §6 Video player — done, with gaps63| Feature | Status | Evidence / gap |64|---|---|---|65| HLS native (Safari) / hls.js elsewhere / MP4 fallback | **done** | engine asserted per browser; fallback test with playlists blocked |66| Adaptive renditions, manual quality (hls.js) | **partial** | 2 renditions, selector tested; adaptation under a throttled network not tested |67| Poster, buffering indicator, error state with retry | **done** | `player.spec.ts` |68| Play/pause, ±10 s, volume/mute, speed 0.5–2×, keyboard shortcuts + help overlay | **done** | `player.spec.ts` |69| Full screen, picture-in-picture | **partial** | implemented (with the iOS native-fullscreen path); **not exercised by any test** |70| French captions (WebVTT), toggle | **done** | journey test |71| Searchable, click-to-seek transcript, current segment highlight, export | **done** | journey + features tests |72| Chapters, bookmarks (local), deep links to a moment | **done** | journey + player tests |73| Resume position, completion at 90 % | **done** | journey test (reload) |74| Theater / focus mode | **done** | player test |75| Notes with Markdown export/import | **done** | features test (export); import path unit-tested |76| « Effacer mes données locales » | **done** | journey test |77| Next/previous session, prerequisites, resource links | **done** | — |78| Several capsules per session | **partial** | list and switching built; only ever exercised with one capsule |79| Slides synchronised or side by side | **not started** | no slide resource exists |80| Download when enabled and licensed | **partial** | rule implemented and unit-tested; no downloadable file exists to exercise it |81| Real iPhone / iPad Safari | **not verified** | only Playwright's desktop WebKit |8283### §7 Session hub — done for what exists84Title, part, number, level, publication state, outcomes, prerequisites and what the session unlocks, effort, capsule list with mandatory/optional and local progress, explicit completion rule, figures with captions and full descriptions, lab instructions, quiz, glossary, narration script (labelled « not a transcript »), references, outline, canonical-URL copy, print summary.85- **partial:** revision history (rendered from the editorial layer; none recorded, so never displayed); delayed release of solutions (`releaseAfter` rule, unit-tested; solutions are not imported at all).86- **not started:** slides PDF, LaTeX sources, datasets, code downloads (no licence; Phase 4). Instructor notes are deliberately never imported.8788### §8 Exercises — done89Nine types: single choice, multiple choice, true/false, ordering, matching, numeric with tolerance, fill-in-the-blank, debugging scenario, self-assessed reflection. Explanations, per-option feedback, retry per question, whole-quiz result with the course's suggested threshold, local-only attempts and history, export/import through the data panel, « quiz formatif » notice. The course repository's quiz YAML is rendered through the adapter (`choix-unique`, `vrai-faux`).90- **not started:** programming exercises with downloadable starters, automated local tests or a browser sandbox. No learner code is executed anywhere.9192### §9 Interactive diagrams — 15 of 15 built, none public93All are keyboard-operable and carry a text equivalent that reflects their state. Listed in preview only: **none has been reviewed by the instructor.**94| # | Diagram | Kind | Model unit-tested | E2E |95|---|---|---|---|---|96| 1 | Tokenisation | computed (3 teaching splitters; counts explicitly method-specific, no real tokenizer) | yes | yes |97| 2 | Attention | computed (scaled dot product, causal mask, softmax; hand-checked) — a calculation table, not a drawn schematic | yes | yes |98| 3 | Context budget | computed (overflow, truncation) | yes | render |99| 4 | Context / memory / retrieval | scripted scenario with toggles | no | render |100| 5 | RAG pipeline + failure modes | stepped flow | no | keyboard |101| 6 | Agent loop | scripted run with a step budget | no | yes |102| 7 | Tool call and permission boundary | policy simulation | no | render |103| 8 | Terminal / shell / process / files | in-browser simulator (8 commands, fictitious files) | yes | yes |104| 9 | Delegation, serial vs parallel | computed | yes | render |105| 10 | MCP roles | stepped flow + role explorer — **wording not checked against the current MCP specification in this session** | no | render |106| 11 | Git branches and review | state machine | yes | yes |107| 12 | Agent evaluation | computed | yes | render |108| 13 | Local vs API hosting | computed from the visitor's own figures (no real price shown) | yes | render |109| 14 | Prompt injection | stepped flow with defences | no | yes |110| 15 | Coding-agent lifecycle | branching path | no | render |111112### §10 Search — done113Local index built from the public view; accent-insensitive; typo-tolerant (Damerau–Levenshtein); prefix matching; AND semantics; facets (type, part, session, level) with counts; highlighted matches; timestamped transcript and chapter hits that open the player at that moment; « concepts associés » in the glossary. No draft, preview or solution content in the production index (tested three ways).114115### §11 Anonymous progress and privacy — done116No account, no cookie, no analytics, no third-party request (all asserted by tests). localStorage only; explained on `/confidentialite`; export, import (merge or replace), clear.117118### §12 Instructor studio — done locally, with gaps119| Capability | Status | Evidence / gap |120|---|---|---|121| Passkey-only sign-in, one-time enrolment token from a CLI, further editors, revocation of passkeys and sessions, roles (owner / publisher / author) | **done** | `studio-auth.test.ts`; e2e tests 1–4, 17–18. Virtual authenticator only — **no real device tested**. |122| Server-side sessions, cookies scoped to `/admin`, CSRF, rate limits, server-side authorisation on every page and API, audit log with before/after references, noindex / no-store | **done** | e2e tests 19–20 (39 routes × anonymous / foreign origin / missing or wrong CSRF; replay; traversal; rate limit), 16 (journal). |123| Learners stay cookie-free | **done** | every anonymous e2e journey asserts an empty cookie jar, including with published content. |124| Dashboard (states, jobs, broken files, schedule, storage, ffmpeg/worker/database health) | **done** | e2e 5, 15; screenshots. |125| Sessions: create, edit metadata, outcomes, prerequisites, order, archive; parts; glossary; bibliography; capsules; chapters | **done** | e2e 6–9, 14; bibliography and parts editors are built but not driven by an e2e test. |126| Markdown editor with live preview, sanitised, highlighted code, LaTeX, accessible tables | **partial** | Markdown (not MDX); **no image or diagram embedding** (images are dropped by design); math only from `$$…$$`. `markdown.test.ts`, e2e 7. |127| Quiz editor with explanations and preview through the public engine | **partial** | form editing for 4 of 9 types; the other 5 through validated JSON. Options are shuffled by the existing engine. |128| Chunked resumable uploads, progress, SHA-256, retry, duplicate detection, type by magic bytes, size limits, storage warning | **done** | `studio-media.test.ts`; e2e 8, 10, 20. Resume and retry are unit-tested at protocol level; the browser's « Reprendre » button is **not exercised by an e2e test**. Largest file tested: 12 MB. |129| Job queue in SQLite + separate worker; ffprobe validation; HLS ladder + MP4 + poster + thumbnails; never upscales; timeouts, bounded concurrency, progress, retry, failure states; masters preserved | **done** | `studio-jobs.test.ts`, `studio-media.test.ts` (real ffmpeg, synthetic 180p/480p sources), e2e 8 (real worker process). Waveforms: **not built**. Timeout path of a hung ffmpeg: implemented, **not exercised by a test**. |130| Captions (WebVTT validation, language), timing preview, transcript import (VTT/JSON), chapters editor | **done** | `studio-captions.test.ts`, e2e 9. |131| Resources: visibility, download permission, licence note, versions, replacement at a stable address, checksum | **done** | `studio-media.test.ts`, e2e 10, 13. « Rétablir une version » is built, **not e2e-tested**. |132| Draft → preview → scheduled → published → archived; private preview from the session; explicit confirmation; version history; rollback; withdrawal | **done** | `studio-publication.test.ts`, e2e 11–15. Archive is unit-tested only. A scheduled entry reaching its time on a running server: unit-tested with explicit dates, **not waited for in e2e**. |133| Publishing without a rebuild | **done** | e2e 12–14: a fresh anonymous context sees each change at the next request. |134| Slug change → permanent redirect | **done** | unit + e2e 14 (308, then 404 after rollback). |135| Import from the course repository: diff, conflict policy, drafts only, confirmation, idempotent; archive upload | **done** | `studio-sync.test.ts`, `studio-archive.test.ts`, e2e 6. Tested on fixture repositories, **not on the live course repository in this pass**. |136| Search-index rebuild, link checker, caption validation in the studio | **done** | e2e 16; external links are counted, never fetched (by design). |137| Backup/restore interface | **partial** | command line only (by design); the studio lists backups and offers the export. |138| Undo | **partial** | rollback of publications; resource versions; no general undo of edits in the working copy. |139140### Slides online (owner's request of 2026-11-22) — done locally, not deployed141| Item | Status | Evidence / gap |142|---|---|---|143| Import of `SXX-web.pdf` / `SXX-web-light.pdf` into per-slide assets for both themes, with index, slide identifier, kind, title, section, text, figure descriptions; hashes, idempotent, path-safe, no execution | **done** | `studio-slides.test.ts` (hand-made PDFs + the real S01); real S01–S10 built: 37–44 slides each, all content frames identified, no warning |144| Asset format | **SVG** per slide and theme + WebP thumbnails | measured: 8.5–10.4 MB SVG per session for two themes, 1.4–1.7 MB gzipped, ≈ 1 MB thumbnails; renders in Chromium and WebKit (e2e). Compression is left to the gateway: **not verified on the gateway** |145| poppler only at import time; output shipped as packs | **done** | `pnpm slides:build` → `SXX-slides.tar.gz`; `pnpm studio slides-import` and a studio upload need Node only. The studio upload of a pack is built, **not driven by an e2e test** (the CLI path is) |146| Viewer on `/seances/[slug]`, and under the player on `/regarder` when a capsule exists | **done** / **partial** | every listed interaction is e2e-tested on the session page; the `/regarder` placement is built but **untested** (no test has both a capsule and a deck) |147| Text alternative per slide, « Version texte », axe both themes, 375 px, reduced motion (no transition at all) | **done** | `e2e/slides.spec.ts`; no screen-reader session was run |148| Search hits that open the slide | **done** | unit + e2e |149| Slides as a separately publishable resource, audit, rollback, leak guarantees | **done** | a `slides` section with its own visibility; `publishSlides` refuses to publish anything else; e2e leak test (404 by every address, search, sitemap) |150| Honest states and counts | **done** | « Diapositives en ligne », offer chips, « Séances avec diapositives en ligne : N sur 24 », still « Séances publiées : 0 » and 0 capsule; `/api/health` keeps `published: 0` |151| Scripted, reversible publication of S01–S10 | **done, rehearsed locally, not run on any server** | `pnpm studio slides-publish S01 … S10` / `slides-unpublish`; see `docs/DEPLOYMENT.md` |152| Speaker notes never public | **done** | never read; tests look for note phrases in decks, blobs, audit, search, pages; `pnpm leak-check` does too when `ATLAS_COURSE_REPO` is set |153| PDF download behind the licence gate | **done by reuse** | offered only for a published « Diapositives » resource with download enabled and a licence; the positive case is **not e2e-tested** |154| Slide ↔ quiz cross-links | **done** (third pass) | see « Interactive lessons » |155156### Interactive lessons (owner's second request of 2026-11-22) — built and tested locally, not deployed157| Item | Status | Evidence / gap |158|---|---|---|159| Lesson model: deck sections (`\AtlasSection`), one step per slide with its text as Markdown (lead, definition, concept, « à retenir », warning, question, list, table, comparison, listing, figure), outcomes covered, glossary terms used, questions checked, explorables placed, lab starter files | **done** | `tests/lessons.test.ts` (pure conversion, fixture repository, real repository). On the real repository: 13–15 sessions built (S01–S13, and those other people marked `implemented` meanwhile), 28–35 steps each, 0 block dropped, every question placed |160| Quality of the converted text | **partial** | read by a person for S01 and samples of S03 and S11 only (third pass). Fourth pass: an automated check (`checkLessonPack`, run by `pnpm lessons:build`, `--strict` to fail) looks for raw LaTeX, macro names, braces, TeX quotes and dashes, empty sections/steps/blocks, dangling references, formulas KaTeX cannot convert and slide references that do not resolve — **0 finding on the 20 packs built from the course repository today (S01–S15, S17–S21)**, asserted by a test on the real repository. It finds residue, not meaning. A second, one-off comparison of each lesson step with the text of its slide in the PDF (S01–S13) showed two silent losses in every session, both fixed: the « Feuille de route » list (`\AtlasRoadmap`, dropped on purpose before) is now a numbered list, and the course-map slide (shared figure `ATLAS-F26`), which gave a step with no content, is now a figure with its caption. **Still not proofread by a person: S02–S19.** Mathematics is now checked for convertibility (KaTeX, same options as the page) but was looked at in a browser only on the sessions listed in §6 |161| Never imported: speaker notes, `\note{}`, lab solution, rubric, narration script | **done** | allow-list of files, links refused, notes stripped before parsing; sentinel tests on fixtures; on the real repository, long lines of every private file searched in every pack; e2e crawl of served pages and search index |162| Quiz `slides:` carried into the quiz format; « Revoir la diapositive » on every checked question; « Lire dans la leçon » from the viewer | **done** | unit + e2e (both directions) |163| Packs: deterministic, hashed, validated at import, private by default, idempotent, studio edits kept unless `--force` | **done** | unit tests incl. tampering |164| Separate publication (`lessons-publish` / `lessons-unpublish`), audit, refusal to release anything else, slides required first | **done** | unit + e2e leak test (S02: lesson imported, not published → nothing by page, search, sitemap, API) |165| Honest states and counts; a lesson without video is « Leçon interactive en ligne », not « Publiée » | **done** | `buildView.lessonOnly`, `counts.lessons`; landing, programme, about, badges; `/api/health` keeps `published: 0`. Fixed on the way: the landing course map labelled slides-only sessions « Publiée » |166| Lesson page: sections, slide text, slide figures, vocabulary, checks, section marks, resume, plan with progress, print rules | **done** | `e2e/lessons.spec.ts` on Chromium, WebKit and 375 px; axe in both themes (closed and with everything opened); screenshots read at 1440 px and 375 px, light and dark |167| Local progress (sections read, check results) in the progress panel, export/import/merge, data panel, « Effacer » | **done** | unit + e2e. The completion rule now includes the lesson sections and says so |168| Search: lesson sections and explorables with deep links; answers and explanations never indexed | **done** | unit + e2e |169| Studio: « Leçon interactive » row, visibility, pack import from the browser | **partial** | built; the browser import and the private preview of a lesson are **not driven by an e2e test** (the CLI path is) |170| Lab: instructions and starter files readable, nothing downloadable (no licence) | **done** | e2e asserts no download link |171| Database | **no migration needed** | the lesson is a section key; upgrade test from a database with slides published (schema, migrations, manifest, history unchanged) |172173**Explorables — 22 built for 8 sessions (S01–S05, S07, S09, S10); S06, S08, S11, S12, S13 and S14–S19 not started.** Each is a TypeScript re-implementation of the session's Python demonstration (one exception, S04, stated below), tested against values produced by that Python code (`tests/fixtures/explorables/`, generator `scripts/fixtures/explorables_fixtures.py`, run on this laptop with Python 3.14.4), keyboard-operated in an e2e test with the numbers of the course, with a text version, at 375 px, axe in both themes. `tests/explorables-registry.test.ts` refuses an explorable whose session has no parity test.174| Session | Explorable (slide it follows) | Parity tests | State |175|---|---|---|---|176| — | Python's `random.Random(seed)`; Python's `split`, `strip`, `\s`, `\b`, `repr`, `json.dumps` where text is compared (`pytext.ts`) | bit-for-bit on 11 seeds; through the session tests | **done** |177| S01 | Mini language model (D16) · Classify or generate (D11) | third pass | **done** |178| S02 | Tokenisation by merges (D07) · Temperature and truncation (D17) · Cost / delay estimator (D21) | third pass | **done** |179| S03 | Attention step by step (D15) · Causal mask and position (D19) | third pass | **done** |180| S04 | Six prompts on the same 12 messages and on the 8 control messages, answer by answer, criterion by criterion (D14) | **the simulated responder is NOT ported**: its 120 answers and their marks are computed by the course's code and shipped as data (`s04-data.ts`); the test checks the data equals what the course computes, and that totals, failures and stop criterion recomputed in TypeScript give the course's matrix (0, 21, 37, 48, 52, 58 / 60). The page says « Réponses enregistrées, modèle simulé » | **done, as recorded data** |181| S05 | Budget of a call: estimate, allocate, overflow, two levers (D12) · Four strategies and compaction on the 12-message history, budget adjustable (D16) · Instruction or data: framing and rule-based detection, with free text (D22) | token rule on 27 texts; the four plans (600, 731, 642, 431); every strategy at every budget 0–270; compaction for 0 to 13 recent messages kept; long document (3 routes, 5 variants); 28 texts for the four patterns with Python's word boundaries; assembled context byte for byte | **done** |182| S07 | Retrieval lab: four methods, top five, freshness trap, citation or refusal with an adjustable threshold, free question (D19) · Measurements: 4 methods × 3 chunkings, rank per question, answers judged apart (D24) | index (779 dimensions, norms, BM25 statistics) and every score to 12 significant digits; rankings exact for 20 questions + 17 free texts × 4 methods and for the two other chunkings; rank fusion with ties; answers, citations and refusals; precision@3 / recall@3 / MRR for 4 × 3 and k = 1, 2, 5; the 20 verdicts (13 / 1 / 3 / 3 / 0) | **done** |183| S09 | Bounded loop, turn by turn: state, rule, plan, action, approval, observation, stop check (D15) · Four policies under adjustable bounds (D21) · Chatbot / fixed workflow / agent on two batches, request by request (D24) | 334 runs (batch × failure × policy × approval × approver × detection × budget × trace window): stop reason, steps, words read, approvals, refusals, world state, and a hash of every trace line; 36 runs compared turn by turn with the state the policy saw; the three tables of the session's README | **done** |184| S10 | Validation playground for `creer_requete` (D09) · Retries with back-off, then the lost response with three clients, on the simulated clock (D18) · Flawed vs careful integration, five design choices to toggle, the cycle of each call (D23) | 712 argument combinations (same errors, same order); 990 calls (failure plan × policy × request × key) attempt by attempt with clock, journal and store; idempotency replay; 288 « days » (5 choices × key × obedience); the session's tables (13 / 4 calls…) | **done** — the session's toy « in the manner of MCP » exchange has no explorable |185| S06 memory store · S11 shell simulator · S12 timeline and lost update · S08 validation funnel and pixel grid · S13 review exercise · S14, S15, S17, S19 | — | — | **not started** |186187Parity is exact where the arithmetic is exact (counts, rationals, seeded draws, the simulated clock rounded to the millisecond); where `exp`, `pow` or `log` are involved it is asserted to 12 significant digits, since JavaScript and Python do not promise the same last bit — the rankings that depend on those numbers are compared exactly and agree. Fixtures total ≈ 2.1 MB in the repository (S09 and S10 store hashes of traces to stay under 1 MB each). What has no explorable inside the sessions done: S02 embeddings / training / parameter counts; S05 the long document (computed and tested, shown only in a text version) ; S07 the cosine by hand and the citation check (computed and tested, not shown); S09 the trace window (`fenetre_trace`, tested, not offered as a control); S10 the toy protocol.188189**S09 trace window (fifth pass).** The defect found in the fourth pass (`trace[len(trace) - fenetre:]` read only the tail of a trace shorter than the window) was fixed in the course repository; the fixtures were regenerated and the TypeScript follows the fixed code (see « Fifth pass »).190191**Library diagrams placed in lessons** (generic, never reviewed by the instructor, not the session's demonstration and not parity-tested; each says so): context/memory/retrieval → S06, RAG pipeline → S07 (kept beside the two S07 explorables: it shows the whole chain and its four failures, which they do not), terminal → S11, delegation → S12. **Withdrawn from lessons in this pass because the session's own explorable supersedes them:** context budget (S05), agent loop (S09) — both stay in the library. A library diagram inside a lesson is now opened by an e2e test (delegation, on a fixture lesson numbered S12): placement after its slide, the « schéma général » notice, keyboard, text equivalent, axe.192193**Operator command (fourth pass).** `pnpm studio lessons-status [--json]` — done, unit-tested (`tests/lessons.test.ts`) and run by the e2e setup on a real data directory (`e2e/lessons.spec.ts`): per session, lesson imported or not, slides online, lesson online (or online in an older version than the pack imported), explorables and how many are parity-tested, generic diagrams.194195### §13 Content integration — done196Canonical manifest schema, adapter/importer (idempotent, hashed, path-safe, never executes repository code, never publishes), committed snapshot as the studio's seed, three-way sync with per-field and per-section base tracking, safe archive extraction.197*Not built:* import of media or resources from the repository (none exist there); compilation of LaTeX (deliberately: PDFs are uploaded as resources).198199### §15 Performance, accessibility, SEO200- **done:** axe on every route × 2 modes × 2 themes + interactive states (0 violation); keyboard tests; reduced motion; self-hosted fonts; axe on 14 studio screens, two editors and a dialog in both themes; sitemap, robots, canonical, `fr-CA`, social card, structured data only for genuinely published content (today: `WebSite` only).201- **changed:** public pages are no longer statically generated (on-demand rendering from the database, see `ARCHITECTURE.md` §4); the effect on response times was **not measured**.202- **not started:** Core Web Vitals budgets and measurement, Lighthouse, constrained-device tests.203- **not done:** manual screen-reader audit.204205### §16 Security — done for what is built; no external review206`docs/SECURITY.md` (controls with their tests, threat model, residual risks). `pnpm audit` (all dependencies), 2026-11-22: no known vulnerability, after pinning KaTeX 0.19.1. Open: worker not sandboxed, CSP keeps `'unsafe-inline'`, no at-rest encryption, gateway not verified.207208### §17 Operations — partial209- **done:** forward-only migrations tested from an empty database; backup (consistent snapshot, resources, caption files, media manifest), restore with checksum verification, a restore drill in the automated tests, retention command, export of all content and metadata; public and token-protected health endpoints (database, content, storage, worker heartbeat, ffmpeg) and `pnpm studio health`; structured logs with redaction; storage accounting and warnings; PM2 ecosystem file; production env template; upgrade runbook for the existing deployment.210- **not started:** scheduled backups, off-node copies, error monitoring, uptime checks, alerting, log shipping, purge of unreferenced media, load tests, cost measurement (only bitrate-based estimates in `VIDEO_PIPELINE.md`).211212### §18 Acceptance criteria213Done: typecheck, lint, build; unit and integration tests; e2e for the anonymous visitor (unchanged) and for the admin journey (authentication, upload, processing, preview, publication, edit, rollback); axe on public and studio screens in both themes; security checks. Not done: manual keyboard/screen-reader audit of the studio, visual regression, performance checks with realistic video, production smoke tests.214215### §20 Documentation — done216README (French), 13 documents under `docs/` rewritten or updated to match what exists, this file, `.env.example`, `.env.production.example`, `ecosystem.config.cjs`.217218## 4. Evidence — last full run (2026-11-22, macOS arm64, Node v26.13.0, pnpm 11.1.2, ffmpeg 8.1.1)219220`pnpm test:all` — result: **exit 0**. It runs, in order:221222| Command | Result |223|---|---|224| `pnpm typecheck` (`tsc --noEmit`, strict) | 0 error |225| `pnpm lint` (`eslint src scripts tests e2e`) | 0 error, 0 warning |226| `pnpm test` (vitest) | **261 passed** in 19 files (13 for the slide decks, incl. poppler builds and the real S01) — 111 from Phases 1–3 (one fixture adjusted, see below) + 137 new: identity, migrations and logs 17, publications 17, sync 13, uploads and media 15 (5 of them with real ffmpeg), archives 26, captions and file types 23, queue and worker 12, backup/restore/export/health 10, Markdown 4 |227| `pnpm build` (Next 16.4.6) | compiled; every content route is now dynamic (ƒ) |228| `pnpm media:test-capsule`, `pnpm build:preview` | as before |229| `pnpm leak-check` | 1 689 sentinel phrases: 0 in `.next`, 0 in the 252 answers of a live production server; positive control: 220 found on the live preview server; no draft content there; no server code or secret marker in `.next/static`; with `ATLAS_COURSE_REPO` set: none of 518 phrases of the speaker notes in the builds or in slide decks |230| `pnpm test:e2e` (Playwright, headless) | **180 passed** in 2.8 min (chromium 116, webkit 17, firefox 6, mobile 16, studio 25) — the 142 of Phases 2–3 (two of them updated: `/admin` exists now) + 25 studio tests + 13 runs of the 8 slide-viewer tests across chromium, webkit and mobile |231| `pnpm secret-scan` | no secret |232| `pnpm clean-check` | no ignored or untracked source file; `git archive HEAD` type-checks alone |233234**Third pass (interactive lessons), 2026-11-22 — `ATLAS_COURSE_REPO=… pnpm test:all`: exit 0.** typecheck and lint clean · vitest **303 passed** in 23 files (261 before; new: lessons 19, S01 + generator 8, S02 11, S03 4) · both builds · leak check: 1 684 sentinel phrases, 0 in production; none of 719 phrases of the speaker notes in 790 files · Playwright **197 passed, 20 skipped by design** (project-specific tests) in 3.3 min — the 180 earlier ones plus `lessons.spec.ts` (6 tests × Chromium, WebKit, 375 px where relevant) and `explorables.spec.ts` · secret scan and clean-checkout check pass. One earlier run of this pass failed on a test of mine (a speaker note and a quiz distractor of S17 share their first 45 characters; the pack does not contain the note — the check now compares 70 characters and undoes YAML quoting).235236**Fourth pass (explorables of S04, S05, S07, S09, S10; text check; `lessons-status`), 2026-11-22 evening — `ATLAS_COURSE_REPO=… pnpm test:all` on commit `b4e974e`: exit 0.** typecheck and lint clean · vitest **360 passed** in 29 files (303 before; new: S04 4, S05 14, S07 13, S09 9, S10 12, registry 3, lessons +2) · both builds · leak check: 1 658 sentinel phrases, 0 in production; none of 817 phrases of the speaker notes in 790 files · Playwright **204 passed, 29 skipped by design** in 3.5 min (197 before; new: five keyboard journeys S04, S05, S07, S09, S10 on the bench, a library diagram inside a lesson, `lessons-status`) · secret scan (348 files) and clean-checkout check (402 files) pass. The commit that follows `b4e974e` changes this file only. One earlier run of this pass failed on a test of mine: the fixture now puts a second lesson online (S12, for the library-diagram test), and the leak test still expected lesson sections of S01 only in the search index; the expectation was corrected to the two lessons that are online.237238**Fifth pass, 2026-11-22 night — `ATLAS_COURSE_REPO=… pnpm test:all` on commit `ee20385`: exit 0.** typecheck and lint clean · vitest **389 passed** in 32 files (360 before; new: licence and downloads 19, drift check 9, S09 window +1) · both builds · leak check: 1 658 sentinel phrases, 0 in production; none of 934 phrases of the speaker notes in 791 files · Playwright **210 passed, 29 skipped by design** in 3.5 min (204 before; new: PDF download matrix on a real server × 3 projects, licence statements × 3 projects) · secret scan and clean-checkout check (410 files) pass. The commits after `ee20385` add this file and the before/after captures only. The first full run of this pass failed on **25 tests, all defects of the redesign, all fixed**: the session number of the « à venir » plate had a contrast of 2.0 (axe, 16 runs), « 0sur 24 » without its space in the figures band (8 runs), a link whose accessible name did not contain its visible text (2 runs). Existing tests changed in this pass, none weakened: `tests/publication.test.ts` and `tests/studio-publication.test.ts` (the snapshot now carries the licence), `e2e/production.spec.ts` (empty-state sentence of `/ressources`), `e2e/slides.spec.ts` and `e2e/lessons.spec.ts` (the PDFs of online slides are now offered and indexed as resources; lab sentence), `e2e/global-setup.ts` (the studio journey starts without a licence, removed with `course-licence --none`; S02's download switched off).239240Looked at by me in the fifth pass (headless Chromium, never the real mouse or keyboard), on a production build over a scratch copy of production-like data (20 real decks, 8 real lessons): home at 1440 px dark and 375 px light; programme at 1440 px light; lesson page of S01 at 1440 px light (header, first sections, a check question, dark crop); slides-only page of S06 at 1440 px dark and light. Corrected after reading: the headline wrapping on three lines, the viewer's controls wrapping on two rows, weak step and question headings.241242Looked at by me in the fourth pass (headless Chromium, never the real mouse or keyboard): every new explorable on the preview bench at 1440 px dark and 375 px light, corrected after reading (tables that scrolled out of sight at 375 px in S05, S07, S10; a wrong sentence in S07 for an answer quoted from the replaced version; a page-wide overflow caused by visually hidden labels inside a scrolling table, fixed in the shared `Scroll`); then, on a production build over a scratch data directory with the real packs, the lesson pages of S03, S04, S05, S07, S09: each explorable sits right after its slide (checked in the DOM), 0 page error, 0 horizontal overflow, KaTeX formulas rendered with no error (10 in S03, 2 in S07), the roadmap list and the course-map figure as intended.243244Existing code and tests changed in the fourth pass: `e2e/helpers.ts` reads `ATLAS_E2E_PREVIEW` (to point the bench tests at a development server while writing; unset in `test:all`); `e2e/lessons.spec.ts` counts (3 decks, 2 lessons online) and the search-index expectation above; `e2e/explorables.spec.ts` accepts the simplification statement of the new explorables; inline bar widths of S02 and of the shared distribution table are rounded to two decimals (the browser rewrote them, which React reported as a hydration mismatch in development); `lesson-tex.ts`: `\AtlasRoadmap` converted instead of dropped, figure identifiers `ATLAS-Fnn` accepted — **every lesson pack therefore has a new hash, including S01–S03**.245246Existing tests changed in the third pass: `tests/studio-slides.test.ts` expects the new « Leçon interactive à venir » chip in the offer list; `e2e/helpers.ts` `setTheme` now takes effect when called a second time in a test — before, the « dark » half of the two-theme axe loops of `slides.spec.ts` ran in the light theme. With the fix all of them pass in a real dark theme.247248Also run: `pnpm audit` → no known vulnerabilities (after a KaTeX override); `pnpm studio enrol | editors | migrate | health | backup` by hand on a scratch directory.249250**Existing tests changed in this pass** (each because the studio now exists or a rule got stricter — none was weakened to pass):251- `tests/publication.test.ts`: the fixture of « allows only keys under a visible capsule » now gives the capsule media paths matching its id; permission follows the files a capsule names, no longer its identifier. Two assertions added.252- `e2e/production.spec.ts`: `/admin` is no longer expected to be a 404 — it must redirect to the sign-in page with noindex and no cookie, and the private API must answer 401; the « real 404 » test uses another address; POST/PUT/DELETE on `/admin` are expected to be redirected (≥ 300) rather than ≥ 404.253- `e2e/shots.spec.ts`: the 404 capture uses `/page-introuvable`.254- `scripts/leak-check.ts`: pages are no longer in the build, so the check now also starts each build and crawls it.255256Defects found by the tests and fixed during this pass: free-space alert computed as a share of the volume (a 94 % full 2 TB disk was « critical »); editor tabs not following the address hash; logo link and capsule headings failing axe; `safeFilename` returning a bare extension for a dot-file name; transitive KaTeX with an advisory; ESLint parsing HLS `.ts` segments of the test data; `.gitignore` hiding `src/components/data/` and the production env template.257258One run in this session failed for an outside reason: the laptop was suspended in the middle of an encode (job requeued by the worker as designed; the test's 120 s wait expired). The rerun passed.259260## 5. Screenshots261262Public pages: unchanged (`pnpm screenshots`). Studio: `e2e/studio.spec.ts` writes 34 full-page captures (14 screens at 1440 px and 834 px, light; three of them in dark) to `e2e/.tmp/studio/shots/` (not committed) and asserts no horizontal overflow. They were read and corrected (storage panel wrapping, a misleading badge label). No studio capture is committed and there is no visual regression test.263264## 6. Not verified265266Fourth pass:267- **The deployment**: nothing of this pass was run on m4mm. The runbook of `DEPLOYMENT.md` (« Fourth pass ») was rehearsed on a scratch data directory on the laptop: real packs of the 20 buildable sessions imported, slides of S01, S03, S04, S05, S07, S09, S10 published, their lessons published, `lessons-status` read, S12 refused as expected (slides not online).268- **Lesson text of S02–S19 by a person**: not proofread. The automated check finds residue of the conversion, not errors of meaning or of French.269- **The owner's review of the explorables**: none was reviewed by the instructor. Wording, choice of defaults and what each one leaves out are mine.270- **Real lesson pages**: those listed in §4 were opened in a headless Chromium at 1440 px (dark) with real content; no real phone, no Safari or Firefox on a real lesson page, no screen reader, no printed page.271- **Explorables in WebKit and Firefox**: the bench runs in Chromium only (desktop and 375 px). The lesson journey of S01 runs in WebKit as before; the new explorables use nothing the S01–S03 ones did not, but that was not exercised.272- **The viewer under the player on `/regarder`**: still no e2e (no test has both a capsule and a deck; it needs a published capsule, which only the studio journey produces). Not done in this pass — not cheap.273- **S04's responder in the browser**: not ported (see the table); typing one's own prompt is therefore not possible, and the page does not suggest it is.274- **Sessions S16, S18, S20, S21** are being written by other people; S18, S20 and S21 build a pack today and pass the automated text check, nothing more was looked at.275- **Page weight**: a lesson page with three explorables was not measured through the gateway.276277Third pass:278- **The deployment**: nothing of the lessons was run on m4mm; the runbook of `DEPLOYMENT.md` was rehearsed on a scratch directory on the laptop only (real S01 and S02 packs, S01 published and looked at).279- **Real lesson pages other than S01**: packs of every implemented session build and validate, but only S01 was opened in a browser with real content. Long sessions, mathematics, wide tables and listings of S02–S13 were not looked at.280- Screenshots: `e2e/.tmp/lessons/shots/` and `e2e/.tmp/explorables/` (written by the e2e run, not committed); no visual regression test.281- Real phones, a screen reader, a printed page (print rules are asserted, the paper result was not looked at), Firefox on lesson pages.282- Page weight of a lesson (≈ 500 kB of HTML for S01 before compression) and render time on the node.283- The studio's browser import of a lesson pack and the private preview of a lesson.284- Sessions that became `implemented` in the course repository during this pass (S14, S17…) build a pack; their slides may not be online, in which case `lessons-publish` refuses them.285286Earlier passes:287288- Everything in the previous list for the public site (real phones and tablets, full screen and picture-in-picture, screen readers, performance, CI workflow).289- **Real passkeys**: Touch ID / Face ID / iPhone / synced keys. Only Chromium's virtual authenticator, on `http://localhost`.290- **The production origin and gateway**: `https://atlas.spboucher.ai` as relying party, Secure cookies over TLS, `X-Forwarded-For`, 4 MiB bodies through Caddy and the tunnel, caching of `/media`.291- **The upgrade of the existing deployment** on m4mm (described in `DEPLOYMENT.md`, never executed), `node:sqlite` on the node's Node version, PM2 with the worker, ffmpeg from Homebrew on the node.292- **Real video**: lecture-length or 4K masters, multi-gigabyte uploads, encode times, the timeout path of a stuck ffmpeg, rotated or variable-frame-rate phone footage, playback of studio-produced streams in Safari.293- **The live course repository**: sync was tested on fixture repositories; the real one was not imported through the studio in this pass.294- Two editors working at once; two workers at once; a scheduled publication reaching its time on a running server; behaviour after days of uptime.295- The studio in Safari and Firefox (Chromium only), on a phone (tablet width only), with a screen reader.296- Response times now that public pages are rendered on demand.297298## 7. Decisions waiting for the owner (blocked items)2993001. **Licence of the course** — decided on 2026-11-22 (content CC BY 4.0, code MIT; platform code MIT). To reach production: the runbook of the fifth pass. Still open: whether lab files, datasets and figure sources are to be offered as archives (mechanism not started).3012. **Review of S01–S08** before any publication (they are drafts / preview in the seed).3023. **Theme tags of unpublished sessions**, **diagram library**, **learning paths and landing copy**, **contact addresses**, **gateway log retention**: unchanged from the first pass.3034. **Wording of `/confidentialite`**: it says « aucun témoin », true for learners; the studio sets a session cookie for signed-in editors under `/admin`. Mention it or not.3045. **Roles**: who, besides the owner, gets a publisher or author role.3056. **Backup policy**: schedule, retention, where the off-node copy of `masters/` goes.3067. **Storage budget** (`ATLAS_QUOTA_GB`) and whether 4K masters should be delivered above 1080p (`ATLAS_LADDER`).3078. **ffmpeg on the production node** (not installed, per the lead).308309## 8. Next actions3103110. **Fifth pass** — lead: runbook « Fifth pass » of `DEPLOYMENT.md` (rebuild the slide packs on the laptop, backup, code, `course-licence`, `slides-import`, `slides-publish`, `slides-download status`). The lesson packs did not change format; a lesson shows the new « À manipuler » frame and typography as soon as the code is deployed. Owner: look at the before/after captures and at the site, and say what still reads as unfinished. Then, in the owner's order: the explorables not started (S06, S11, S12, S08, S13, S19, S17, S20, S14, S15, S18, S21); the screens that only inherited the redesign (studio, player, quiz, glossary, search); lab archives if wanted.3123131. Lead: install ffmpeg on the node if not done, enrol the owner's passkey on a real device.3142. First real recording end to end: upload through the gateway, encode, captions, publish, play on iPhone/iPad; measure sizes and times.3153. Schedule backups with an off-node copy; rehearse a restore on the node.3164. Then Phase 5 remainder: monitoring and alerting, load test of on-demand rendering, purge tool for unreferenced media, worker sandboxing, studio checks in Safari and with a screen reader.317