calternaldav: CalDAV, WebDAV, reminders, notes, mail and calendar sync (epic, grill first) #543

Open
opened 2026-10-17 16:44:27 +00:00 by kayg · 21 comments
Owner

Decided direction by kayg: B10 (2026-10-13, think about calternaldav as a foundation), Q1b (2026-10-13: DAV clients get app passwords and Installation profiles signed with kayg's Apple Developer ID), L21 and F5 (2026-10-17: our own CalDAV, WebDAV as a plugin inside calternaldav), TQ9 (2026-10-17: reminders, notes, mail and calendar sync, "released in foolproof chunks").

Nothing tracks it. This epic is grill-first: order of chunks, release gates (real Reminders in the simulator, conflicts, 1k tasks per T7/T8), plugin boundaries. Depends on the Tasks and Files grills. Do not build before the ADRs.

Found by the 2026-10-17 decided-but-not-started audit (nothing had an issue, PR or branch). Listed in #174. Grill/ADR rules still apply before foundational code.

Decided direction by kayg: B10 (2026-10-13, think about calternaldav as a foundation), Q1b (2026-10-13: DAV clients get app passwords and Installation profiles signed with kayg's Apple Developer ID), L21 and F5 (2026-10-17: our own CalDAV, WebDAV as a plugin inside calternaldav), TQ9 (2026-10-17: reminders, notes, mail and calendar sync, "released in foolproof chunks"). Nothing tracks it. This epic is grill-first: order of chunks, release gates (real Reminders in the simulator, conflicts, 1k tasks per T7/T8), plugin boundaries. Depends on the Tasks and Files grills. Do not build before the ADRs. Found by the 2026-10-17 decided-but-not-started audit (nothing had an issue, PR or branch). Listed in #174. Grill/ADR rules still apply before foundational code.
Author
Owner

Starting read-only v0 DAV decision extraction. Source branch: dev; base SHA: ebaa86165145f871441efe5ae950c7cfc94cc953. I will write the four requested research files under /home/kayg/Developer/calternal-research/dav-v0 and will not change this repository.

Starting read-only v0 DAV decision extraction. Source branch: dev; base SHA: ebaa86165145f871441efe5ae950c7cfc94cc953. I will write the four requested research files under /home/kayg/Developer/calternal-research/dav-v0 and will not change this repository.
Author
Owner

Finding: v0 does not implement a native CardDAV address book. The DAV router exposes CalDAV routes and /.well-known/caldav only (crates/calternal-dav/src/protocol.rs:682-699, 770-864); the Contacts checkbox was explicitly hidden until Contacts exists (docs/DESIGN.md:3186-3199). The general design listed .vcf as the contact format (docs/DESIGN.md:51-53), while the rewrite owner now directs new contacts to Markdown Notes with format: calternal-contact. So contacts-vcard.md is a rewrite proposal, not a v0 storage decision.

Finding: v0 does not implement a native CardDAV address book. The DAV router exposes CalDAV routes and `/.well-known/caldav` only (`crates/calternal-dav/src/protocol.rs:682-699, 770-864`); the Contacts checkbox was explicitly hidden until Contacts exists (`docs/DESIGN.md:3186-3199`). The general design listed `.vcf` as the contact format (`docs/DESIGN.md:51-53`), while the rewrite owner now directs new contacts to Markdown Notes with `format: calternal-contact`. So `contacts-vcard.md` is a rewrite proposal, not a v0 storage decision.
Author
Owner

Finding: several v0 documents are snapshots, not current contracts. docs/research/file-protocols.md:29-43 says the DAV crate had only Journal CalDAV and no file WebDAV, and its conclusion at :405-416 says no adapter measurement existed; the current crates/calternal-dav/src/files.rs:1-15,418-446 implements file WebDAV with class 1/2 and the route. Likewise, the CalDAV README says alarms are rejected (crates/calternal-dav/README.md:28-33), while the current source retains valid VALARM components (crates/calternal-dav/src/lib.rs:35-37,128-138,310-345). I will mark these as stale claims and use code plus later evidence for current behavior.

Finding: several v0 documents are snapshots, not current contracts. `docs/research/file-protocols.md:29-43` says the DAV crate had only Journal CalDAV and no file WebDAV, and its conclusion at `:405-416` says no adapter measurement existed; the current `crates/calternal-dav/src/files.rs:1-15,418-446` implements file WebDAV with class 1/2 and the route. Likewise, the CalDAV README says alarms are rejected (`crates/calternal-dav/README.md:28-33`), while the current source retains valid VALARM components (`crates/calternal-dav/src/lib.rs:35-37,128-138,310-345`). I will mark these as stale claims and use code plus later evidence for current behavior.
Author
Owner

Finding: v0 had a real Calendar data-loss bug and Apple-specific concurrency failures. The captured matrix reports that an early Calendar DELETE removed child Task/Note lines with the Log line, fixed by the shared reparenting rule (docs/research/apple-caldav-matrix.md:61-62; current rule in docs/DESIGN.md:2822-2832). Apple MOVE and DELETE omit If-Match; strict 428 broke them, and the first compatibility fix left duplicate hrefs until REPORT listed the guessed href as 404 (apple-caldav-matrix.md:61-62). The same matrix records stale VTODO ETags with an old sync token yielding no changes until the feed epoch was rotated (:103-109). These are included as known v0 failures and rewrite tests, with the fixes distinguished from the original failures.

Finding: v0 had a real Calendar data-loss bug and Apple-specific concurrency failures. The captured matrix reports that an early Calendar DELETE removed child Task/Note lines with the Log line, fixed by the shared reparenting rule (`docs/research/apple-caldav-matrix.md:61-62`; current rule in `docs/DESIGN.md:2822-2832`). Apple MOVE and DELETE omit If-Match; strict 428 broke them, and the first compatibility fix left duplicate hrefs until REPORT listed the guessed href as 404 (`apple-caldav-matrix.md:61-62`). The same matrix records stale VTODO ETags with an old sync token yielding no changes until the feed epoch was rotated (`:103-109`). These are included as known v0 failures and rewrite tests, with the fixes distinguished from the original failures.
Author
Owner

Finding: the v0 performance evidence is useful but not a release baseline. The 50,000-entry CalDAV profile missed its 5-second move visibility target (18.349s p95 after the change), and local auth verification measured 5.283s p95 under a loaded shared host (docs/perf/caldav-scale-573.md:13-20,24-36). The DAV App Password cache reduced a local debug warm p95 from 6,241ms to 315ms and cold p95 from 5,995ms to 856ms, but the report says the perf VM lock was busy (docs/perf/runs/2026-10-01-issue-512-app-password-dav.md:1-24,36-38). I will preserve the figures with their host/load caveats, not treat them as rewrite targets without fresh runs.

Finding: the v0 performance evidence is useful but not a release baseline. The 50,000-entry CalDAV profile missed its 5-second move visibility target (18.349s p95 after the change), and local auth verification measured 5.283s p95 under a loaded shared host (`docs/perf/caldav-scale-573.md:13-20,24-36`). The DAV App Password cache reduced a local debug warm p95 from 6,241ms to 315ms and cold p95 from 5,995ms to 856ms, but the report says the perf VM lock was busy (`docs/perf/runs/2026-10-01-issue-512-app-password-dav.md:1-24,36-38`). I will preserve the figures with their host/load caveats, not treat them as rewrite targets without fresh runs.
Author
Owner

Finding: the tested Apple Notes bridge keeps Markdown Notes authoritative and treats each Tag folder as a copy. Apple can show the same UUID in two folders as separate Notes, and a change in one folder does not update the other; the bridge therefore fans edits out and permits only one live UID per UUID per mailbox (docs/research/apple-notes-imap.md:190-199,225-251). Concurrent or ambiguous edits become conflict Notes instead of overwriting source (crates/calternal-imap/README.md:62-75). A flattened table-cell edit initially became a conflict because the visible text lost the Markdown cell boundary; the later fix uses a retained neighboring cell and still preserves both sources when the boundary is unclear (apple-notes-imap.md:488-495,600-601).

Finding: the tested Apple Notes bridge keeps Markdown Notes authoritative and treats each Tag folder as a copy. Apple can show the same UUID in two folders as separate Notes, and a change in one folder does not update the other; the bridge therefore fans edits out and permits only one live UID per UUID per mailbox (`docs/research/apple-notes-imap.md:190-199,225-251`). Concurrent or ambiguous edits become conflict Notes instead of overwriting source (`crates/calternal-imap/README.md:62-75`). A flattened table-cell edit initially became a conflict because the visible text lost the Markdown cell boundary; the later fix uses a retained neighboring cell and still preserves both sources when the boundary is unclear (`apple-notes-imap.md:488-495,600-601`).
Author
Owner

Finding: the Mail proxy still has a separate reliability and scope frontier. An interrupted APPEND was accepted locally but had no upstream receipt; the cause was an uncertain upstream acknowledgement, so replaying it blindly could duplicate a draft. Later recovery uses an operation keyword or a unique exact MIME match (tests/adversarial/mail-sync.md:1174,1203-1207; docs/DESIGN.md:3447-3455). Folder CREATE/RENAME/DELETE remains unsupported (mail-sync.md:970-982), and one native Apple Mail run crashed during mutation while the server stayed ready and the server cause was not established (mail-sync.md:168-179).

Finding: the Mail proxy still has a separate reliability and scope frontier. An interrupted APPEND was accepted locally but had no upstream receipt; the cause was an uncertain upstream acknowledgement, so replaying it blindly could duplicate a draft. Later recovery uses an operation keyword or a unique exact MIME match (`tests/adversarial/mail-sync.md:1174,1203-1207`; `docs/DESIGN.md:3447-3455`). Folder CREATE/RENAME/DELETE remains unsupported (`mail-sync.md:970-982`), and one native Apple Mail run crashed during mutation while the server stayed ready and the server cause was not established (`mail-sync.md:168-179`).
Author
Owner

Finding: two adjacent v0 audit limits matter for a rewrite. The cross-user audit found DAV row reads were User-scoped, but Files change-feed cursors used Instance-wide sequences, exposing gaps tied to other Users' activity; issue #334 tracked that metadata boundary (docs/audits/cross-user-2026-09-28.md:24,28,33,43). A separate review explicitly keeps _calternal/hidden in raw WebDAV Markdown/XMP exports, where an external XMP client may show it as a keyword (review-1153.md:188-196). These are different behaviors: cursor privacy must be fixed at sync-token design, while raw source export is an explicit fidelity choice.

Finding: two adjacent v0 audit limits matter for a rewrite. The cross-user audit found DAV row reads were User-scoped, but Files change-feed cursors used Instance-wide sequences, exposing gaps tied to other Users' activity; issue #334 tracked that metadata boundary (`docs/audits/cross-user-2026-09-28.md:24,28,33,43`). A separate review explicitly keeps `_calternal/hidden` in raw WebDAV Markdown/XMP exports, where an external XMP client may show it as a keyword (`review-1153.md:188-196`). These are different behaviors: cursor privacy must be fixed at sync-token design, while raw source export is an explicit fidelity choice.
Author
Owner

Finding: the latest broad audit retained one unresolved DAV discovery finding: an imported area did not become a Calendar collection, while the focused 100-resource replay passed; the cause was not established (docs/audits/merge-round-9.md:81-89,489-501,545-550). I will document this as an unresolved test result, not claim a code root cause.

Finding: the latest broad audit retained one unresolved DAV discovery finding: an imported area did not become a Calendar collection, while the focused 100-resource replay passed; the cause was not established (`docs/audits/merge-round-9.md:81-89,489-501,545-550`). I will document this as an unresolved test result, not claim a code root cause.
Author
Owner

Finished the read-only v0 extraction. The four deliverables are in /home/kayg/Developer/calternal-research/dav-v0/: decisions.md, critique.md, questions.md, and contacts-vcard.md. They distinguish v0 decisions from the new Contacts-first proposal and include source line citations, the Apple CalDAV matrix, performance evidence, known failures, and a lossless vCard mapping proposal.

Head SHA: ebaa86165145f871441efe5ae950c7cfc94cc953
Gate output: Not run. This was read-only research with no code changes; no build or test gates were invoked. The source worktree remains clean.

Finished the read-only v0 extraction. The four deliverables are in `/home/kayg/Developer/calternal-research/dav-v0/`: `decisions.md`, `critique.md`, `questions.md`, and `contacts-vcard.md`. They distinguish v0 decisions from the new Contacts-first proposal and include source line citations, the Apple CalDAV matrix, performance evidence, known failures, and a lossless vCard mapping proposal. Head SHA: `ebaa86165145f871441efe5ae950c7cfc94cc953` Gate output: `Not run.` This was read-only research with no code changes; no build or test gates were invoked. The source worktree remains clean.
Author
Owner

Starting notes-imap-probe for #543. Feature test only, no product changes or pushes. Branch: none. Base SHA: not applicable (job directory is not a Git checkout). Target: macOS 27 VM macos-01-std on Mac Studio via NetBird SSH. Will test IMAP-backed Notes and preserve raw messages/screenshots, then remove test resources.

Starting notes-imap-probe for #543. Feature test only, no product changes or pushes. Branch: none. Base SHA: not applicable (job directory is not a Git checkout). Target: macOS 27 VM macos-01-std on Mac Studio via NetBird SSH. Will test IMAP-backed Notes and preserve raw messages/screenshots, then remove test resources.
Author
Owner

Decided by kayg in the roadmap doc, 28 Oct (AP1–AP5):

  • AP1: both routes. IMAP notes in calternaldav come first: faster, need no app mockup (only the shared Add iPhone/Mac sheet), and harden the server surfaces the native app's Rust client core will reuse. The native app's Siri index (iOS 27 App Intents / IndexedEntity) follows, lossless.
  • AP2: yes, start in parallel (ticked).
  • AP3 (proposed, not yet ticked): Siri sees exactly what search sees; the existing hidden: frontmatter field keeps blocks/notes out. No new tag.
  • AP4: IMAP notes sync two-way. First a feature test (job notes-imap-probe, macOS 27 VM): which of checklists, tags, links, tables, attachments survive in an IMAP Notes account; then map each losslessly or mark it as can't-round-trip.
  • AP5: test first, build either way (at worst Spotlight indexes the notes, which feeds Siri). Siri itself is checked on kayg's iPhone.

🤖 Generated with Claude Code

Decided by kayg in the roadmap doc, 28 Oct (AP1–AP5): - **AP1:** both routes. IMAP notes in calternaldav come first: faster, need no app mockup (only the shared Add iPhone/Mac sheet), and harden the server surfaces the native app's Rust client core will reuse. The native app's Siri index (iOS 27 App Intents / IndexedEntity) follows, lossless. - **AP2:** yes, start in parallel (ticked). - **AP3 (proposed, not yet ticked):** Siri sees exactly what search sees; the existing `hidden:` frontmatter field keeps blocks/notes out. No new tag. - **AP4:** IMAP notes sync **two-way**. First a feature test (job notes-imap-probe, macOS 27 VM): which of checklists, tags, links, tables, attachments survive in an IMAP Notes account; then map each losslessly or mark it as can't-round-trip. - **AP5:** test first, build either way (at worst Spotlight indexes the notes, which feeds Siri). Siri itself is checked on kayg's iPhone. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Author
Owner

Probe setup evidence: VM macos-01-std is macOS 27.0.1 (26A434); Notes 4.13 (3195); Cua Driver 0.37.0. Dovecot 2.4.5 (0cbb641e3e) downloaded through Nix, but its child processes fail Darwin setrlimit(RLIMIT_DATA) with both 256 MB and unlimited; stopped that process. Switched to pymap 0.36.7 with Python 3.13.15. Verified LOGIN, LIST, and CREATE Notes from an external IMAP client. Server advertises IMAP4rev1, UIDPLUS, MOVE, CHILDREN, IDLE, OBJECTID, MULTIAPPEND. It listens only on Studio's VM NAT interface 192.168.64.1:1143. A disposable VM loopback forward supplies port 143 for Internet Accounts setup. Cua Driver TCC works when launched as its app bundle; direct SSH launch uses the wrong responsible identity. No product changes.

Probe setup evidence: VM macos-01-std is macOS 27.0.1 (26A434); Notes 4.13 (3195); Cua Driver 0.37.0. Dovecot 2.4.5 (0cbb641e3e) downloaded through Nix, but its child processes fail Darwin setrlimit(RLIMIT_DATA) with both 256 MB and unlimited; stopped that process. Switched to pymap 0.36.7 with Python 3.13.15. Verified LOGIN, LIST, and CREATE Notes from an external IMAP client. Server advertises IMAP4rev1, UIDPLUS, MOVE, CHILDREN, IDLE, OBJECTID, MULTIAPPEND. It listens only on Studio's VM NAT interface 192.168.64.1:1143. A disposable VM loopback forward supplies port 143 for Internet Accounts setup. Cua Driver TCC works when launched as its app bundle; direct SSH launch uses the wrong responsible identity. No product changes.
Author
Owner

First confirmed wire finding: Notes 4.13 wrote a 657-byte RFC 822 message for a GUI-created IMAP note. Headers include X-Uniform-Type-Identifier: com.apple.mail-note; X-Universally-Unique-Identifier: 693430CD-FC26-45C4-948F-6BA8097BD332; Content-Type: text/html; charset="us-ascii"; Content-Transfer-Encoding: 7bit; Mime-Version: 1.0 (Mac OS X Notes 4.13 (3195)); Message-Id and X-Mail-Created-Date. HTML is a body with WebKit style attributes and a div for the next paragraph. Saved full raw message and IMAP UID/flags/body-structure metadata in evidence. GUI menu inspection shows Title, Heading, Checklist, Mark as Checked and Table disabled in this IMAP account; standard lists and font commands remain enabled. Still testing actual edits/attachments and reverse-direction behavior; enabled controls alone are not evidence of round-trip support.

First confirmed wire finding: Notes 4.13 wrote a 657-byte RFC 822 message for a GUI-created IMAP note. Headers include X-Uniform-Type-Identifier: com.apple.mail-note; X-Universally-Unique-Identifier: 693430CD-FC26-45C4-948F-6BA8097BD332; Content-Type: text/html; charset="us-ascii"; Content-Transfer-Encoding: 7bit; Mime-Version: 1.0 (Mac OS X Notes 4.13 (3195)); Message-Id and X-Mail-Created-Date. HTML is a body with WebKit style attributes and a div for the next paragraph. Saved full raw message and IMAP UID/flags/body-structure metadata in evidence. GUI menu inspection shows Title, Heading, Checklist, Mark as Checked and Table disabled in this IMAP account; standard lists and font commands remain enabled. Still testing actual edits/attachments and reverse-direction behavior; enabled controls alone are not evidence of round-trip support.
Author
Owner

AP3 decided (kayg, 28 Oct): Siri, Spotlight and Apple Notes (IMAP) see exactly what search sees. Anything carrying the existing hidden: frontmatter property stays out of all of them. Search > "Show all hidden items" only SHOWS hidden items faded in our app; it never removes the property, so they still don't reach Apple Notes or Siri. Only an explicit Unhide (context menu, or the left-to-right swipe) removes the property, and only then does the note sync out and get indexed. Removing a hide must also remove the note from Apple Notes and the index on the next sync.

AP3 decided (kayg, 28 Oct): Siri, Spotlight and Apple Notes (IMAP) see exactly what search sees. Anything carrying the existing `hidden:` frontmatter property stays out of all of them. Search > "Show all hidden items" only SHOWS hidden items faded in our app; it never removes the property, so they still don't reach Apple Notes or Siri. Only an explicit Unhide (context menu, or the left-to-right swipe) removes the property, and only then does the note sync out and get indexed. Removing a hide must also remove the note from Apple Notes and the index on the next sync.
Author
Owner

Confirmed feature results after resolving the self-signed certificate prompt: GUI-created PNG and PDF attachments are both written as multipart/related messages, with HTML application/x-apple-msg-attachment objects referencing MIME Content-IDs. Bold text becomes , and a GUI bulleted list becomes

  • . GUI folder creation writes Notes/Probe Folder; dragging a child folder into it renamed the mailbox to Notes/Probe Folder/Probe Child.

    Reverse direction matters: an externally APPENDed HTML note rendered its heading, HTML checkbox inputs, table, web link, note-scheme link and CID image in the IMAP editor. The new note appeared at the first GUI observation about 1.1 seconds after APPEND. These HTML controls are distinct from Notes' disabled native Checklist/Table authoring commands. Editing that imported note in Notes produced new UID 116, replacing external UID 115; preservation details and checkbox semantics are being checked.

    Externally supplied HTML rendered in IMAP Notes

    Folder and subfolder tree

Confirmed feature results after resolving the self-signed certificate prompt: GUI-created PNG and PDF attachments are both written as multipart/related messages, with HTML application/x-apple-msg-attachment objects referencing MIME Content-IDs. Bold text becomes <b>, and a GUI bulleted list becomes <ul><li>. GUI folder creation writes Notes/Probe Folder; dragging a child folder into it renamed the mailbox to Notes/Probe Folder/Probe Child. Reverse direction matters: an externally APPENDed HTML note rendered its heading, HTML checkbox inputs, table, web link, note-scheme link and CID image in the IMAP editor. The new note appeared at the first GUI observation about 1.1 seconds after APPEND. These HTML controls are distinct from Notes' disabled native Checklist/Table authoring commands. Editing that imported note in Notes produced new UID 116, replacing external UID 115; preservation details and checkbox semantics are being checked. ![Externally supplied HTML rendered in IMAP Notes](https://git.kayg.org/attachments/925adb14-2529-4acc-babe-3bf636f57ece) ![Folder and subfolder tree](https://git.kayg.org/attachments/1a9458cd-5fa0-4ec0-9330-578a6ba12ee8)
Author
Owner

Further measured results: external replacement preserved the note UUID, changed UID 114 to 117, and appeared in the GUI at the first observation (under 1 second after the external command returned). Editing the externally supplied rich HTML in Notes changed UID 115 to 116 and preserved its heading, table, links, and PNG bytes; Notes normalized the table with tbody and rewrote img into an attachment object.

HTML checkbox limitation: the second checkbox visibly became checked when clicked, but after editing text and saving, its serialized input still had no checked attribute. The original first checkbox retained checked="". Rendered checkbox state is therefore not a lossless native checklist representation.

Conflict probe: GUI edit finished at 16:57:47.876 UTC; external APPEND completed 0.169 seconds later, replacing UID 118 with 119. Notes then wrote UID 120 with the GUI edit and removed the competing server version. After 14 seconds there was one note, with the GUI marker and no server marker; no duplicate or conflict dialog. This is one observed pending-local-edit race, not a claim about all conflict orderings.

Spotlight: mdfind returned no note records for either the IMAP note or the On My Mac control, after excluding the job's own evidence files. A text-file positive control was indexed and found, and mdutil reports indexing enabled. The test shows no mdfind discoverability for either note account in this VM; it does not establish that Spotlight's separate UI/Core Spotlight cannot search them.

Further measured results: external replacement preserved the note UUID, changed UID 114 to 117, and appeared in the GUI at the first observation (under 1 second after the external command returned). Editing the externally supplied rich HTML in Notes changed UID 115 to 116 and preserved its heading, table, links, and PNG bytes; Notes normalized the table with tbody and rewrote img into an attachment object. HTML checkbox limitation: the second checkbox visibly became checked when clicked, but after editing text and saving, its serialized input still had no checked attribute. The original first checkbox retained checked="". Rendered checkbox state is therefore not a lossless native checklist representation. Conflict probe: GUI edit finished at 16:57:47.876 UTC; external APPEND completed 0.169 seconds later, replacing UID 118 with 119. Notes then wrote UID 120 with the GUI edit and removed the competing server version. After 14 seconds there was one note, with the GUI marker and no server marker; no duplicate or conflict dialog. This is one observed pending-local-edit race, not a claim about all conflict orderings. Spotlight: mdfind returned no note records for either the IMAP note or the On My Mac control, after excluding the job's own evidence files. A text-file positive control was indexed and found, and mdutil reports indexing enabled. The test shows no mdfind discoverability for either note account in this VM; it does not establish that Spotlight's separate UI/Core Spotlight cannot search them.
Author
Owner

Attachment byte validation found an important PDF edge case. The GUI-attached ASCII PDF fixture was 599 bytes. Notes sent it as application/pdf with Content-Transfer-Encoding: 7bit, converting every LF to CRLF; the decoded server part is 631 bytes and exactly equals that newline conversion. qpdf 12.3.2 reports the original has no syntax or stream encoding errors; the Notes-emitted PDF reports "file is damaged", "xref not found", and reconstructs the cross-reference table. The PDF is offered and stored, but this fixture does not survive byte-for-byte. Do not generalize this to ordinary binary PDFs, which were not tested.

Both the GUI-attached PNG and the externally imported PNG after a Notes edit retained exactly the original 209 bytes (SHA-256 c29de0e15931b2082f795ce5449c0ede5763159f08b3958c7a5fc4e567b2ce58).

Typing a web URL in this IMAP editor left plain URL text on the wire in this configuration; externally supplied HTML anchors rendered and survived editing. Typing >> left literal escaped text, with no native note-link picker. Native Title, Heading, Checklist, Table and Pin commands remained unavailable.

Cleanup verified: test Internet Account removed; local Spotlight control note permanently deleted; temporary certificate and trust removed; IMAP server and VM forward stopped; macos-01-std restored to stopped. Only evidence remains in the two remote job directories. Notes automatically switches to an empty On My Mac account when its last Internet Account is removed.

Attachment byte validation found an important PDF edge case. The GUI-attached ASCII PDF fixture was 599 bytes. Notes sent it as application/pdf with Content-Transfer-Encoding: 7bit, converting every LF to CRLF; the decoded server part is 631 bytes and exactly equals that newline conversion. qpdf 12.3.2 reports the original has no syntax or stream encoding errors; the Notes-emitted PDF reports "file is damaged", "xref not found", and reconstructs the cross-reference table. The PDF is offered and stored, but this fixture does not survive byte-for-byte. Do not generalize this to ordinary binary PDFs, which were not tested. Both the GUI-attached PNG and the externally imported PNG after a Notes edit retained exactly the original 209 bytes (SHA-256 c29de0e15931b2082f795ce5449c0ede5763159f08b3958c7a5fc4e567b2ce58). Typing a web URL in this IMAP editor left plain URL text on the wire in this configuration; externally supplied HTML anchors rendered and survived editing. Typing >> left literal escaped text, with no native note-link picker. Native Title, Heading, Checklist, Table and Pin commands remained unavailable. Cleanup verified: test Internet Account removed; local Spotlight control note permanently deleted; temporary certificate and trust removed; IMAP server and VM forward stopped; macos-01-std restored to stopped. Only evidence remains in the two remote job directories. Notes automatically switches to an empty On My Mac account when its last Internet Account is removed.
Author
Owner

Finished notes-imap-probe for #543. Feature test only; no product changes, pushes, merges or deployments. Head SHA: not applicable (no Git checkout or commits).

Full result.md · Raw messages and metadata · Gate output

The tested IMAP editor offers plain text, bold, standard lists, image/PDF attachments, folders and nested folders. Native Title/Heading, Checklist, tags, note links, Table, drawing controls and pinning are unavailable. Externally supplied rich HTML can still render headings, tables, checkbox inputs, anchors and images, and most of it survives a Notes text edit.

Two losslessness limits were reproduced: clicking an imported HTML checkbox changes its display but loses that changed checked state on save/reselect; the 599-byte ASCII PDF became 631 bytes through LF-to-CRLF conversion in a 7bit MIME part, damaging xref offsets. PNG payloads stayed byte-identical. Typed URLs remained plain text in this configuration, while imported HTML anchors persisted.

Updates replace messages with new UIDs while retaining the note UUID. External creation and replacement appeared at first observations within 1.13 and 0.97 seconds respectively. In the tested race, Notes' pending local edit removed the competing server version; one note survived, with no conflict dialog. mdfind found neither IMAP nor local note records, although a file positive control worked; Spotlight UI behavior remains untested.

The report includes exact versions, all feature rows, raw header/MIME/HTML samples, timings, conflict evidence and bridge mapping limits. Local evidence is about 18.2 MB at /home/kayg/codex-jobs/notes-imap-probe/evidence/. Test account, local control note, certificate trust and services were removed. Both remote job directories contain only evidence. The VM was restored to stopped. The issue remains open.

Checkbox immediately after clicking and editing:

Second HTML checkbox visibly checked

After reselecting the saved note:

Second HTML checkbox reverted to unchecked

Native IMAP format menu:

Disabled native controls in IMAP Notes

Gate output verbatim:

PASS: 20 final RFC 822 samples and MIME metadata saved
PASS: note identity headers present in every final sample
PASS: both PNG attachment paths preserve all 209 bytes
PASS: ASCII PDF change reproduced exactly: 599 bytes to 631 by LF-to-CRLF conversion
PASS: qpdf validates original PDF and detects damaged xref after Notes serialization
PASS: imported heading, table, links and image references survive a Notes text edit
PASS: saved HTML preserves original checkbox attributes, not the transient second-box click
PASS: bold HTML and external replacement retained under the original note UUID
PASS: GUI bulleted list reaches the wire as ul/li
PASS: GUI-created folder nesting reaches the IMAP mailbox hierarchy
PASS: one conflict survivor: GUI pending edit, UID 120, no server marker
PASS: Spotlight file positive control found; note-query results recorded separately
PASS: test account, local control note and certificate trust removed
PASS: both test listeners stopped and VM restored to stopped
PASS: remote job directories contain only evidence
PASS: evidence below 50 MB (18184770 bytes at validation)
HEAD SHA: not applicable; no Git checkout or product changes
RESULT: probe complete; limitations and adverse findings documented
Finished notes-imap-probe for #543. Feature test only; no product changes, pushes, merges or deployments. Head SHA: not applicable (no Git checkout or commits). [Full result.md](https://git.kayg.org/attachments/31813979-6271-4813-87cc-662e60a36210) · [Raw messages and metadata](https://git.kayg.org/attachments/e474f897-b52a-484b-8e73-40a82a099cbc) · [Gate output](https://git.kayg.org/attachments/d30bef5d-361d-49cb-afd0-a916ebab7f22) The tested IMAP editor offers plain text, bold, standard lists, image/PDF attachments, folders and nested folders. Native Title/Heading, Checklist, tags, note links, Table, drawing controls and pinning are unavailable. Externally supplied rich HTML can still render headings, tables, checkbox inputs, anchors and images, and most of it survives a Notes text edit. Two losslessness limits were reproduced: clicking an imported HTML checkbox changes its display but loses that changed checked state on save/reselect; the 599-byte ASCII PDF became 631 bytes through LF-to-CRLF conversion in a 7bit MIME part, damaging xref offsets. PNG payloads stayed byte-identical. Typed URLs remained plain text in this configuration, while imported HTML anchors persisted. Updates replace messages with new UIDs while retaining the note UUID. External creation and replacement appeared at first observations within 1.13 and 0.97 seconds respectively. In the tested race, Notes' pending local edit removed the competing server version; one note survived, with no conflict dialog. mdfind found neither IMAP nor local note records, although a file positive control worked; Spotlight UI behavior remains untested. The report includes exact versions, all feature rows, raw header/MIME/HTML samples, timings, conflict evidence and bridge mapping limits. Local evidence is about 18.2 MB at /home/kayg/codex-jobs/notes-imap-probe/evidence/. Test account, local control note, certificate trust and services were removed. Both remote job directories contain only evidence. The VM was restored to stopped. The issue remains open. Checkbox immediately after clicking and editing: ![Second HTML checkbox visibly checked](https://git.kayg.org/attachments/4fdc4e56-a353-437c-8dd1-fda4c0a5896a) After reselecting the saved note: ![Second HTML checkbox reverted to unchecked](https://git.kayg.org/attachments/42f86c4f-dfe6-4cf3-81a6-eb9da992a5ea) Native IMAP format menu: ![Disabled native controls in IMAP Notes](https://git.kayg.org/attachments/1e2e81fb-635d-4425-9006-50e44f816af5) Gate output verbatim: ```text PASS: 20 final RFC 822 samples and MIME metadata saved PASS: note identity headers present in every final sample PASS: both PNG attachment paths preserve all 209 bytes PASS: ASCII PDF change reproduced exactly: 599 bytes to 631 by LF-to-CRLF conversion PASS: qpdf validates original PDF and detects damaged xref after Notes serialization PASS: imported heading, table, links and image references survive a Notes text edit PASS: saved HTML preserves original checkbox attributes, not the transient second-box click PASS: bold HTML and external replacement retained under the original note UUID PASS: GUI bulleted list reaches the wire as ul/li PASS: GUI-created folder nesting reaches the IMAP mailbox hierarchy PASS: one conflict survivor: GUI pending edit, UID 120, no server marker PASS: Spotlight file positive control found; note-query results recorded separately PASS: test account, local control note and certificate trust removed PASS: both test listeners stopped and VM restored to stopped PASS: remote job directories contain only evidence PASS: evidence below 50 MB (18184770 bytes at validation) HEAD SHA: not applicable; no Git checkout or product changes RESULT: probe complete; limitations and adverse findings documented ```
Author
Owner

iPhone check by kayg, 28 Oct 23:27 IST (iOS 27, real device): Siri finds notes stored in an IMAP (non-iCloud) Notes account. Asked about the made-up word, Siri answered "I found two notes about Raycast: 'zubrovka finds spotlight in the raycast' and …", i.e. it searched the IMAP note's text and returned it alongside an iCloud note. So IMAP notes sync from Calternal gives Siri context over Calternal notes, before any native app exists.
Also confirmed on the phone: the IMAP note editor shows a typed "- [ ] test" as plain text, not a checklist, matching the macOS probe (no native checklists in IMAP accounts; Calternal must write checkboxes as HTML).

iPhone check by kayg, 28 Oct 23:27 IST (iOS 27, real device): **Siri finds notes stored in an IMAP (non-iCloud) Notes account.** Asked about the made-up word, Siri answered "I found two notes about Raycast: 'zubrovka finds spotlight in the raycast' and …", i.e. it searched the IMAP note's text and returned it alongside an iCloud note. So IMAP notes sync from Calternal gives Siri context over Calternal notes, before any native app exists. Also confirmed on the phone: the IMAP note editor shows a typed "- [ ] test" as plain text, not a checklist, matching the macOS probe (no native checklists in IMAP accounts; Calternal must write checkboxes as HTML).
Author
Owner

Design plan ready for review: Plan: Apple Notes over IMAP (#543), into dev from docs/imap-notes-plan.

docs/plans/0543-imap-notes.md covers the requested sizes, reversible Markdown/HTML mapping with a private versioned companion, IMAP IDLE/CONDSTORE/QRESYNC and UID validity, pending-edit conflicts preserved in server history, echo suppression, hidden-content exclusion, operation budgets, failure cases, per-device app passwords, tests and ordered slices. Scale tests are required in the first code PR; real Apple Notes acceptance runs on macos-01-std before release.

The macOS 27 findings are explicit constraints: checkbox state is read-only, attachments use base64 and decoded-byte verification, and Apple replacement deletes cannot discard newer server work. The two-second online gate includes actual client fetch/render and MIME bytes, with Apple debounce and slow-link limits stated.

Validation: documentation-only scope and local links checked; git diff --cached --check passed; temporary A4 rendering fits four pages at 10.5-point text. No product code, builds, native tests or deploys. Head: a4230326.

Design plan ready for review: [Plan: Apple Notes over IMAP (#543)](https://git.kayg.org/kayg/calternal/pulls/766), into `dev` from `docs/imap-notes-plan`. `docs/plans/0543-imap-notes.md` covers the requested sizes, reversible Markdown/HTML mapping with a private versioned companion, IMAP IDLE/CONDSTORE/QRESYNC and UID validity, pending-edit conflicts preserved in server history, echo suppression, hidden-content exclusion, operation budgets, failure cases, per-device app passwords, tests and ordered slices. Scale tests are required in the first code PR; real Apple Notes acceptance runs on macos-01-std before release. The macOS 27 findings are explicit constraints: checkbox state is read-only, attachments use base64 and decoded-byte verification, and Apple replacement deletes cannot discard newer server work. The two-second online gate includes actual client fetch/render and MIME bytes, with Apple debounce and slow-link limits stated. Validation: documentation-only scope and local links checked; `git diff --cached --check` passed; temporary A4 rendering fits four pages at 10.5-point text. No product code, builds, native tests or deploys. Head: `a4230326`.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kayg/calternal#543
No description provided.