test: probe ListRecord.Field message wire shape against live API (experimental) - #1644
test: probe ListRecord.Field message wire shape against live API (experimental)#1644zimeg wants to merge 2 commits into
Conversation
Adds an experimental remote-API test (messageFieldArrayShapeProbe) to slacklists_Test that creates a list with a message-type column, sets the field with a real message permalink, then reads the item back and observes the actual response shape of the `message` field. It captures the raw items.info JSON to assert whether `message` is a JSON array or object, and separately probes whether the typed (production Gson) deserialization throws on that real shape. Additive, test-only; no SDK source changes. Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Emit a stdout marker with the observed message-field shape and targets the record.fields[...] message key specifically. Verified against the live API: the message field is returned as a JSON array and the production Gson path throws (Expected BEGIN_OBJECT but was BEGIN_ARRAY). Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
|
Ran the probe against a live workspace (single scoped test, no manifest/audit tests). Empirical result: Two confirmations from the live
This validates the direction: the fix must register the |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## api #1644 +/- ##
============================================
- Coverage 72.66% 72.61% -0.06%
+ Complexity 4554 4533 -21
============================================
Files 484 483 -1
Lines 14493 14460 -33
Branches 1521 1520 -1
============================================
- Hits 10532 10500 -32
Misses 3065 3065
+ Partials 896 895 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. |
Warning
Experimental / not for merge. This is a throwaway probe used to observe the real production response shape of the Slack Lists
messagefield before committing to a fix for #1587. Expected to be reverted.This pull request adds an experimental remote-API test that empirically observes how the Slack API returns a list item's
messagefield.ListRecord.Field.messagecan come back as an array of message objects, which the production Gson path fails to deserialize (JsonSyntaxException: Expected BEGIN_OBJECT but was BEGIN_ARRAY). The public docs forslackLists.items.createshow only the request shape (an array of permalink URL strings) and give no response example, so the response shape is unverified in public.messageFieldArrayShapeProbetoslacklists_Test: creates a list with amessage-type column, sets the field with a real message permalink, reads the item back, and:slackLists.items.infoJSON and asserts whether themessagevalue is a JSON array ([) or object ({);Category
Testing
Run only the Slack Lists remote test against a workspace with a bot token that has
lists:read/lists:writeand can post to the test channel:Inspect the
[probe]log lines — theSUMMARYline reportsmessageIsArray,messageIsObject, andtypedDeserializationThrewfor the live response.Requirements
Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you agree to those rules.