procurement-ingest/lambdas/po/email_processor/tests/fixtures/ai-fallback/non-coupa-03.eml
Adam Moussa 14fad0c317
Add offline PO parser suite with scrubbed fixture corpus
132 tests: golden-file comparison for all 25 positive fixtures
(17 single-line new-PO + 8 cancellations, Decimal-exact via
parse_float=Decimal), every fail-closed gate reason code covered
(body-level triggers via 17 synthetic adversarial .eml mutations,
candidate-level via direct validate() unit tests), real multi-line
and comment/non-Coupa fallback fixtures, dual line-ending parse
identity, two-path enrich/save parity (site-extractor stream
guard), V10 URL-id corpus sweep, fixture hygiene (ses_auth pass +
scrub-marker leak sweep), and Bedrock dispatch/EMF assertions.

The suite loads handler/template_parser via importlib under
unique module names and binds the handler's bare sibling imports
around exec (tests/conftest.py load_handler gets the same
treatment) -- the WO suite caches bare 'handler'/'template_parser'
names in sys.modules, and bare imports here would silently bind
to the wrong pipeline. moto is imported before the handler so its
botocore stubber hook precedes boto3 session creation (the PO
conftest chain now loads at pytest session start).

Fixtures are scrubbed real S3 samples: transport/auth header
values replaced with same-shape placeholders (structure kept so
ses_auth still passes), per-file digit ciphers, amounts remapped
with sum==total re-established. The .gitignore exception is
scoped to the PO fixtures path only.

Refs: #99
2026-07-16 15:15:49 -04:00

221 lines
14 KiB
Text

Return-Path: <0101abcdef012345-abcdef01-2345-6789-abcd-ef0123456789-6789ab@corpmail.amazon.com>
Received: from a87-201.smtp-out.us-west-2.amazonses.com (a87-201.smtp-out.us-west-2.amazonses.com [203.0.113.25])
by inbound-smtp.us-east-1.amazonaws.com with SMTP id fixture0123456789fixture0123456789fixtur
for amazon_po@int.seahaven.com;
Mon, 11 May 2026 11:17:26 +0000 (UTC)
Received-SPF: pass (spfCheck: domain of corpmail.amazon.com designates 203.0.113.25 as permitted sender) client-ip=203.0.113.25; envelope-from=0101abcdef012345-abcdef01-2345-6789-abcd-ef0123456789-6789ab@corpmail.amazon.com; helo=a87-201.smtp-out.us-west-2.amazonses.com;
Authentication-Results: amazonses.com;
spf=pass (spfCheck: domain of corpmail.amazon.com designates 203.0.113.25 as permitted sender) client-ip=203.0.113.25; envelope-from=0101abcdef012345-abcdef01-2345-6789-abcd-ef0123456789-6789ab@corpmail.amazon.com; helo=a87-201.smtp-out.us-west-2.amazonses.com;
dkim=pass header.i=@amazon.com;
dkim=pass header.i=@amazonses.com;
dmarc=pass header.from=amazon.com;
X-SES-RECEIPT: ScrubbedFixturePlaceholderTokenValue0123456789QqZzXxJjKkWwYyVvScrubbedFixturePlaceholderTokenValue0123456789QqZzXxJjKkWwYyVvScrubbedFixturePlaceholderTokenValue0123456789QqZzXxJjKkWwYyVvScrubbedFixturePlaceholderTokenValue0123456789QqZzXxJjKkWwYyVvScrubbedFixturePlaceholderTokenValue0123456789QqZzXxJjKkWwYyVvScrubbedFixturePlaceholderTokenValue0123456789QqZzXxJjKkWwYyVvScrubbedFixturePlaceholderTokenValue0123456789QqZzXxJjKkWwYyVvScrubbedFixturePlaceholderTokenValue0123456789QqZzXxJjKkWwYyVvScrubbedFixturePlaceholderTokenVal==
X-SES-DKIM-SIGNATURE: a=rsa-sha256; q=dns/txt; b=ScrubbedFixturePlaceholderTo+kenValue01234+56789QqZzXxJjKkWwYyVvScrubbedFixturePlaceholderTokenValue/0123456/789QqZzXxJjKkWwYyVvScrubbed/Fixt+urePl+aceholderTokenValue0123=; c=relaxed/simple; s=224i4yxa5dv7c2xz3womw6peuasteono; d=amazonses.com; t=1778498246; v=1; bh=Scr/ub/bedFixturePl/aceholderToke/nValue012=; h=From:To:Cc:Bcc:Subject:Date:Message-ID:MIME-Version:Content-Type:X-SES-RECEIPT;
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple;
s=fp22v4ed7aly6ls6xiqgsijz4v7vy4iw; d=amazon.com; t=1778498245;
h=Cc:Content-Type:Date:From:In-Reply-To:Message-Id:Mime-Version:References:Subject:To;
bh=Scr/ub/bedFixturePl/aceholderToke/nValue012=;
b=ScrubbedFixturePlaceholderTokenValue0123456789QqZ+zXxJjKkWwYyVvS
crubbedFixturePlaceholderTokenVal/ue0123456789QqZzXxJjKkWwYyVv/Scru
bbedFixturePla+ceholderTokenValue0123456789QqZzXxJjKkWwYyVvScrubbed
FixturePlaceholderTokenValu+e0/123456789QqZzXxJjKkWwYyVvScrubbedFix
turePlaceholder/TokenValue012/3456789QqZzXxJjKkWwYyVvScrubbedFixtur
ePlacehold==
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple;
s=hsbnp7p3ensaochzwyq5wwmceodymuwv; d=amazonses.com; t=1778498245;
h=Cc:Content-Type:Date:From:In-Reply-To:Message-Id:Mime-Version:References:Subject:To:Feedback-ID;
bh=Scr/ub/bedFixturePl/aceholderToke/nValue012=;
b=ScrubbedFixturePlaceholderTokenValue01234567+89QqZzXxJjKkWwYyVvS
crubbedFixturePlaceho+lderTokenVa/lue0/1/23456789/QqZzXxJjKkWwYyVvS
crubbedFixturePlaceholderTokenValue01234=
Accept-Language: en-US
Arc-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amazon.com; dmarc=pass action=none header.from=amazon.com; dkim=pass header.d=amazon.com; arc=none
Arc-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ScrubbedFixturePlaceholderTokenValue0123456=; b=ScrubbedFixturePlaceholderTokenValue0123456789QqZzXxJjKkWwYyVvScrubbedFixturePlaceholderTokenValue0123456789QqZzXxJjKkWwYyVvScr/ubbedFixturePlaceholderTokenValue0123456789QqZzXxJjKkWwYyVvScrubbedFixturePlaceholderTok+enValue0123456789QqZzXxJjKkWwYyVvScrubbedFixturePlaceholderTokenValue0123456789QqZzXxJjKkWwYyVvScrubbedFixturePlaceholderToke==
Arc-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ScrubbedFixturePlaceholderTokenValue0+123456789QqZzXxJjKkWwYyVvS+crubbedFixturePlaceholderToke+n/Value0123456789QqZzXxJjKkWwYyVvScrubbedFixturePlaceholderT+oken+Value0123456789QqZzXxJjKkWwYyVvScrubbedFixturePlaceholderTokenValue0123456789QqZzXxJjKkWwYyVvScrubbed/FixturePlaceholderTokenValue0123456789QqZzXxJjKkWwYyVvScrubbe/dFi+xturePlaceh/o==
Authentication-Results: amazonses.com; spf=pass (spfCheck: domain of amazon.com designates 203.0.113.25 as permitted sender) client-ip=203.0.113.25; envelope-from=prvs=58402a35e=user158@amazon.com; helo=iad-out-005.esa.us-east-1.outbound.mail-perimeter.amazon.com; dmarc=pass header.from=amazon.com;
Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amazon.com;
Cc: "Reed, Andrew" <user835@amazon.com>
Content-Language: en-US
Content-Type: multipart/related; boundary="_005_SA3PR18MB5650CD69CB4F3448A25E4309C6382SA3PR18MB5650namp_"; type="multipart/alternative"
Date: Mon, 11 May 2026 11:17:25 +0000
From: "Bellwood, Max" <user158@amazon.com>
In-Reply-To: <user906@SA3PR18MB5650.namprd18.prod.outlook.com>
Message-ID: <abcdef0123456789-abcdef01-2345-6789-abcd-ef0123456789-abcdef@us-west-2.amazonses.com>
Mime-Version: 1.0
Received-Spf: pass (spfCheck: domain of amazon.com designates 203.0.113.25 as permitted sender) client-ip=203.0.113.25; envelope-from=prvs=58402a35e=user158@amazon.com; helo=iad-out-005.esa.us-east-1.outbound.mail-perimeter.amazon.com;
References: <user338@SA3PR18MB5650.namprd18.prod.outlook.com> <user906@SA3PR18MB5650.namprd18.prod.outlook.com> <user250@SA3PR18MB5650.namprd18.prod.outlook.com>
Subject: Work Order - Compliance 50096816666 AMER-GENERIC TANK/TANKLESS WATER HEATER ANNUAL PM
Thread-Index: AdzWM41xh4BXmKDcTAGLdSfXX989OgAwVHWAApC2kHA=
Thread-Topic: Work Order - Compliance 50096816666 AMER-GENERIC TANK/TANKLESS WATER HEATER ANNUAL PM
To: "adam@seahavenind.com" <adam@seahavenind.com>,
"info@seahavenind.com" <info@seahavenind.com>,
"amazon_po@int.seahaven.com" <amazon_po@int.seahaven.com>,
Work Orders <work-orders@seahavenind.com>
X-Amazon-Filename: image001.png, image002.png
X-Cse-Connectionguid: xmcL8fRbTxaFslS3VqWQkQ==
X-Cse-Msgguid: piGImixzTPGFOO8M+QIgjA==
X-Exchange-Routingpolicychecked: gtCb+Qu2PHGmyyWYpcJCc8ox8d8MNR1CcANCZo5x5tVLrRdnTZIu9WF2kpAkbeGsrjTrUF3v4XfzxClvSCMc2HjXVswnTtDa3BajS/k8qwOantO46QnXgVnOEbAy1KMcuy4ygh7Q4JryCq0rs73LPsmXciWmQ8HT9jofT5wiuol0mrlubvtBcJeBsCZT54P8Pa/6xQEH5mUNcczgiNqVLKG848ppwPIZgU9SFfhMtlWpZ3xfhEzYfOtpIyJN03vn+sntg1Fn+xVniM+MpIdMTOWjD9kL9yOR8vdVywBisN4yHgfs4Hz7A8PUBG71A0l/s/jEYbkRIn0b4J6MobUrRA==
X-Farcaster-Flow-Id: abcdef01-2345-6789-abcd-ef0123456789
X-Forefront-Antispam-Report: CIP:203.0.113.25;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SA3PR18MB5650.namprd18.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(366016)(6049299003)(1800799024)(22082099003)(56012099003)(8096899003)(18002099003)(11063799002)(4053099003)(38070700021);DIR:OUT;SFP:1101;
X-Ironport-Av: E=Sophos;i="6.23,228,1770595200"; d="png'150?scan'150,208,217,150";a="18357435"
X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|366016|6049299003|1800799024|22082099003|56012099003|8096899003|18002099003|11063799002|4053099003|38070700021;
X-Ms-Exchange-Antispam-Messagedata-Chunkcount: 1
X-Ms-Exchange-Antispam-Relay: 0
X-Ms-Exchange-Crosstenant-Authas: Internal
X-Ms-Exchange-Crosstenant-Authsource: SA3PR18MB5650.namprd18.prod.outlook.com
X-Ms-Exchange-Crosstenant-Fromentityheader: Hosted
X-Ms-Exchange-Crosstenant-Id: abcdef01-2345-6789-abcd-ef0123456789
X-Ms-Exchange-Crosstenant-Mailboxtype: HOSTED
X-Ms-Exchange-Crosstenant-Network-Message-Id: abcdef01-2345-6789-abcd-ef0123456789
X-Ms-Exchange-Crosstenant-Originalarrivaltime: 11 May 2026 11:17:18.6371 (UTC)
X-Ms-Exchange-Crosstenant-Userprincipalname: 1hFujjZSGK4fwyr5oeW6CMQ64CQ6lIibIQrR1PMmZmvj/biTqKRjcSjUrZYNvbqrfGhpP50pa7S032HzY8ioEw==
X-Ms-Exchange-Senderadcheck: 1
X-Ms-Exchange-Transport-Crosstenantheadersstamped: DM8PR18MB4518
X-Ms-Has-Attach: yes
X-Ms-Office365-Filtering-Correlation-Id: abcdef01-2345-6789-abcd-ef0123456789
X-Ms-Publictraffictype: Email
X-Ms-Tnef-Correlator:
X-Ms-Traffictypediagnostic: SA3PR18MB5650:EE_|DM8PR18MB4518:EE_
X-Originatororg: amazon.com
X-Sa-Code-Protection: enable
X-Ses-Dkim-Signature: a=rsa-sha256; q=dns/txt; b=ScrubbedFixturePlaceholderTokenValue01234/56/789QqZz/XxJjKkWwYyVvScrubbedFixturePlaceholderTokenValue0123456789QqZzXxJjKkWwYyVvScrubbedFixturePlaceholderTokenValue01234567=; c=relaxed/simple; s=hsbnp7p3ensaochzwyq5wwmceodymuwv; d=amazonses.com; t=1778498244; v=1; bh=Scr+ubbedFixturePlaceholderTokenValue012345=; h=From:To:Cc:Bcc:Subject:Date:Message-ID:MIME-Version:Content-Type:X-SES-RECEIPT;
X-Ses-Receipt: AEFBQUFBQUFBQUFFM2twUFY0WmdvSjlLcksyWHhUNmc3elhHVlFpbjlhenhsdXJ0QnRlKys1RStBVHhKVjJkVmI1U2xvVFI2cThHdXUrSXRCdlFyYjBTdmpRU0d0dlRRM2hCM0hCSytHYnBHZXhHYjhVMC91ZkZJeU0yS1RaRGJRbXQyWHlnV0UvQzhPSXd2b1FkYm1MWSs3MlBNU1pSSlhhenEyalkwWndWTm9ZKzd2cFJIY0l1R0UvakpZT0tIMmtla2o4MHI5WXFqTDlTQWdOOXpMZmhobFZvWDNPRnpBeXdadERZb0ZGelZnVVNqL213eXVMT1RHOHI4amRPdUl1VHZESWhTRDRDKzh0eUUvSUwyTXM4WDNjbDNBNktoN3lZQXFGT3hHdDNjQXZXOTI2R0NpTGVnUDVXTkNxdXdzMGVjTkp0ZG9mS3M9
Feedback-ID: ::1.us-west-2.Nb70E68c7QLwAb0zx9P979B6AKX/wPmBLYDqcnUHScA=:AmazonSES
X-SES-Outgoing: 2026.05.11-203.0.113.25
--_005_SA3PR18MB5650CD69CB4F3448A25E4309C6382SA3PR18MB5650namp_
Content-Type: multipart/alternative; boundary="_000_SA3PR18MB5650CD69CB4F3448A25E4309C6382SA3PR18MB5650namp_"
--_000_SA3PR18MB5650CD69CB4F3448A25E4309C6382SA3PR18MB5650namp_
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset="us-ascii"
Hello,
We have the following WO that is assigned to your group for AMER-GENERIC TA=
NK/TANKLESS WATER HEATER ANNUAL PM. When can we expect someone to come on =
site to perform the PMs?
[cid:image001.png@01DCE116.32728B90]
Thanks,
Max Bellwood
Facilities Coordinator SDF9
user158@amazon.com<mailto:user158@amazon.com>
[cid:image002.png@01DCE116.32728B90]
--_000_SA3PR18MB5650CD69CB4F3448A25E4309C6382SA3PR18MB5650namp_
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset="us-ascii"
<html xmlns:v=3D"urn:schemas-microsoft-com:vml" xmlns:o=3D"urn:schemas-micr=
osoft-com:office:office" xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" xmlns=3D"http:=
//www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dus-ascii"=
>
<meta name=3D"Generator" content=3D"Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Aptos;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:12.0pt;
font-family:"Calibri",sans-serif;
mso-ligatures:standardcontextual;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
span.EmailStyle19
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;
mso-ligatures:none;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=3D"EN-US" link=3D"#0563C1" vlink=3D"#954F72" style=3D"word-wrap:=
break-word">
<div class=3D"WordSection1">
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<p class=3D"MsoNormal">Hello,<o:p></o:p></p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<p class=3D"MsoNormal">We have the following WO that is assigned to your gr=
oup for AMER-GENERIC TANK/TANKLESS WATER HEATER ANNUAL PM.&nbsp; When can w=
e expect someone to come on site to perform the PMs?<o:p></o:p></p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<p class=3D"MsoNormal"><span style=3D"mso-ligatures:none"><img width=3D"106=
1" height=3D"52" style=3D"width:11.052in;height:.5416in" id=3D"_x0000_i1026=
" src=3D"cid:image001.png@01DCE116.32728B90"></span><o:p></o:p></p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<p class=3D"MsoNormal">Thanks,<o:p></o:p></p>
<p class=3D"MsoNormal"><b><i><span style=3D"font-size:14.0pt;color:#0066CC"=
>Max Bellwood<o:p></o:p></span></i></b></p>
<p class=3D"MsoNormal">Facilities Coordinator SDF9<span style=3D"font-size:=
11.0pt"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><a href=3D"mailto:user158@amazon.com">user158@amazon=
.com</a><o:p></o:p></p>
<p class=3D"MsoNormal"><span style=3D"mso-ligatures:none"><img border=3D"0"=
width=3D"94" height=3D"25" style=3D"width:.9791in;height:.2604in" id=3D"Pi=
cture_x0020_1" src=3D"cid:image002.png@01DCE116.32728B90"></span><o:p></o:p=
></p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
</body>
</html>
--_000_SA3PR18MB5650CD69CB4F3448A25E4309C6382SA3PR18MB5650namp_--
--_005_SA3PR18MB5650CD69CB4F3448A25E4309C6382SA3PR18MB5650namp_
Content-Description: image001.png
Content-Disposition: inline; filename="image001.png"; size=8758; creation-date="Mon, 11 May 2026 11:17:18 GMT"; modification-date="Mon, 11 May 2026 11:17:18 GMT"
Content-Id: <image001.png@01DCE116.32728B90>
Content-Transfer-Encoding: base64
Content-Type: image/png; name="image001.png"
iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6
kgAAAABJRU5ErkJggg==
--_005_SA3PR18MB5650CD69CB4F3448A25E4309C6382SA3PR18MB5650namp_
Content-Description: image002.png
Content-Disposition: inline; filename="image002.png"; size=5762; creation-date="Mon, 11 May 2026 11:17:18 GMT"; modification-date="Mon, 11 May 2026 11:17:18 GMT"
Content-Id: <image002.png@01DCE116.32728B90>
Content-Transfer-Encoding: base64
Content-Type: image/png; name="image002.png"
iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6
kgAAAABJRU5ErkJggg==
--_005_SA3PR18MB5650CD69CB4F3448A25E4309C6382SA3PR18MB5650namp_--