Skip to content

feat: add webapi response changes as of 2026-08-21 - #1632

Merged
zimeg merged 20 commits into
mainfrom
api
Aug 21, 2026
Merged

feat: add webapi response changes as of 2026-08-21#1632
zimeg merged 20 commits into
mainfrom
api

Conversation

@zimeg

@zimeg zimeg commented Aug 19, 2026

Copy link
Copy Markdown
Member

Periodic refresh of the Web API response models and recorded samples as of 2026-08-21, plus test changes that make the remote-API tests exercise state the API only returns under specific conditions (so the automatic property-detection mechanism records the fields, and the downstream node-slack-sdk type generator infers complete types from the samples).

Response model changes

  • bots.info — detect is_connector_bot on the bot object (alongside the existing workflow-bot flags), with doc comments describing when each is returned.
  • Message — add the agent_session detail (status, agent_bot_user_ids) surfaced on messages in agent sessions.
  • Slack ListsListColumnOptions gains emoji_url (rating/vote columns); ListView.Grouping now deserializes via a dedicated adapter (GsonListViewGroupingFactory, registered in GsonFactory) to tolerate the field being either a string or an array.
  • Audit Logs Actions — add newly-observed action names (MCP-related: slack_ai_mcp_model_context_updated, mcp_slack_todos_list_tool_called, app_mcp_tool_default_acl_changed, salesforce_mcp_server_tool_default_updated, salesforce_mcp_server_tool_permissions_deleted).

Test changes (so samples record conditional fields)

Two response shapes were losing detail because the remote-API tests never produced the state that makes Slack return the fields:

  • slacklists_Test — column option variants were never created, so slackLists.* samples never contained options.precision (number), options.date_format (date), or options.emoji / options.max (rating). Now gives the due_date column a dateFormat, adds a number column (estimate) with precision, and a rating column (priority) with emoji + max. Also exercises emoji_team_id, notify_users, and default_value_typed.
  • files_Test — the files.info coverage uploaded/shared a file but never replied in its thread, so shares.public lacked the reply-dependent fields. Now uploads to a channel, waits for the share ts, posts a threaded reply, and reads files.info until the share detail reflects it — asserting latest_reply / reply_count / reply_users / reply_users_count. (date_last_shared is intentionally not asserted — nullable, conditionally set, not reliably returned.)
  • bots_Test — exercises is_connector_bot detection.

Sample regeneration

Recorded json-logs/samples/api/*.json refreshed across bots.info, chat.* (incl. chat.stopStream), conversations.*, files.*, pins.list, reactions.*, search.*, and slackLists.*, plus the audit actions.json.

Category

  • slack-api-client (Slack API Clients)

Testing

Dispatch the java-slack-sdk-runner Tests workflow against a test workspace, then confirm the regenerated samples contain the new properties — e.g. slackLists.create.json -> options.precision / options.date_format / options.emoji / options.max, and files.info.json -> shares.public[].latest_reply / reply_count / reply_users / reply_users_count.

Requirements

Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you agree to those rules.

…etection

The slackLists workflow test only created text/date/select/user columns
without option variants, so the recorded slackLists.* samples never
contained the options.precision (number), options.date_format (date),
or options.emoji/options.max (rating) properties. Downstream, the
node-slack-sdk generator therefore inferred a thinner SchemaOptions that
dropped those fields.

Add a number column (precision), give the date column a dateFormat, and
add a rating column (emoji, max) to fullSlackListsWorkflow so the live
response echoes these options back and the detection mechanism records
them.
@codecov

codecov Bot commented Aug 19, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 3.84615% with 50 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.99%. Comparing base (3924704) to head (d89bbf7).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...ack/api/util/json/GsonListViewGroupingFactory.java 0.00% 50 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #1632      +/-   ##
============================================
- Coverage     73.24%   72.99%   -0.25%     
- Complexity     4522     4523       +1     
============================================
  Files           478      479       +1     
  Lines         14314    14365      +51     
  Branches       1491     1503      +12     
============================================
+ Hits          10484    10486       +2     
- Misses         2940     2989      +49     
  Partials        890      890              
Flag Coverage Δ
jdk-14 72.99% <3.84%> (-0.25%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

zimeg and others added 19 commits August 19, 2026 16:43
…tail

The existing files.info coverage uploads/shares a file but never replies in
its thread, so the recorded shares.public entry lacked the reply-dependent
fields (latest_reply, reply_count, reply_users, reply_users_count).
Downstream, the node-slack-sdk generator therefore inferred a share shape
missing those properties.

Add a test that uploads a file to a channel, polls files.info for the share
ts, posts a threaded reply, then polls files.info until the share detail
reflects the reply and asserts latest_reply/reply_count/reply_users are
present. date_last_shared is intentionally not asserted: it is a nullable,
conditionally-set field the API does not reliably return.
…ist options

Extend the SlackLists schema so every ListColumnOptions field the API returns
is present in the recorded sample, giving the downstream node-slack-sdk types
full parity with the hand-authored options shape:
- rating column now sets emoji_team_id (resolved from auth.test team id)
- user column now sets notify_users and default_value_typed (the user variant;
  the select variant is rejected by slackLists.create with internal_error)

Resolves the user id and team id at runtime via auth.test so the typed default
and emoji_team_id carry valid values the API will echo back.
is_connector_bot is returned only by bots.info (not users.list/users.info)
and only for Slack-certified Workflow Builder connector apps. Add the field
to BotsInfoResponse.Bot and a remote-API test that finds an installed
connector bot and reads bots.info so the recorded sample carries the
property; the test no-ops when no connector app is installed.

Confirmed against live data: for a Google Sheets connector install,
bots.info returns is_connector_bot=true while users.info/users.list omit it
entirely.
…item assertion

Detection run surfaced properties not yet modeled:
- BotsInfoResponse.Bot: is_workflow_bot, is_legacy_workflow_bot (both present in
  the bots.info sample alongside is_connector_bot)
- ListColumnOptions: emoji_url (rating/vote emoji URL)
- Actions.App: mcp_slack_todos_list_tool_called audit action

Also fix slacklists fullSlackListsWorkflow: the enriched schema (columns with
typed defaults) makes item creation return more than one field, so locate the
task_name field by column id instead of asserting an exact field count.
Diffing the live audit/v1/actions metadata against Actions.java surfaced two
undeclared actions beyond mcp_slack_todos_list_tool_called:
- salesforce_mcp_server_tool_default_updated
- salesforce_mcp_server_tool_permissions_deleted

With these, all 734 live audit actions are declared (verified: 0 missing).
Detection run surfaced an unknown `order` property on the list view grouping
object (com.slack.api.model.list.ListView$Grouping) returned by files.info for
a list-backed file. Add it so the grouping shape parses and is recorded.
…lculations, options)

Detection surfaced order (an array of {select:[...]}) on grouping, then sorts,
then info_column_filters on ListView. Rather than peel one field per run, typed
the complete view shape from the list_view.json output schema:
- Grouping.order -> List<GroupingOrder> ({select: List<String>})
- sorts -> List<Sort> ({key, ascending, column_id})
- info_column_filters -> List<InfoColumnFilter> (distinct from filters: no column_id)
- calculations -> List<Calculation> ({key, operator, column_id})
- options -> Options ({cover_field, cover_fit, calendar_field})
- is_template_initial_view, row_height

Verified locally: files_Test#describe parses clean against live list data.
The Slack API returns `grouping.order` as either an empty string (`""`)
when no grouping is configured, or as a JSON array of objects when active.
The previous model typed it as `List<GroupingOrder>` which choked on the
string variant. Add a custom Gson deserializer that coerces string values
to null and parses arrays normally.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Detection surfaced an unknown `agent_session` property on Message objects
returned by chat/conversations methods (agent DM / session channels work).
Add AgentSession ({status, agent_bot_user_ids, agent_statuses, title,
date_status_processing_expire}) and its nested AgentStatus
({agent_bot_user_id, status, is_stoppable, date_status_processing_expire})
so the message shape parses and is recorded.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Detection surfaced an unknown audit action `slack_ai_mcp_model_context_updated`
(the bot recorded it into json-logs/raw/audit/v1/actions.json in 2d2d9b0, but
the Java Actions constant was missing). Add it to the slack_ai_mcp_* cluster so
ApiTest.getActions_detectingNewOnes parses clean.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
@zimeg zimeg changed the title test: exercise number/date/rating list columns for options property detection feat: add webapi response changes as of 2026-08-21 Aug 21, 2026
@zimeg zimeg self-assigned this Aug 21, 2026
@zimeg zimeg added project:slack-api-model project:slack-api-model semver:patch project:slack-api-client project:slack-api-client labels Aug 21, 2026
@zimeg zimeg added this to the 1.50.1 milestone Aug 21, 2026
@zimeg
zimeg marked this pull request as ready for review August 21, 2026 21:52
@zimeg
zimeg requested a review from a team as a code owner August 21, 2026 21:52
@zimeg

zimeg commented Aug 21, 2026

Copy link
Copy Markdown
Member Author

LGTM — suitable to merge. Reviewed the full api → main batch (20 commits). Every code change is additive property/action modeling; nothing destructive:

  • Message.agentSession (AgentSession + nested AgentStatus) — models the newly-detected agent_session shape
  • ListView — polymorphic grouping.order handled via the new GsonListViewGroupingFactory (the field comes back as either "" or an array), plus sorts / infoColumnFilters / calculations / options / isTemplateInitialView / rowHeight
  • BotsInfoResponseisConnectorBot / isWorkflowBot / isLegacyWorkflowBot
  • 5 audit constants in Actions (slack_ai_mcp_model_context_updated, app_mcp_tool_default_acl_changed, salesforce_mcp_server_tool_default_updated, salesforce_mcp_server_tool_permissions_deleted, mcp_slack_todos_list_tool_called)
  • ListColumnOptions.emojiUrl

Verified: compiles clean across slack-api-model + slack-api-client; CI green (build 8/14/17 + codecov). The java-slack-sdk-runner live-detection suite is green except the known scim2.AsyncApiTest _ed-username-suffix flake (tracked separately) — and the only sample commit since that validation is a benign key reorder, so the detection picture is unchanged.

One follow-up thought (non-blocking): users.list.json doesn't carry is_connector_bot, whereas users.info / bots.info do. That may be entirely correct — the flag might simply belong on bots.info + the user/bot-info methods and not on users.list at all. Flagging only because sample-driven downstream type generators infer per-response, so if it is expected on users.list it'd want seeding into that sample; if not, no action needed.

@zimeg
zimeg merged commit 0bcc88f into main Aug 21, 2026
7 checks passed
@zimeg
zimeg deleted the api branch August 21, 2026 22:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

project:slack-api-client project:slack-api-client project:slack-api-model project:slack-api-model semver:patch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant