| index b4034f3..7c62482 100644 |
| --- a/native/BUILDING.md |
| +++ b/native/BUILDING.md |
| @@ -164,6 +164,60 @@ re-recorded only with a reason in the branch's discussion. |
| |
| It is not in `.amadan/ci.d`: |
| baselines are exact only on the OS and simulator runtime that drew them |
| -(`ENVIRONMENT` beside them). After an intended change, `record`, read the |
| -contact sheet, and commit the pictures in pushes under about 700 KB: the hub |
| -drops a push whose pack is over about 1 MB. |
| +(`ENVIRONMENT` beside them; today macOS 27.0.0, Xcode 27.2, and the iOS |
| +27.0 runtime 24A434 on an iPhone 18 Pro). Hub CI builds the snapshot tests |
| +but skips them, since they need `RASTRILLO_SNAPSHOTS`. After an intended |
| +change, `record`, read the contact sheet, and push the pictures one commit |
| +per push with `git -c http.postBuffer=209715200 push`: without it the hub |
| +drops a pack over about 1 MB ("unexpected disconnect while reading sideband |
| +packet"), and pushes back to back trip its per-IP limit. Batch |
| +re-recordings: every one stays in the hub's history. |
| + |
| +A screen that hangs the main thread never reaches the kit's own 3 s limit, |
| +so the script stops the Mac test run after `SNAPSHOT_MAC_LIMIT` seconds |
| +(default 300) and gives each iPhone test XCTest's 120 s allowance. |
| + |
| +### Enforcing it |
| + |
| +Nothing but this procedure holds a branch to the gate, so: |
| + |
| +- **Every branch that can change rendering** (the redesign's S1a, S1b and |
| + later, and any fix to the renderer) pastes the whole output of |
| + `native/scripts/snapshots.sh compare all` into its discussion before it |
| + asks for review. The script prints the environment each half drew on. |
| +- **The reviewer re-runs it** on their own checkout (about a minute a |
| + platform once built) and says so in the review. |
| +- **When the environment no longer matches the baselines** (the script says |
| + "ENVIRONMENT DIFFERS": a macOS, Xcode or simulator runtime update), the |
| + failures are drift, not a regression, and can't be told apart from one. |
| + Re-record from `main`, on a branch of its own whose only change is the |
| + baselines, have the contact sheet reviewed, and land it first. Never |
| + re-record on a rendering branch: that would bless whatever the branch |
| + changed along with the drift. |
| +- A rendering fix re-records only the screens it means to change, and its |
| + discussion names them. |
| + |
| +### Known rendering bugs in the baselines |
| + |
| +The editor baselines are today's pixels, bugs included, so that rendering |
| +work can't fix (or break) them by accident. Each fix is its own branch and |
| +re-records only the screens it changes: |
| + |
| +- Lists draw no bullet or number, on the Mac or iOS: `NSTextList` is set |
| + and the items are indented, but no marker is drawn. |
| +- Arabic paragraphs are left-aligned: `NativeTextProjection` sets `.left`, |
| + not `.natural`. |
| +- iPhone and iPad width, paged: the text sits about 72 pt above where the |
| + page's top margin puts it, so it starts at the paper's top edge and stops |
| + well above the page's foot. A paragraph's lines can split across pages |
| + (iOS paginates by line). |
| +- The page label differs: the Mac draws "Page 2" at the first break, iOS |
| + "Page 1" at the foot of page 1. |
| +- iOS draws no bar beside a blockquote; the Mac does. |
| +- In Mac light appearance the desk around the paper is as white as the |
| + paper, so only the dark pictures show the paper's edges and the bands |
| + between pages. |
| +- The iOS editor never finishes opening a document with a list or an |
| + attachment through the real selection binding (an update loop), so |
| + `EditorSnapshots.swift` pins the iOS selection. When that is fixed, the |
| + iOS screens go back to `$model.selection` with their baselines unchanged. |