Repository navigation
docs(id book): cover the mail Worker and the two Worker proofs of concept (#13900) - #13914
Merged
Merged
Conversation
…cept (#13900) The PM-BOOK coverage census (programme #13900) found three ID Workers with no chapter in the id book. Add them, surveyed from source: - reference/mail-worker.md (The mail Worker API): the production mail Worker `mail` in nixos/services/id-mail/worker/ — all four routes (mail.security.cab, mail.id.security.cab, id-mail.security.cab, mail-id.security.cab), the POST contract, bearer/Digest caller auth and the amd (template) / admin (free) grants, MAIL_CONFIG / CALLERS / EMAIL / LIMITER bindings and limits, the full failure-shape table, the host side (id serve --world-mail-command, the rest/worker transports, services.id-mail), and the operator vs publish/promote deployment paths, including that only the operator path acts on the retire list. - reference/worker-poc.md: id-worker-poc, the completed #2271 World Durable Object proof of concept (journal equality vs the native wasmtime host), its routes, journal schema, loader refusals and where its ideas landed. - reference/d1-journal-poc.md: id-d1-journal-poc, the local-only D1 journal fit probe — routes, entry shapes, ordinal allocation, bookmark-vs-cursor limits, and its open design threads (#5681, #5864, #5863). Registered in SUMMARY.md after The hosted Worker API (the id book has no second navigation/manifest gate; SUMMARY.md plus create-missing = false is the whole gate). Cross-linked from The hosted Worker API, The hosted edition, Running a node (new mail Worker operations section), and the Keeping this book current sync contract. Verification: mechanical audit over the book — 106 SUMMARY entries, every file listed, single H1 equal to its SUMMARY text, every internal link resolving with text equal to the target title — 0 problems. mdbook build clean with zero warnings; nix build .#id-docs green with the three new pages rendered.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 28 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
This was referenced Nov 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of the PM-BOOK programme #13900 (lane ID-SIDELINE; coordinator PM-BOOK). The coverage census (
~/workspace/pm-book/coverage-ledger.md, Table A) found three ID Workers with no coverage in the id book (pkgs/id/book). This PR covers all three, surveyed from source with every load-bearing name verified by grepping the repo.New chapters
pkgs/id/book/reference/mail-worker.md— "The mail Worker API" (full chapter; the mail Worker is a real production surface): the Workermailinnixos/services/id-mail/worker/— what it does (address-confirmation and sign-in mail for id), all four routes fromconfig.json(mail.security.cab,mail.id.security.cab,id-mail.security.cab,mail-id.security.cab), the single POST contract, bearer-token auth against SHA-256 digests in theCALLERSsecret, theamd(template mode, 1 recipient) andadmin(free mode, 5 recipients) grants, the two templates and the six-digit{code}match, theMAIL_CONFIG/CALLERS/EMAIL/LIMITERbindings, the configured limits (60 s window, 60 caller, 5 recipient) and the Limiter DO's ordering, the complete failure-shape table (405/500/401/413/400/403/429/502), the host side (id serve --world-mail-command→id-cloudflare-mail, therestvsworkertransports,services.id-mail, the live host'sworkerUrl = "https://mail.security.cab"), its relationship to the hosted Worker (none in code) and to the native directory code that generates and verifies the codes, and operations/deployment (operatorid-mail-deployvs the manual publish/promote workflows, including that only the operator path acts on theretirelist).pkgs/id/book/reference/worker-poc.md— "id-worker-poc: the World Durable Object proof of concept" (honest PoC chapter): the completed id: PoC: one example world running unmodified in a Worker isolate — journal equality vs the native wasmtime host (from #2057) #2271 proof — one unmodified example world in a Worker isolate, journal equality against the native wasmtime host (counter + tic-tac-toe sequences, forced cold starts,compare: PASS (13 steps equal)), the pre-registered differences it never claimed equality over,WORLD/WorldObjectbindings, the/step,/cold-start,/stateroutes, the journal schema, the hosted loader's refusals (64 MiB ceiling,portability=native), its proof commands, and where its ideas landed (evidence for the hosted edition's design; no code carried intoid-hosted-worker, nothing deployed or referenced by production config).pkgs/id/book/reference/d1-journal-poc.md— "id-d1-journal-poc: the D1 journal proof of concept" (honest PoC chapter): the local-only D1 fit probe — placeholder database ID, always--local,/health,/append,/snapshot,/tail, the version-1created/caps_grantedentries, ordinal allocation under the id: F12.13 journal replication (read replicas over a signed stream) #806 single-writer assumption, what it proved (exact-byte storage, ordering, bookmark-carried consistency) and what it explicitly did not (multi-writer, signatures, production replica behaviour; a D1 bookmark is not a stream cursor), and its design threads (design(id): serverless edition storage — D1 vs Turso vs both foridon Cloudflare Workers #5681, id: design: D1 journal fit (design + spike) (from #5681) #5864, id: design: serverless storage contract (from #5681) #5863).Registration and cross-links
pkgs/id/book/SUMMARY.mdimmediately after "The hosted Worker API". The id book has no second navigation/manifest gate like mcpx's compendium — checked: no test or manifest references the book tree;SUMMARY.mdpluscreate-missing = falseinpkgs/id/book.tomlis the whole gate.Verification actually run
.mdlink resolving with link text equal to the target chapter's title — 0 problems. All three workers covered in SUMMARY by exact Worker name.mdbook buildinpkgs/id/: exit 0, zero warnings (log: 3 INFO lines), all three new pages rendered.nix build .#id-docs --print-build-logs(the CI gate derivation): green, only INFO lines from mdBook inside, rendered output containsindex.htmland the three new pages; rendered HTML spot-checked formail.security.cab,id-worker-poc,id-d1-journal-poc.-shaped,reportedly,appears to): none remain as unverified claims.Disagreements found (docs vs code)
config.jsondeclares four:mail.security.cab,mail.id.security.cab,id-mail.security.cab,mail-id.security.cab. The chapter documents all four.DEPLOYMENT.mdsays theretirelist "is not acted on" — true only of the publish/promote workflows it documents. The operator path (deploy.mjs, viaid-mail-deploy) does act on it, retiringid-mailbefore deploying. The chapter scopes both statements to their paths.wrangler.toml. The mail Worker has no Wrangler config file in the repo:config.jsonis the configuration of record, consumed bycloudflare.config.ts(cf CLI) and bydeploy.mjs, which generates.generated/wrangler.json. The chapter states this so readers do not hunt for a file that does not exist.src/worker.tsnamesPOST /stepandPOST /cold-startbut omitsGET /state, which the source header and handler implement. The chapter follows the source and notes the gap.code_mailindirectory_view.rsbuilds exactly the two templated messages). The chapter states the split explicitly.{ "direct_parent": null, "links": [], "lineage": { "design": null, "roadmap_item": null, "priority": null }, "pm_meta": 1, "provenance": { "queue_id": null, "scheduled_start": null, "picked_up_at": null, "work_started_at": null, "created_at": "2026-11-24T00:48:54Z", "session_id": null, "lane": null, "host": "amd", "worktree": "/home/user/wt-id-workers-book", "model": null, "lane_start_issues": [], "workspace_ref": { "kind": "worktree", "id": "/home/user/wt-id-workers-book", "repo": "developing-today/code", "branch": "book/id-workers", "sha": "bb0b439c8ad3bdb9f7a5d757147345d04d378be7" }, "auth_subject": "oc-code-04", "stamped_by": "fleet 0.1.0 (native)" } }Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.