Repository navigation
#1784: Ask the read state the way the server answers it, not the schema's - #2120
Draft
PhillThomas wants to merge 25 commits into
Draft
PhillThomas wants to merge 25 commits into
PhillThomas wants to merge 25 commits into
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
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 29, 2026
… smaller RESPONSE_LIMIT reads no answer over 16 MiB, and Kerio Connect's servlet answers SyncFolderItems with each message's full MIME unless the shape asked is IdOnly (UCSLabs#964): such a page is dropped, its sync state is never adopted, and every run re-asks the same oversized page — one problem every run, forever (UCSLabs#1783). Over a socket the transport refuses the answer first, as BodyTooLarge, which ended the run as "Couldn't reach the server"; both refusals now ask the same page for half as many changes at a time (floor 1), and stay asked that way for the run; a measured Kerio honours MaxChangesReturned. A folder still outweighed at the floor costs one problem, as before, but never the mailbox. Tests: crates/ews/src/big_page_tests.rs. Human-reviewed, AI-assisted, nobody's mailbox harmed.
UCSLabs#1947 took the runner's mapping of the too-long answer into main — so this branch's runner arm and its opening of the `http` module are dropped. What remains is the account setup's own transport mapper, where the merge left the weight untold: it says BodyTooLarge now too, through the predicate UCSLabs#1947 exposes, `mailcraft_net::https::is_too_long`, instead of joining the failures of no known kind. What the setup screen shows is unchanged; the unit test pins the mapping. Tests: apps/mailcraft/src/ews_setup_tests.rs. Human-reviewed, AI-assisted, nobody's mailbox harmed.
…the heavy one's The halved page lasted the whole run: one heavy folder read every folder after it at a page of one to three, and every next run started at 200 again and re-paid the refused asks. The lesson of a heavy answer is that folder's own — each folder now opens at the full page, and only its own refusals shrink it. Measured over the recorded asks: after a halving inbox, the folder behind it is asked at 200 again (UCSLabs#1783, the review, P3). Tests: crates/ews/src/big_page_tests.rs. Human-reviewed, AI-assisted, nobody's mailbox harmed.
…tells a refused weight The heavy-page test deduped before counting, so a message listed twice still passed its assert; it counts the listing as well now. The setup's transport mapper — the arm UCSLabs#1947's merge left out — gets the red test its too-long line needs, next to the garbled answer it must not be confused with. Human-reviewed, AI-assisted, nobody's mailbox harmed.
… line arrives The fragment carried the old org's address where every other fragment uses the checkout's own; and the progress line the review asked for joins the ROADMAP's fragments. Human-reviewed, AI-assisted, nobody's mailbox harmed.
The co-existence of UCSLabs#1783 and UCSLabs#1947 lives in one match's order and guards; a fake transport that refuses every answer pins all three answers down — a read that is not a folder's page keeps its own trouble, a folder's page is asked smaller, a mutation's answer stays lost, outcome unknown — so a later touch of the arms cannot silently undo either story. Human-reviewed, AI-assisted, nobody's mailbox harmed.
… was Human-reviewed, AI-assisted, nobody's mailbox harmed.
The user sees "Couldn't reach the server"; the log saw nothing. Dying on folder one of eight and dying on folder seven are different stories, and right now I'm guessing which one this is (UCSLabs#1784). Human-reviewed, AI-assisted, nobody's mailbox harmed.
…hemselves nowhere Measured on the live mailbox the same afternoon as UCSLabs#1784's light lists: the folder listing names one folder with the id `<id>` — the server's own template placeholder, leaked — and the sync of it is refused every run by a fault whose code we never read, because Kerio writes SOAP faults without the `detail` block Exchange fills: the code sits in `faultcode` (SOAP 1.1) or `Code/Value` (1.2), prefixes and all. So every auto-sync logged "some folders couldn't be read" and nobody could say which folder or why. Three answers: an id carrying markup or spaces is no id — the folder is not listed and never asked about; a fault is read where the server wrote it, and says its own `faultstring` when it names no code; and a single folder faulting an unknown code is that folder's own problem — it goes to the blocked channel, named by the engine once, instead of a generic line and a retry every five minutes forever. Human-reviewed, AI-assisted, nobody's mailbox harmed. # Conflicts: # crates/ews/src/big_page_tests.rs
…nd never asked Folder one of seven was `<id>` — the placeholder a Display leaked into a state long ago — and the server's answer to asking for it was to drop the connection. Every run died there, six folders of unread mail behind a ghost. Such an id joins the read list of nothing; a run that finishes lets the folder list take its state away the way it does for any folder the server doesn't have. The stop-logging from the last commit is what named it (UCSLabs#1784). Human-reviewed, AI-assisted, nobody's mailbox harmed.
One two-byte character straddling byte 200 of an unnamed fault's text panicked the sync thread over a log line: the cut was `said.len().min(200)` bytes, and a slice at a byte inside a character is a panic. The text is the server's to write, so it is cut at two hundred characters now. The test installs a silent logger first: with logging off a `warn!` never evaluates its arguments, and a test without one sleeps straight through the bug (UCSLabs#1784, the review). Tests: crates/ews/src/reply_tests.rs. Human-reviewed, AI-assisted, nobody's mailbox harmed.
… the lesson is its folder's For a server that hangs MimeContent on every change whatever the shape asked (Kerio Connect, UCSLabs#964), one heavy message outweighs any answer and halving the page stalls the folder again behind it, at eight refused 16 MiB reads a run. When a folder has two of its pages refused for size in a row, its list is asked over the `IdOnly` base shape with the fields named: subject, has-attachments, categories, and what a list shows the default to lack (the times, the sender, the size, the importance, the `Message-ID`) — a shape that server measures to answer with the asked properties alone, the bodies then coming as they always do, later and one by one. Under the light shape the page halves once more, and a folder still outweighed costs one problem and no loop. The lesson is the folder's own — forgotten when the next folder starts, like its page: the schema step-downs are the server's, and stay; what a page weighs is one folder's (UCSLabs#1784, from the review and the re-review). Tests: big_page_tests models the server's attaching habit itself (`sends_mime_with_changes`), and the stand-in gives `IdOnly` answers only the named fields as the real ones do; the world whose stall the floor test pinned is inverted — the folder must now read, named fields and all; the duplicate checks count what was listed before they count what was distinct. Human-reviewed, AI-assisted, nobody's mailbox harmed. # Conflicts: # crates/ews/src/big_page_tests.rs # crates/ews/src/run.rs # crates/ews/src/standin.rs # docs/log.d/ROADMAP/progress/1783.md # Conflicts: # crates/ews/src/big_page_tests.rs
…ames the light asking it refuses Measured on the live Kerio: the heavy folders answer the light asking with a bare `faultcode s:Client` and no response code at all, which our reader now names — and which is the light asking's refusal exactly as Exchange's schema code was. The fallback is the same: the folder goes back to the schema shape and halves from the page that taught the size lesson, and the asking is given up for the run after the two probes. The same fault on a page that rides a sync state, with the light asking already off, may mean the server lost that state in words no Exchange would use: the folder is read afresh once, as a named lost state already does. The server blaming itself (`Server`) earns no such trust: it costs the folder its one problem and leaves the state where it is. Human-reviewed, AI-assisted, nobody's mailbox harmed.
…ys how it died Measured: once the conversation fetch starts its thousand asks, the folders asked around it keep dying mid-answer — the run's only remaining errors are collateral of that storm. Two hundred a run: the tail works itself down across runs instead of burning each one. And "an answer this program can't read" was covering for a died-mid-answer it should have said; each shape of failure now says its own name (UCSLabs#1784). Human-reviewed, AI-assisted, nobody's mailbox harmed.
…esh, once Kerio's heavy folders answer a delta with more than the reader can hold — the backlog of read-flag changes is the answer, and no page size shrinks it — while their afresh listings page fine at the same moment. The named doctrine already says a state the server lost is read afresh; an unnamed one that simply can't be told now goes the same way, once, before it costs the run its problem and Phil's desktop its two red lines an hour (UCSLabs#1784, measured). Human-reviewed, AI-assisted, nobody's mailbox harmed.
theory of it. UCSLabs#1784's last folder error outweighed the reader after every lesson the run could teach; the ask that finally lost tells us which weight Kerio can't answer small and where the run had run out of lighter. Human-reviewed, AI-assisted, nobody’s mailbox harmed. # Conflicts: # crates/ews/src/big_page_tests.rs
…r it reads Kerio's last ask for that folder — one message at a time, lightest shape, read afresh already — was still answered past the 16 MB floor, because the servlet hangs whole messages on the list and a monster message is a monster however light you ask. The floor was the folder's death sentence, not the server's will: an answer that is read once in one big read, or never at all. EWS reads to 64 MB now, and the servlet has served more (UCSLabs#964, UCSLabs#1784). Tests: crates/ews/src/big_page_tests.rs. Human-reviewed, AI-assisted, nobody's mailbox harmed.
…and is not followed Kerio's listings can carry no read state at all. The parsers read that as unread, the merge applied it to a folder of read mail, and — seeing the damage as a change made here — would have pushed it to the server. UCSLabs#1784's light pages were one door; a plain listing that stays silent was the other, and the real mailbox walked through it. Parses now report what the answer actually said (`read_said`, `flag_said`), the merge only follows marks the server named, and JMAP's rule is drawn where JMAP draws it: a named wordlist is the server's whole say (empty included), no wordlist is silence. A brand-new message the server said nothing about still lands unread — for a first landing the page is all there is — and it is known to be a guess, not a statement. Human-reviewed, AI-assisted, nobody's mailbox harmed.
…held 0x1081 is `PidTagLastVerbExecuted`, not the icon index — [MS-OXPROPS] 2.738 says so, and the measured values agree: they are [MS-OXOMSG]'s verbs, a reply to the sender and to all, a forward. A verb is derived and not always written, so it says nothing for sends the server never heard of; that is no answer, not "no mark". The marks are said by a word of their own from here: a server that doesn't speak of them holds what is set here, and Graph, which is silent about these marks on a listing, keeps what is set locally instead of clearing it. JMAP says its keywords as it always did. UCSLabs#1784 (the marks) Human-reviewed, AI-assisted, nobody's mailbox harmed.
…ting is silent UCSLabs#1784's silence rule holds an existing message's read state, but a message that lands for the first time in a sent box has nothing to hold — and mail arrives in a sent box already sent and read. Kerio says nothing about the read state on its light lists, its Sent Items came down entirely unread, and the folder's own unread counter on the server said zero the whole time. The guess now follows the server's kind: read in sent boxes, unread elsewhere (new mail is), and a server that does say otherwise — in either direction — is followed as ever. The snapshot agrees to the guess, so nothing invented waits to be pushed. Human-reviewed, AI-assisted, nobody's mailbox harmed. # Conflicts: # crates/engine/src/cmd/search_server.rs
…he schema's Kerio's listings say nothing of the read state over `IsRead` — every shape, measured. Yet Outlook for Mac knows read and flag state on the very same server: it asks the MAI tag, `PR_IS_READ` (0x0E67), as an extended property, and servers like this answer it. The listing asks now name the tag alongside the SOAP property, over every base shape; an answer either way is said, only in words that mean yes or no, and the tag is read however the server quotes it (hex, prefixed or not, or plain 3687). A page answered with items and no read state at all gives the naming up for the run; a refusal of it — a bare fault, on a page asked from nothing — drops it and re-asks. A fault on a page riding a state is never blamed on the naming: that fault belongs to the state, and the read afresh it earns still carries the naming, which is the one place on this server the read state lives (UCSLabs#1784, and Phil's question about Outlook, which was the whole answer). Human-reviewed, AI-assisted, nobody's mailbox harmed.
… is blamed for it Measured on the live Kerio: the MAPI naming of the read state is refused there like a schema property, with the proper response code — and a reader that hands that code to the shape's lesson walks the listing down to the bare shape and starts fetching recipients message by message, a thousand asks, across a server that just wants its list. So a refusal of a page asked from nothing drops the naming first and re-asks; the shape's own lesson comes on the second refusal, one page later, and a Kerio keeps its preview and its recipients. The 2010 world's refusal order moves by the same page, and says so. Human-reviewed, AI-assisted, nobody's mailbox harmed.
…ides a state The state guard belongs to faults in SOAP's own words, where the state is a real suspect. Kerio's refusal of the MAPI naming arrives with a proper response code, on delta pages included — and a reader that waits for the state to be empty first hands the code to the shape's lesson anyway, three pages on. Newest thing on the page, first thing dropped, whichever words the refusal came in; measured and tested both (UCSLabs#1784). Human-reviewed, AI-assisted, nobody's mailbox harmed.
…erything 215 MB between them: a `SyncFolderItems` over the `Default` base answers 287,535,479 bytes — the servlet builds every listed message whole and hangs its MIME on the page — while the same mailbox over `IdOnly` with everything named answers 7,049 bytes and shows the same list. The second ask is not invention: it is Outlook for Mac's legacy ask, captured through a proxy and replayed lean. Naming the properties is what keeps Kerio's answer to the properties; the `Default` base is retired for every shape (UCSLabs#964, UCSLabs#1784). The measurements corrected two more doors we had been blaming on the servlet. `message:IsDraft` is the schema's `item:IsDraft`, and Kerio answers the misnamed one with a bare fault — an old "refuses the light asking" behaviour the asking itself had earned. And the MAPI read-state tag went out bare, `0E67`, which is not a `PropertyTagType` the schema knows: `0x0E67` answers lean in every page (the naming rides the whole run, not the sparse asking alone), while the bare form was measured dropping the connection and the servlet with it. The response parser already read the tag every way servers quote it, so answers land either spelling. The heavy-page machinery stays: it is now the fallback for servers that pad whatever they are named, which no measured server does but several refused to be believed about. `Bare` and the ids asking are now the same bytes, so a `Bare` run takes no fallback — an identical request can teach nothing; the golden test pins that identity, the light base, and the spellings. Human-reviewed, AI-assisted, nobody’s mailbox harmed.
ignored, or answered, and which of these a server does is the server's standing answer to this account — it was being learned per run and forgotten, or learned from a dead connection, which says nothing. It is now an answer like any other from the run: a bare refusal is only proved when the page asked again without the naming comes through — a transient fault wearing the naming's coat dies unproved — and the proved refusal goes up on the result. The engine keeps it on the account against the server that gave it, beside the sync states, and the next request — and the next app start — goes without the naming, until the account moves to another server, which retires the old one's answer on its own terms. A transport failure never says it: a connection that died costs a run, not a lesson, and a server refused by name is refused by name only by the server that said so. Human-reviewed, AI-assisted, nobody’s mailbox harmed. # Conflicts: # crates/engine/src/cmd/ews_mail.rs # crates/engine/src/cmd/ews_mail_tests.rs # crates/ews/src/run.rs # crates/ews/src/standin.rs # Conflicts: # crates/ews/src/big_page_tests.rs
PhillThomas
force-pushed
the
split-1784-i
branch
from
December 1, 2026 23:00
c05774d to
f6cb9ed
Compare
|
This branch has not been deployed
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.



The read state asked the MAPI way: the read tag 0x0E67 (Boolean) asked as an
ExtendedFieldURIinside theBaseShape=IdOnlypages, where older Kerio answers although the SOAP-level flag goes silent. Provenance: how the tag is asked is learned from a proxy capture of our own account's traffic — no third-party code was read — and whether it answers here is measured on the server.The lesson is kept the way the review asked: per account, persisted beside the sync states; a bare refusal is believed only once the page asked again without the naming comes through; a transport failure never sets it; no process-wide flag, no marker file, nothing inferred from a dead connection. A server refused by name is refused by name only by the server that said so — move the account to another server and that one is asked fresh. (Honest limit: the lesson keys on the server address, so an in-place upgrade of the same host keeps it; re-probing upgraded servers is not built here.)
The
Defaultbase retires with it: every shape now asks the light base and names what it needs, as the wire capture asks. #964.Builds on #2119 — draft until it merges; until then its diff also carries the stack below it, which is exactly those PRs, each a clean diff once its own parent is merged.
Part of #964 and #1784.
Human-reviewed, AI-assisted, nobody's mailbox harmed.