Skip to content

#1784: the answered and forwarded marks ride the last-verb tag - #2122

Draft
PhillThomas wants to merge 30 commits into
UCSLabs:mainfrom
PhillThomas:split-1784-k
Draft

PhillThomas wants to merge 30 commits into
UCSLabs:mainfrom
PhillThomas:split-1784-k

Conversation

@PhillThomas

@PhillThomas PhillThomas commented Nov 29, 2026 •

Copy link
Copy Markdown

0x1081 is the last verb, not the icon: [MS-OXPROPS]'s PidTagIconIndex is 0x1080 and 0x1081 is PidTagLastVerbExecuted, and the measured values agree — they are [MS-OXOMSG]'s verbs: 102 a reply to the sender, 103 to all, 104 a forward, 108 to the folder. Reply-all was being read as no mark; it is a reply. The answered and forwarded marks ride the tag, under the same naming lesson as the read state. And the flag goes down the way [MS-OXOFLAG] puts it down: the property deleted, not a 0 written behind it — measured, the delete is taken and the flag is gone from IMAP.

Builds on #2121 — 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 #1784.

Human-reviewed, AI-assisted, nobody's mailbox harmed.

@coderabbitai

coderabbitai Bot commented Nov 29, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

@PhillThomas PhillThomas changed the title #1783: a folder page answered too heavy is read in pages asked smaller #1784: the answered and forwarded marks ride the last-verb tag 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
…ured

flag's dates) faults the whole page, like any misspelling — measured on the
lab, a bare 483-byte Client fault with no ResponseCode to learn from. The
sparse shape that survives there asked no flag at all, so what the phone
and the web mail flag never reached the list: the same class of door as the
read state's 0x0E67, a week and a whole mailbox of measuring on.

The read door is the extended tag 0x1090 answered Integer: it rides the
IdOnly base lean, and its value maps with IMAP's \Flagged and the web
mail's own flag — one flag behind three names, not a flag of EWS's own.
It is asked under the extended gate beside 0x0E67, parsed by MAPI's
numbering ([MS-OXOFLAG]: 0 none, 1 worked through, 2 flagged), and answers
only where the schema's own Flag node does not speak: a node that says
NotFlagged says no flag whatever the tag holds. The write side keeps what
it keeps — this server has taken no flag over EWS in any spelling tried,
and it says so in the log once.
Human-reviewed, AI-assisted, nobody’s mailbox harmed.
… no flag family

The read door found earlier has a write side too, and my failed attempt at
it last week was my own misnesting: `ExtendedFieldURI` is a choice element
of `SetItemField` in its own right, not a child of `FieldURI` — written
that way on Kerio 10.0.9, `UpdateItem` answers `NoError`, the flag shows as
IMAP's `\Flagged` and in the server's own web mail at once, and a mixed
update naming `message:IsRead` beside the tag is taken in one call
(measured, both directions round-tripped against the live
server). A server whose schema has no flag family therefore takes the flag
over the tag instead of holding it here; one that refuses even the tag
keeps today's UCSLabs#1349 path: refusal, lesson, flag stays local.

Human-reviewed, AI-assisted, nobody' mailbox harmed.
The server notes said the follow-up flag "isn't read from the server" for
the version families that answer in a schema older than Exchange 2013's.
That was reasoned from the schema fault, never watched on such a server;
the sentence now says which is which. Kerio Connect 10.0.9 patch2 on a
second mailbox joins the seen list, and the flag it answers over its MAPI
tag — read and written, measured both ways — is said as seen, not as
inferred.

Human-reviewed, AI-assisted, nobody's mailbox harmed.
Outlook shows a replied arrow for a message answered on Kerio's web mail,
so its EWS must say so somewhere: not the tags first probed, which never
answer there, but 0x1081, which does — measured, a web mail or
IMAP `\Answered` came back 102 and `\Forwarded` 104. Asked with the other
two MAPI tags under the extended gate; a server that never got the verb
says nothing, which answers false as the field always did. No write door
for the marks was found on that server, so they stay local here, as they
already did.

The extended-property readers now share one tag-lookup; the three tags
asked are clean of each other across the hex and decimal spellings, said
where a fourth must stay clean too.

UCSLabs#1784 (the marks)

Human-reviewed, AI-assisted, nobody' mailbox harmed.
The review of the marks door caught that the measurements had been given
the wrong name: [MS-OXPROPS] 2.738 puts `PidTagIconIndex` at 0x1080 and
0x1081 at `PidTagLastVerbExecuted` — which the measurements agree with,
since its values are [MS-OXOMSG]'s verbs: 102 a reply to the sender, 103
to all, 108 to the folder, 104 a forward. Reply-all was read as no mark;
it is a reply.

Reading the verb is one thing and asking it is another: the tag rides
the extended naming, so a server that refused that never gets asked this
either. And the flag goes down the way [MS-OXOFLAG] puts it down — the
property deleted, not a 0 written behind it: measured on the live
server, the delete is taken, the flag is gone from IMAP, and writing the
number back restores it. A 0 behind a flag would leave whatever the flag
carried (reminders, on a server that has them) answering on.

UCSLabs#1784 (the marks)

Human-reviewed, AI-assisted, nobody's mailbox harmed.

# Conflicts:
#	crates/ews/src/up_tests.rs
@sonarqubecloud

sonarqubecloud Bot commented Dec 1, 2026

Copy link
Copy Markdown

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant