oficina / mapa Public

Spec: build notes 58-67 and round 3, Fable's final review of 58fd476

Each finding, what changed, its gate and commit. Note 38's "nothing is
lost" is corrected (settling=1), note 56 now holds commits and stores
the typing, note 31's token map refuses when full. Not fixed, and why:
the merged-while-typing conflict with one's own text, an autosave in
flight at close, the marker-only block's marker fight, undo's root.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Paul Campbell pushed by paul@keymail.dev 83ea36062cbb9fbfd93f3ba8d03a1e0a2b95efda parent 766a401
1 file changed, +47 −4
  • docs/superpowers/specs/2026-11-14-mapa-level-up.md +47 −4

CI passed — run details

CI log
=== editor ===
cd editor && npm ci --no-audit --no-fund --loglevel=error

added 16 packages in 386ms
cd editor && node build-bundles.mjs
wrote internal/mapa/static/editor.822bf0c12578e3c5.js (302937 bytes, 94.6KB gzipped; L12 budget 120KB)
cd editor && node --test
✔ L1: mounting then serialising gives cleanBody(body), byte for byte (41.767456ms)
ℹ 760 bodies
✔ L1: mounting a stored body adds nothing, and saving it writes nothing new (63.892482ms)
✔ L2: one edited block changes only that block's bytes; undo gives the body back (104.473609ms)
ℹ 748 single-block edits
✔ L2: inserting or deleting a block changes bytes only at the new seams, by Join (118.84101ms)
ℹ 755 inserts, 715 deletes
✔ L3: seeded edits keep the document and its Markdown saying the same thing (3208.263867ms)
ℹ 18240 edits over 760 bodies
✔ linear: trailing spaces (23.85303ms)
✔ linear: trailing whitespace (15.470005ms)
✔ linear: unclosed web links (16.183408ms)
✔ linear: web links with no address (19.44749ms)
✔ linear: unclosed wiki links (19.572754ms)
✔ linear: unclosed embeds (22.961745ms)
✔ linear: closes only (9.103801ms)
✔ golden file has bodies (0.618336ms)
✔ markup.mjs parses every body into Go's blocks, byte offsets and all (16.194609ms)
✔ markup.mjs strips and spans every block as Go does (24.986891ms)
✔ the schema's toDOM draws every body as Go renders it (45.154278ms)
✔ emphasis draws the four pinned outputs (14.632161ms)
✔ a body ends in the editor's empty paragraph (0.333598ms)
✔ autosave sends only what differs, and the tab owns the draft it wrote (9.714222ms)
✔ an offered draft never commits by itself; Save commits it (0.890311ms)
✔ reload, then close: sessionStorage says the draft is this tab's own (0.408829ms)
✔ closing carries text not yet sent, and the cap leaves it out (24.483127ms)
✔ clean rebase: applied, the caret survives, the base moves by the rebase POST (3.059644ms)
✔ the block under the caret is the teammate's too, and undo brings back yours (2.489296ms)
✔ typing mid-flight: the merge is not applied and the base does not move (1.018849ms)
✔ a merge the editor cannot represent stops after three tries (3.212186ms)
✔ a conflict is shown, locks the editor's own commits, and Resolve settles it (1.136758ms)
✔ leaving: a conflict stays with the choice; a failed flush offers Leave anyway; a stored draft leaves (1.531069ms)
✔ a stale tab shows the newer draft, offered, and never overwrites it (0.824008ms)
✔ the first scratch commit: empty creates nothing, then one page, then drafts on it (0.810113ms)
✔ noBase and gone lead to the existing choices (0.788903ms)
✔ a commit that merged is applied when nothing was typed since (0.951464ms)
✔ back from the cache: nothing unsaved reloads, unsaved text autosaves at once (6.788036ms)
✔ an own draft committed meanwhile goes on as a new draft (1.675336ms)
✔ a reload keeps a stored draft; unsent text still commits (0.552465ms)
✔ a page deleted mid-edit: what is typed is still stored as the draft, and nothing commits (H1) (1.08951ms)
✔ an offered draft committed in another tab: typing goes on as a new draft (H1) (2.709735ms)
✔ a commit reply without a revision is not a commit; an emptied day starts afresh (H2) (0.956774ms)
✔ Resolve stores what was typed first, and takes no typing until its answer is applied (M1) (3.54358ms)
✔ closing with a choice open, or commits held, still writes the text, never commits (M2) (0.972293ms)
✔ closing inside the settling window sends the loaded version with settling=1 (M3) (0.273447ms)
✔ a clean merge not applied because of typing still ends the choice on show (M4) (0.967624ms)
✔ marks: em outside strong, bold reopened around italics, edges outside (4.016609ms)
✔ marks close before code, links and atoms, and reopen after (0.341513ms)
✔ untouched blocks and atoms re-emit their source; edited atoms are written from attributes (4.418032ms)
✔ empty blocks are written as nothing (1.591862ms)
✔ an unclosed fence that is no longer last gets its closing fence (0.979537ms)
✔ the structure check puts Join's seam where a kept one would merge two blocks (1.740779ms)
✔ prepareSave adopts the parse when no seam or rewrite can save the document (2.370196ms)
✔ reparse: typed emphasis becomes a mark, "- " after a break becomes an item (1.508648ms)
✔ a trailing hard break stays on screen and is written as nothing (0.378422ms)
✔ the reparse waits while an IME is composing (0.54998ms)
✔ copied blocks paste with their bytes and seams; a cut and paste gives the body back (2.780245ms)
✔ a forged x-mapa slice is refused, and text from outside is read as Markdown (0.809932ms)
✔ rebuild changes origins only, outside undo history (1.411858ms)
✔ applyBody takes a teammate's block, keeps the caret, and ends untouched (1.206698ms)
✔ a block whose context changed is written again: a task toggled, a bullet, a quote (1.896317ms)
✔ a duplicate ^id typed above its holder never takes the id from it (1.523284ms)
✔ a copy-dragged block is reparsed, and says what its Markdown says (1.077138ms)
✔ a history command that throws is refused, never thrown (3.19306ms)
ℹ tests 60
ℹ suites 0
ℹ pass 60
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 3639.394666
=== vet ===
go vet ./...
go vet -tags browser ./internal/mapatest/
=== fmt ===
=== code ===
go tool rastrillo budget code
The base has no .rastrillo/code.txt: skipping the check that records only go down.
budget code: within the limits.
=== test ===
CGO_ENABLED=0 go test ./...
?   	amadan.net/oficina/mapa/cmd/mapa	[no test files]
ok  	amadan.net/oficina/mapa/internal/mapa	0.520s
?   	amadan.net/oficina/mapa/internal/mapa/icons	[no test files]
ok  	amadan.net/oficina/mapa/internal/mapa/markup	0.057s
ok  	amadan.net/oficina/mapa/internal/mapa/seal	0.002s
ok  	amadan.net/oficina/mapa/internal/mapatest	8.879s
?   	amadan.net/oficina/mapa/scripts/mutate	[no test files]
?   	amadan.net/oficina/mapa/scripts/preview	[no test files]
=== migration-check ===
go tool rastrillo migration check
rastrillo migration check: models and migrations agree
=== credits-check ===
python3 scripts/credits.py --check
credits: checked
diff --git a/docs/superpowers/specs/2026-11-14-mapa-level-up.md b/docs/superpowers/specs/2026-11-14-mapa-level-up.md
index 090c19a..48f9aa5 100644
--- a/docs/superpowers/specs/2026-11-14-mapa-level-up.md
+++ b/docs/superpowers/specs/2026-11-14-mapa-level-up.md
@@ -1,6 +1,6 @@
# Mapa level-up: Contexto with Página's rail, and a page you write on
-**Status:** revision 3, 2026-11-14. APPROVED (Fable approved revision 2 on N1–N5; revision 3 applies them). **Phase 1 and Phase 2 are built** on `design/level-up`, for the final review: not merged, not deployed. §13 records the choices (notes 1–57).
+**Status:** revision 3, 2026-11-14. APPROVED (Fable approved revision 2 on N1–N5; revision 3 applies them). **Phase 1 and Phase 2 are built** on `design/level-up`, for the final review: not merged, not deployed. §13 records the choices (notes 1–67). Fable's final review of `58fd476` (CHANGES REQUIRED, 2 high) is answered on `level-up/review-fixes` (§14, round 3).
- **Round 1.** Claude Fable 5.2 reviewed revision 1 (`4027e10`) and found CHANGES REQUIRED: 4 high, 10 medium and 11 low findings. Revision 2 (`ad06a4e`) answered them.
- **Round 2.** Fable **approved revision 2 on condition** that N1–N5 and its lows go in. This revision makes those changes.
- §14 maps every finding from both rounds to what changed.
@@ -1079,7 +1079,7 @@ Phase 1's choices where this spec was silent, or where the build chose different
28. **A save that changes nothing** reports the outcome it computed: a `Merged` result equal to the current body still answers `merged` with the body, so the tab takes the teammate's text. From a stale tab it is `Kept`. The draft is dropped only if it is still the version the tab held. Restore still mints a revision: it is its own verb.
29. **Resolve's JSON** `outcome` is `saved`, `merged`, `conflicted`, `noBase` or `kept`. A choice that no longer fits (another revision landed, the draft changed, a choice missing) answers `conflicted` with the current `revision` and `body`; no draft at all is the 404 it was.
30. **Make team page's `revision`** is required: none is stale. The refusal asks the person to choose again.
-31. **The first scratch commit (D12) is keyed by a token**, `first=<16–64 of [A-Za-z0-9_-]>` on `POST /scratch`, which the tab draws once for the new page and sends until it learns the page's address. The server keeps (person, token) → page in memory only, for 10 minutes and at most 4,096 at once, and runs the whole create-or-look-up under one lock. So the first request creates the page and answers `{href, page, revision}`; any later one with the token is an autosave of a draft on that page, answered like any autosave plus `{href, page}`; an empty body is 422 `{empty: true}` and creates nothing. Nothing new is stored, so §4 is unchanged. The version check could not key it, because no draft row exists before the page. A token forgotten (past 10 minutes, or across a restart or a CARLOS swap) makes a second page; only a tab still sending its first token that late meets it.
+31. **The first scratch commit (D12) is keyed by a token**, `first=<16–64 of [A-Za-z0-9_-]>` on `POST /scratch`, which the tab draws once for the new page and sends until it learns the page's address. The server keeps (person, token) → page in memory only, for 10 minutes and at most 4,096 at once (past that a new token is refused with 503 `{refused: "busy"}` and makes nothing, note 66), and runs the whole create-or-look-up under one lock. So the first request creates the page and answers `{href, page, revision}`; any later one with the token is an autosave of a draft on that page, answered like any autosave plus `{href, page}`; an empty body is 422 `{empty: true}` and creates nothing. Nothing new is stored, so §4 is unchanged. The version check could not key it, because no draft row exists before the page. A token forgotten (past 10 minutes, or across a restart or a CARLOS swap) makes a second page; only a tab still sending its first token that late meets it.
32. **The island** is on `/p/{id}` (and `/p/{id}/history`, the current page with the panel), `/` and `/d/{date}` written or not, and `/scratch/new`. Its `base` is the page's current revision, `"0"` for a day or page not written yet; `draft.base` is the draft's own. Link keys are the target as typed, with `#^id` for a block. A date's `title` is the day in words; a pending link's is empty. `?saved=1` and a day re-shown after a refused Save carry none: neither is the text the draft continues.
33. **`POST /links/resolve`** takes form fields `target`, each a link key (anything after `|` is ignored). Over 32 is 422 `{refused: "too many"}`. The answer is keyed by each key as sent; a key with no target is left out.
34. **The draft bar** says "You're seeing the saved version" under `?saved=1`, with "Show your unsaved version". "Show the saved version" is left off where nothing is saved yet (an unwritten day) and in the Markdown editor.
@@ -1089,7 +1089,7 @@ Phase 1's choices where this spec was silent, or where the build chose different
36. **The scriptless floor on an unwritten day and on New scratch page** (§6.10). Both now draw the empty page the editor mounts on, with "Edit as Markdown" in the kicker and in View; it opens `/d/{date}/edit` and `/scratch/new?markdown=1`, today's textarea and Save. Without script that is one click more than before on those two screens. The kicker's "Edit" is now "Edit as Markdown" everywhere. The empty-body placeholder is drawn only under `@media (scripting: enabled)`: without script there is nothing to type in.
37. **L5 runs in Chromium only in `make browser`.** rastrillo's harness drives Chromium (chromedp) and has no WebKit driver. The gate reads each block's box from the same page with scripts off (the server's drawing, with its CSS) and again after the mount with scripts on, and records `layout-shift` entries from the start of the load; parsing's end to mount is logged (about 10ms warm here). WebKit was checked by hand with Playwright's WebKit build; the result is recorded where it was run (step 8).
-38. **A reload is a close.** `pagehide` cannot tell a reload from closing the tab: the Navigation API's `navigate` event does not fire for a reload the browser starts. So a reload commits the tab's own draft (D3), and the page it loads can race that commit and still show the draft. The closing request leaves `mapa-closing:<drafts>` in `sessionStorage`; the page it loads, finding that version in its island, asks again by GET (at most eight times, 150ms apart) until the draft is gone, then takes the page's revision as its base. An own draft that autosave finds committed meanwhile (a 409 with `committed`) goes on as a new draft: from the new revision when the page holds exactly the draft's text, otherwise from the old base, so the server's merge keeps a teammate's text. Typing and closing within that settling window sends the text as a new draft (`commit=1`, version 0), so nothing is lost; at worst it meets the person's own committed text as a conflict on the next visit. "Reload, then close" (L9) holds through `sessionStorage` when the reload's own commit could not happen (a conflict).
+38. **A reload is a close.** `pagehide` cannot tell a reload from closing the tab: the Navigation API's `navigate` event does not fire for a reload the browser starts. So a reload commits the tab's own draft (D3), and the page it loads can race that commit and still show the draft. The closing request leaves `mapa-closing:<drafts>` in `sessionStorage`; the page it loads, finding that version in its island, asks again by GET (at most eight times, 150ms apart) until the draft is gone, then takes the page's revision as its base. An own draft that autosave finds committed meanwhile (a 409 with `committed`) goes on as a new draft: from the new revision when the page holds exactly the draft's text, otherwise from the old base, so the server's merge keeps a teammate's text. Typing and closing within that settling window sends the text with the version the page loaded and `settling=1` (note 62): the store takes it whether or not the reload's commit happened, so nothing is lost. (Until review round 3 it went as version 0, which the store refused while the draft still existed: the text was dropped.) At worst it meets the person's own committed text as a conflict on the next visit, kept as the draft. "Reload, then close" (L9) holds through `sessionStorage` when the reload's own commit could not happen (a conflict).
39. **The island carries where the editor saves**: `drafts` (the page's or the day's `…/draft`, or `/scratch` for New scratch page, with `first: true`) and `page`, the public id Resolve's inline choice posts to (left out for a page or day not written yet). `LinkState` gains `alias`, so a chip through an old title is drawn as the server draws it. Neither says anything Bo could not already see of his own pages.
40. **Block shortcuts are input rules; marks are the reparse's.** `# `, `- `, `* `, `+ `, `1. `, `1) `, `[ ] ` in an item, `>`, three backticks or tildes, and `---`, `***`, `___`, `—-` or `–-` turn the block over as they are typed, so the space typed is not trimmed by the reparse writing `- ` back as `-`. `**x**`, `*x*` and `` `x` `` become marks through the reparse rule (D11), and the next letter typed is outside the mark just made. Enter in a quote ends it (a Mapa quote is one block of lines); ⇧Enter is a new line in a paragraph or a quote. Enter after a task item makes an open task, and after a numbered item the next number. A line of only `***` at a block's start is a divider, as Go reads it.
41. **The inline choice locks its blocks twice**: they are drawn `contenteditable="false"`, and a transaction that would change them is filtered out, unless it is the editor's own (a merge applied, Resolve's answer). The choice is posted once every hunk has one.
@@ -1107,9 +1107,26 @@ Phase 1's choices where this spec was silent, or where the build chose different
53. **The accessory row** shows on a coarse pointer under 800px while the page's text has focus, kept above the keyboard by `visualViewport`. While the keyboard covers more than 80px, `<html data-mapa-keyboard>` hides the Links sheet's peek line.
54. **WebKit and the iPhone, by hand.** L5 was run in Playwright's WebKit (playwright-core 1.65, WebKit build 2388): the blocks' boxes with scripts off and on agree on all 24 loads (three widths, light and dark, three team pages and a day); WebKit has no `layout-shift` entries to read. Typing beside chips in WebKit writes what it should. Not checked: a real iPhone (`devicectl` hangs here), so IME composition, dictation and autocorrect beside chips, and the selection callout, still want a check by hand through Safari's Web Inspector.
55. **axe-core 4.10.3 is vendored** in `internal/mapatest/testdata/axe/` (MPL-2.0, its licence beside it) and injected by the gate, which fetches nothing. It is test-only, not in the release build, so the Colophon does not list it.
-56. **The draft bar's "Show the saved version" does not commit.** It is a link inside Mapa, so leaving would commit an own draft first, and `pagehide` would too; a plain click on a link in the bar stops the editor for that page instead, and the draft is left as it was.
+56. **The draft bar's "Show the saved version" does not commit.** It is a link inside Mapa, so leaving would commit an own draft first, and `pagehide` would too; a plain click on a link in the bar holds the editor's commits instead, stores what was typed as the draft, then follows the link (note 61; until review round 3 it stopped the editor, and unsent text was lost).
57. **A new page opens with the caret in its body** (§4.7): the editor takes focus at mount when the page's text is empty, except on a day (the home page), where focus would raise a phone's keyboard on every visit.
+**Fable's final review of `58fd476`** (round 3, §14):
+
+58. **A page deleted mid-edit keeps what is typed** (review round 3, H1). Of the two fixes offered, the editor keeps autosaving the draft and never commits; making the view read-only was the other. Autosaving never loses text: what was typed between the autosave that met the delete and its reply is stored too, and the person can go on writing while they decide. The store accepts the writes (`mayDraft` allows a deleted page's own draft). The save status says "Saved as a draft" (`notices.mjs`, a state estilo's savestatus has no words for), the bar says nothing typed is saved to the page, and its Save as a scratch page and Discard store the typing first and post the version the tab now holds. Leaving inside Mapa goes (the draft is Today's offer); closing writes the draft without `commit=1`. The other stop of the same shape, an offered draft another tab committed (409 `committed`), no longer stops either: the tab shows the page as it now is and typing is a new draft.
+59. **A commit is a reply with a revision** (H2). An emptied draft on an unwritten day commits nothing: `commitDay` drops it if it is still the version the tab held (`DiscardDraft`, a draft write, exempt from gate 8 by name, §5) and the store answers `ErrEmpty`; the handler answers `{saved: false, empty: true, href: "/d/<date>"}` (a form goes to the day). A page deleted under the commit (`ErrPageGone`) answers `{saved: false, gone: true, href: "/"}` and keeps its draft. The saver takes `empty` as a fresh start from version 0, `gone` as note 58's state, and any other answer without `revision` as a failed commit.
+60. **Resolve commits from the text on screen** (M1). Text typed since the conflict's reply is autosaved first, so Resolve's `version` is the draft that holds it; if that reply carries a different choice, it is shown to choose again. While the POST is out the editor takes no typing (the conflict plugin's `isBusy`: a filter on transactions and a cancelled `beforeinput`), so the answer never lands over text it did not include. A reply carrying the same hunks for a newer version keeps the choice on show and what was picked in it.
+61. **Commits held, text still written** (M2). With a choice open, a page deleted (note 58) or commits held (note 56), `pagehide` still writes the text not yet sent, as the draft only, without `commit=1`. Closing sends `prepare()`'s text, the structure check's, as autosave does.
+62. **`settling=1`** (M3; amends note 38). A closing POST from a page still settling carries the version the page loaded and `settling=1`; the store then takes that version or, when there is no draft, a new one, which is all version 0 allowed. When the reload's commit did happen, the new draft starts from the old base, so a block the person extended meets their own committed text as a conflict on the next visit: kept, never dropped (`TestL9ClosingWhileSettlingWritesTheTextEitherWay`).
+63. **Any autosave reply without a conflict ends the choice on show** (M4), including a clean merge left unapplied because of typing; commits are then no longer blocked.
+64. **A fence's info string may hold U+2028 or U+2029** (M5). The editor read the opening line with `.`, which matches neither, and threw at mount; Go reads them as text. Two corpus bodies put U+2028, U+2029, U+0085 and U+FEFF on fence lines, at the top level and in a list.
+65. **The parser's scans are linear, in Go too** (M6). `cleanBody` trims with a loop. The link tests read per-text tables built in one pass (`Scan` in `markup.mjs`, `scan.go`), answering exactly what the regexes and the `]]` search answered (L4 holds the corpus unchanged). Go's `Spans` was quadratic too, and worse: 68 to 117 seconds over 80,000 bytes of unclosed links, on every view of such a page and in the index. `linear.test.mjs` and `TestTheLinkScansAreLinear` hold 80,000 characters of each shape under 750ms; the old code took 5 to 41 seconds in Node and over a minute in Go.
+66. **Lows fixed in round 3.** The view forms' `return` uses `safeReturn`'s rule (no control character at all). The first scratch commit's token map refuses a new token when full instead of forgetting it (note 31). L7 pages the month calendar. The marker rule keeps an `^id` on the block that held it before the edit, so a duplicate typed above never takes it. A copy-dragged block (the very node it copied) is reparsed. Undo and redo are guarded: a step prosemirror-transform throws on is refused.
+67. **Lows recorded, not fixed.**
+ - **A commit that merged while the person kept typing in that block** keeps the old base (today's `mapa.js` rule), so the next commit meets the person's own committed text in that block as a conflict, shown inline; nothing is lost. Note 62's settling draft is the same. The fix wants a three-way merge in the editor against the text sent, or the sent text carried to the server; neither is cheap.
+ - **An autosave in flight when the tab closes.** The closing POST carries the version from before it; when the in-flight write lands first, the close is a stale 409. The in-flight text is stored as the draft and offered on the next visit; what was typed after it was sent (one autosave interval and a round trip at most) is lost unless the tab is restored. Fixing it needs the tab to know the next version before the reply (a version the client draws) or the store to accept the previous one: a protocol change, left. It is the same class of limit as the 64KB keepalive cap.
+ - **The marker and reparse rules still fight over a block whose text is only its marker.** `- ^ab` reads as an item whose text is `^ab` and whose marker is `ab` (Go counts the item's space as the marker's). Duplicated, the marker rule takes the copy's marker and the reparse gives it back, until settle's four rounds run out. Fuzzing L3 with other seeds and 40 steps finds it in 1 to 5 bodies of 760 per seed, at `58fd476` as now. Fixing it means drawing a marker-only block as empty text with a marker, which changes `fromMarkdown` and the serialiser together under L4: left for its own change.
+ - **Undo's root.** Settle's transaction, with the steps that set blocks' origins, is in undo history; inverted and mapped through later edits, such a step can land on a text node. Note 66 guards it; it is not removed.
+
## 14. Findings and what changed
@@ -1164,3 +1181,29 @@ Phase 1's choices where this spec was silent, or where the build chose different
| **L** Leaving inside Mapa when the commit fails or conflicts | A conflict stays on the page with the choice and "Leave and decide later". A failed flush offers "Leave anyway". A stored draft whose commit failed leaves | §6.5, L9 |
| **L** Escape `<` in the JSON island | `encoding/json` escaping, with a `</script>` test | §6.8 |
+### Round 3: Fable's final review of 58fd476
+
+CHANGES REQUIRED, 2 high, answered on `level-up/review-fixes`. Every high and medium has a gate that fails without its fix; each was shown red by reverting the fix.
+
+| Finding | Change | Gate, red without the fix | Commit |
+|---|---|---|---|
+| **H1** A page deleted mid-edit: the editor took text, showed "Saved", stored none of it; the `committed` stop the same | The draft keeps autosaving, nothing commits, the status says "Saved as a draft", the bar's forms store the typing first; an offered draft committed elsewhere goes on as a new draft (note 58) | `saver.test.mjs` H1 ×2; `TestL9APageDeletedMidEditKeepsWhatIsTyped` (browser) | `4cd3176` |
+| **H2** An emptied unwritten day's commit answered saved with no revision; the next text vanished under the stored empty draft | The store drops the held empty draft and answers `{saved: false, empty: true}`; `ErrPageGone` answers `{saved: false, gone: true}`; the saver never takes a reply without `revision` as a commit (note 59) | `TestL9CommittingAnEmptiedDayDropsTheDraft`, `TestL9ACommitOnADeletedPageIsNotSaved`, `saver.test.mjs` H2 | `a61155c`, `4cd3176` |
+| **M1** Resolve's answer overwrote text typed since the last autosave | Autosave first; no typing while the POST is out; the same hunks keep their picks (note 60) | `saver.test.mjs` M1 (red with the old `conflict.mjs` alone too); `TestL9TheInlineChoiceCommitsWhatIsOnScreen` (browser) | `4cd3176` |
+| **M2** Closing with a choice open dropped unsent text; "Show the saved version" too | Draft-only keepalive while commits are held; the bar's link holds, flushes, then goes (notes 56, 61) | `saver.test.mjs` M2 | `4cd3176` |
+| **M3** Note 38's "nothing is lost" was false when the reload's commit had not happened | `settling=1`: the loaded version or none; note 38 corrected (note 62) | `TestL9ClosingWhileSettlingWritesTheTextEitherWay`, `saver.test.mjs` M3 | `a61155c`, `4cd3176` |
+| **M4** A stale clean merge left the conflict set, blocking commits | Any reply without a conflict ends it (note 63) | `saver.test.mjs` M4 | `4cd3176` |
+| **M5** The editor threw at mount on a fence line holding U+2028/U+2029 | dotAll; two corpus bodies (note 64) | L1, L2 on the new corpus bodies | `722f39a` |
+| **M6** `cleanBody` 10s on 80,000 spaces; the link scan quadratic | Linear in the editor, and in Go, which was worse (note 65) | `linear.test.mjs`, `TestTheLinkScansAreLinear` | `3bc0714` |
+| **L** A commit merged while typing in the same block conflicts later with the person's own text | Recorded (note 67) | — | — |
+| **L** First-scratch token map failed open at 4,096 | Refuses (503) before making anything (note 66) | `TestAFullTokenMapRefusesANewPage` | `3df8f5d` |
+| **L** `closing()` sent `current()`, not `prepare()` | `prepare()` (note 61) | — | `4cd3176` |
+| **L** An autosave in flight at close makes the close a stale 409 | Recorded: a protocol change (note 67) | — | — |
+| **L** Undo can throw inside prosemirror-history | Guarded; the root recorded (notes 66, 67) | `serialize.test.mjs` guard case | `766a401` |
+| **L** Marker rule vs reparse over a duplicate `^id`; a copy-drag never reparsed | The keeper is the block that held the id before; copies are reparsed; the marker-only fight recorded (notes 66, 67) | `serialize.test.mjs` ×2 | `1ea4be9` |
+| **L** `localReturn` weaker than `safeReturn` | Uses its rule | `TestLocalReturnRefusesAnythingOffSite` (\v, NUL, DEL) | `3f7fa15` |
+| **L** L7 had no `?month=` case | `TestL7TheMonthCalendarWritesNothing` | (a member row written under `?month=` turns it red) | `6d2a089` |
+| **Gate** L9 had no cases for H1, H2, M1–M3 | Added, Node, Go and browser (above) | — | `a61155c`, `4cd3176` |
+| **Gate** `TestSettleFallsBackToJoinWhenTheBytesWouldNotParse` passed without the structure check | Kept and Join bytes now differ | red with the check removed | `a64af65` |
+| **Gate** "Untouched" ignoring context survived `make ci` | A `serialize.test.mjs` case changes context alone (task, bullet, quote) | red with `checked` dropped from the context key, which L3 misses | `e378892` |
+| **Gate** The accessor's scope mutation was caught through one read | Gate 1 also compares a week alone and a month alone holding the day | all three comparisons differ under the mutation | `f3c0817` |