GPT-6-Astra (Codex), reviewing for session 21a32889.
VERDICT: CHANGES-REQUIRED — needs changes.
Reviewed the native-only stacked diff b403cc3db8ff7e8faf2e0fe4cb90952a4cfb369a...88fa2335bcdbbeb3c9991fb564699418578798c3. The pinned native head is based on the earlier web head, not c6f351b; inherited web defects belong to #83 and must not be restored when this branch is integrated. Read the house brief, AGENTS.md, NO-FOUT.md and this discussion. Worktree: /tmp/docs-fonts-native-review-21a32889. No source edits, commits, pushes or merges.
- P2 — Pasting an ordinary CSS font stack can discard its first supported font.
native/apple/Sources/DocsKit/DocsFonts.swift:221–229, consumed byDocsHTMLClipboard.swift:203–205.family(cssStack:)searches all names for an exact family/Word name before trying any fallback alias. Consequently a later fallback takes precedence over an earlier supported choice. Running the branch's actual resolver against its bundled manifest givesGeorgia→caladea, butGeorgia, Times New Roman, serif→serif; likewiseMenlo, Courier New, monospace→mono, overriding the declared Menlo → JetBrains mapping. HTML paste then stores the wrong font mark, so this changes the document rather than just a preview. Resolve the stack left to right: for each name try the explicit name/twin mapping and then its alias mapping, advancing only if that name is unknown. Add mixed-stack cases to the existing tests. Reproduction source/output:/tmp/docs-fonts-rereview-evidence/native-font-probe.{swift,log}; the probe uses the unchangedDocsFonts.swiftand the branch's actual font resources.
The rest of the requested native checks:
- Bundling/registration:
sync-fonts.py --checkpassed: 16 families / 62 faces match the shared files. Registration is synchronous in the shared app init and the review app init, andfont(...)also registers before use. The tests confirmed every resolved face comes from its bundled file, including the installed-Inter collision case. No name lookup is used in the production face-creation path. - Resolution/default: the shared manifest controls order, default and code family. Carlito is the unmarked/unknown-font default; code wins; known font marks follow manifest precedence; Caveat's absent italic remains upright. Sans retains its own mark, and selecting Carlito clears the font group. These tests passed.
- Pickers: the Mac popup uses attributed titles; the SwiftUI menu and iOS popover use the bundled faces. The picker-entry tests passed. The iOS popover is a reasonable implementation of the own-face requirement; its live behavior was not exercised on the broken simulator.
- Text/IME: both platform text views start with Carlito. The caret typing-font test and the existing marked-text/composition tests passed. The new font-aware typing attributes respect the marked-text guard. This is code and test coverage, not a manual multilingual IME session.
- First frame:
testFirstFrameOfADocumentIsAlreadyInCarlitopassed under bothswift testandxcodebuild: first and settled images match, the text has ink, the runs use Carlito, and the Sans control image differs. - Clipboard: explicit families are emitted in HTML with their Docs class/name, authored native marks are preserved, and the clipboard tests pass. The stack-precedence case above is missing from those tests.
On whether the web should match native foreign-font imports: yes, use one explicit import mapping on both clients, after fixing stack precedence, and keep the web's load-before-paste gate. Calibri → Carlito, Cambria → Caladea and Georgia → Caladea are coherent with the selected palette; unknown names should use Carlito. The actual native code is broader than “everything else becomes Carlito”: it also recognizes all 16 family names, other Word twins, and fallback aliases such as Helvetica and Menlo. Preserve that distinction when deciding the shared mapping. This web parity recommendation is separate from the native bug above.
Validation:
- PASS:
GOTOOLCHAIN=go1.26.5 TMPDIR=/tmp .amadan/ci.d/10-gateon this pinned native head, with OrbStack running. - PASS: this head's Chromium
-tags browser -run 'Font|OnTap'suite. These are the older inherited web tests, not proof that #83's later fixes are present. - Native checks: with the rustup tools selected on PATH,
native/scripts/check-native.shpassed font sync, Rust and wire checks, built the XCFramework and ran Swift tests. 94 XCTest cases, 4 skipped, only the 2 known OfflineDurability failures; all 16 Swift Testing cases passed. The initial attempt selected a different Cargo without its wasm target; selecting the installed rustup toolchain resolved that setup issue. - Mac scheme actually run: from
native/apple,xcodebuild -scheme DocsNative-Package -destination 'platform=macOS' -derivedDataPath /tmp/docs-fonts-rereview-evidence/DerivedData -resultBundlePath /tmp/docs-fonts-rereview-evidence/native-tests.xcresult test. It built and ran the suite, finishing TEST FAILED solely fortestDirectDocumentOpenReportsLostKeyBeforeReadingItsIndexandtestMissingOrCorruptMetadataHoldsOnlyItsLane, both reportingunavailablefrom sealed-store/outbox code. These are the two failures disclosed in the request, not attributed to this branch. I did not independently rerun main's native suite. - No iOS simulator run; its known machine problem remains. Both review worktrees are clean.
Logs, probe and the .xcresult bundle are in /tmp/docs-fonts-rereview-evidence/.