Skip to content

Commit 26b4d52

Browse files
gracexmatinclaude
andcommitted
feat(sources): Gmail pack phase-4 live verification against a real mailbox
Registration passed the fingerprint gate against live discovery for all five actions; every mapped column of every table extracted a real non-NULL value through skardi-server; real multi-page cursor chaining (maxResults=1, three pages) and real final-page null-token termination observed at the wire; query/labelIds/includeSpamTrash resources observed narrowing real listings. Fixtures are now redacted live captures from that pass (real envelope keys, field presence, and timestamp spellings; synthetic identifiers and placeholder text; mechanically audited against an allowlist). The live rows settled two synthetic guesses — SENT/INBOX/DRAFT/STARRED/UNREAD omit visibility fields while CHAT carries them, and a fresh draft's threadId equals its messageId — and the executor-guaranteed absent spellings the capture lacked (null historyId, "" headers, empty labelIds) moved to an inline converter test. The live pass also caught an upstream bug: a mailbox with zero filters fails list_filters with the gateway's internal_error (Gmail returns an empty body that the executor's unconditional response.json() does not tolerate; creating one filter makes the same call succeed). Documented in the pack doc and module doc; the fix belongs in open-connector. 284 open_connector tests (23 new), counts confirmed against CI. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 575463a commit 26b4d52

8 files changed

Lines changed: 280 additions & 116 deletions

File tree

crates/skardi/src/sources/providers/open_connector/packs/fixtures/gmail/drafts.json

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,10 @@
11
{
22
"drafts": [
33
{
4-
"id": "r-1900000000000cc001",
4+
"id": "r-4000000000000000001",
55
"message": {
6-
"messageId": "1900000000000bb010",
7-
"threadId": "1900000000000aa010"
8-
}
9-
},
10-
{
11-
"id": "r-1900000000000cc002",
12-
"message": {
13-
"messageId": "",
14-
"threadId": ""
6+
"messageId": "1900000000000c01",
7+
"threadId": "1900000000000c01"
158
}
169
}
1710
],

crates/skardi/src/sources/providers/open_connector/packs/fixtures/gmail/filters.json

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,14 @@
11
{
22
"filters": [
33
{
4-
"id": "ANe1Bmj0000000000000000000000000000000001",
4+
"id": "ANe1Bmg0000000000000000000000000000001",
55
"criteria": {
66
"from": "alerts@example.com"
77
},
88
"action": {
9-
"addLabelIds": ["Label_1"],
10-
"removeLabelIds": ["INBOX"]
11-
}
12-
},
13-
{
14-
"id": "ANe1Bmj0000000000000000000000000000000002",
15-
"criteria": {
16-
"query": "has:attachment larger:10M"
17-
},
18-
"action": {
19-
"addLabelIds": ["TRASH"]
9+
"addLabelIds": [
10+
"Label_1"
11+
]
2012
}
2113
}
2214
]

crates/skardi/src/sources/providers/open_connector/packs/fixtures/gmail/labels.json

Lines changed: 82 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,99 @@
11
{
22
"labels": [
3+
{
4+
"id": "CHAT",
5+
"name": "CHAT",
6+
"messageListVisibility": "hide",
7+
"labelListVisibility": "labelHide",
8+
"type": "system"
9+
},
10+
{
11+
"id": "SENT",
12+
"name": "SENT",
13+
"type": "system"
14+
},
315
{
416
"id": "INBOX",
517
"name": "INBOX",
6-
"type": "system",
18+
"type": "system"
19+
},
20+
{
21+
"id": "IMPORTANT",
22+
"name": "IMPORTANT",
23+
"messageListVisibility": "hide",
24+
"labelListVisibility": "labelHide",
25+
"type": "system"
26+
},
27+
{
28+
"id": "TRASH",
29+
"name": "TRASH",
730
"messageListVisibility": "hide",
8-
"labelListVisibility": "labelShow"
31+
"labelListVisibility": "labelHide",
32+
"type": "system"
933
},
1034
{
11-
"id": "CHAT",
12-
"name": "CHAT",
35+
"id": "DRAFT",
36+
"name": "DRAFT",
37+
"type": "system"
38+
},
39+
{
40+
"id": "SPAM",
41+
"name": "SPAM",
42+
"messageListVisibility": "hide",
43+
"labelListVisibility": "labelHide",
44+
"type": "system"
45+
},
46+
{
47+
"id": "CATEGORY_FORUMS",
48+
"name": "CATEGORY_FORUMS",
49+
"messageListVisibility": "hide",
50+
"labelListVisibility": "labelHide",
51+
"type": "system"
52+
},
53+
{
54+
"id": "CATEGORY_UPDATES",
55+
"name": "CATEGORY_UPDATES",
56+
"messageListVisibility": "hide",
57+
"labelListVisibility": "labelHide",
58+
"type": "system"
59+
},
60+
{
61+
"id": "CATEGORY_PERSONAL",
62+
"name": "CATEGORY_PERSONAL",
63+
"messageListVisibility": "hide",
64+
"labelListVisibility": "labelHide",
65+
"type": "system"
66+
},
67+
{
68+
"id": "CATEGORY_PROMOTIONS",
69+
"name": "CATEGORY_PROMOTIONS",
70+
"messageListVisibility": "hide",
71+
"labelListVisibility": "labelHide",
72+
"type": "system"
73+
},
74+
{
75+
"id": "CATEGORY_SOCIAL",
76+
"name": "CATEGORY_SOCIAL",
77+
"messageListVisibility": "hide",
78+
"labelListVisibility": "labelHide",
79+
"type": "system"
80+
},
81+
{
82+
"id": "STARRED",
83+
"name": "STARRED",
84+
"type": "system"
85+
},
86+
{
87+
"id": "UNREAD",
88+
"name": "UNREAD",
1389
"type": "system"
1490
},
1591
{
1692
"id": "Label_1",
17-
"name": "Projects/Redacted",
18-
"type": "user",
93+
"name": "Skardi/Phase4",
1994
"messageListVisibility": "show",
2095
"labelListVisibility": "labelShow",
96+
"type": "user",
2197
"color": {
2298
"textColor": "#000000",
2399
"backgroundColor": "#fb4c2f"
Lines changed: 29 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,42 @@
11
{
22
"messages": [
33
{
4-
"messageId": "1900000000000bb001",
5-
"threadId": "1900000000000aa001",
6-
"labelIds": ["INBOX", "IMPORTANT"],
7-
"subject": "Quarterly report",
8-
"sender": "Redacted Sender <sender@example.com>",
9-
"to": "Redacted Recipient <recipient@example.com>",
4+
"messageId": "1900000000000b00",
5+
"threadId": "1900000000000a00",
6+
"labelIds": [
7+
"DRAFT"
8+
],
9+
"subject": "Redacted subject 1",
10+
"sender": "Redacted Sender <sender1@example.com>",
11+
"to": "recipient1@example.com",
1012
"messageTimestamp": "2026-07-30T08:15:42.000Z"
1113
},
1214
{
13-
"messageId": "1900000000000bb002",
14-
"threadId": "1900000000000aa002",
15-
"labelIds": [],
16-
"subject": "",
17-
"sender": "no-reply@example.com",
18-
"to": "",
15+
"messageId": "1900000000000b01",
16+
"threadId": "1900000000000a01",
17+
"labelIds": [
18+
"CATEGORY_UPDATES",
19+
"INBOX"
20+
],
21+
"subject": "Redacted subject 2",
22+
"sender": "Redacted Sender <sender2@example.com>",
23+
"to": "recipient2@example.com",
1924
"messageTimestamp": "2026-07-29T21:03:11.000Z"
2025
},
2126
{
22-
"messageId": "1900000000000bb003",
23-
"threadId": "1900000000000aa003",
24-
"labelIds": ["SENT"],
25-
"subject": "Re: onboarding checklist",
26-
"sender": "Redacted Sender <sender@example.com>",
27-
"to": "a@example.com, b@example.com",
27+
"messageId": "1900000000000b02",
28+
"threadId": "1900000000000a02",
29+
"labelIds": [
30+
"IMPORTANT",
31+
"CATEGORY_UPDATES",
32+
"INBOX"
33+
],
34+
"subject": "Redacted subject 3",
35+
"sender": "Redacted Sender <sender3@example.com>",
36+
"to": "recipient3@example.com",
2837
"messageTimestamp": "2026-07-28T14:00:00.000Z"
2938
}
3039
],
31-
"nextPageToken": null,
32-
"resultSizeEstimate": 3
40+
"nextPageToken": "00000000000000000001",
41+
"resultSizeEstimate": 201
3342
}
Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,21 @@
11
{
22
"threads": [
33
{
4-
"threadId": "1900000000000aa001",
5-
"snippet": "Quarterly report attached — please review before Friday.",
4+
"threadId": "1900000000000a00",
5+
"snippet": "Redacted thread snippet 1.",
66
"historyId": "4200001"
77
},
88
{
9-
"threadId": "1900000000000aa002",
10-
"snippet": "",
11-
"historyId": null
9+
"threadId": "1900000000000a01",
10+
"snippet": "Redacted thread snippet 2.",
11+
"historyId": "4200002"
1212
},
1313
{
14-
"threadId": "1900000000000aa003",
15-
"snippet": "Re: onboarding checklist",
16-
"historyId": "4200003",
17-
"labels": ["synthetic-extra-field"]
14+
"threadId": "1900000000000a02",
15+
"snippet": "Redacted thread snippet 3.",
16+
"historyId": "4200003"
1817
}
1918
],
20-
"nextPageToken": null,
21-
"resultSizeEstimate": 3
19+
"nextPageToken": "00000000000000000001",
20+
"resultSizeEstimate": 201
2221
}

0 commit comments

Comments
 (0)