10 lines
1.7 KiB
Markdown
10 lines
1.7 KiB
Markdown
# Mail result framing
|
|
|
|
Source opcode 0x239 previously accepted a bare 12-byte MAIL_ITEM_TAKEN result and emitted native success without the required source item/count fields. Tortoise SendMailResult always writes those eight bytes for action 2, including non-equipment failures. Only equipment errors substitute a four-byte equipment result. Making the item/count read unconditional for action 2 rejects incomplete confirmations through the existing parser error path.
|
|
|
|
The existing mailbox fixture gains 76 assertions: complete success and non-equipment failures, all truncated prefixes, a trailing-byte rejection, recovery after malformed input, equipment-error framing and the other supported commands. It fails on the unchanged runtime with “truncated take-item result must not become a native confirmation” and passes with the changed translation object, together with its previous mailbox cases. Full native packet bytes are compared, including opcode, lengths, quantity and attachment identity. Native MailCommandResult::Write supplies the reference field order; no new native-reader/live acceptance is claimed.
|
|
|
|
The discarded source item field remains discarded intentionally: HandleMailTakeItemOpcode supplies item_template, despite the serializer parameter's misleading item_guid name. The existing native attachment identity is the mail record ID; this change does not replace it with a template number. No equipment-result mapping, command enum, mailbox lifecycle or user UI policy changes.
|
|
|
|
Native rebuild required; no codec or content change, no client action. The receipt pins source references and reused host libraries. Integration validation follows the next combined runtime boundary.
|