Skip to content

test: exercise number/date/rating list columns for options property detection - #1632

Draft
zimeg wants to merge 20 commits into
mainfrom
api
Draft

test: exercise number/date/rating list columns for options property detection#1632
zimeg wants to merge 20 commits into
mainfrom
api

Conversation

@zimeg

@zimeg zimeg commented Aug 19, 2026

Copy link
Copy Markdown
Member

This pull request extends the Slack Lists and Files remote-API tests so column/share sub-properties that were never being recorded get exercised, letting the automatic property-detection mechanism pick them up.

Context

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

  1. Slack Lists column options. fullSlackListsWorkflow only created text / date / select / user columns with no option variants, so the recorded slackLists.* samples never contained options.precision (number), options.date_format (date), or options.emoji / options.max (rating).
  2. File share reply detail. The files.info coverage uploaded/shared a file but never replied 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 response-type generator infers types from these samples, so it produced thinner types that dropped those documented fields.

Changes

slacklists_Test

  • Give the due_date column a dateFormat option -> records date_format.
  • Add a number column (estimate) with precision -> records precision.
  • Add a rating column (priority) with emoji and max -> records emoji and max.

files_Test

  • Add a test that uploads a file to a channel, waits for the share ts, posts a threaded reply, then reads files.info until the share detail reflects the reply and asserts latest_reply / reply_count / reply_users / reply_users_count are present.

The ListColumnOptions and File.ShareDetail models already support all of these fields; this only exercises them. date_last_shared is intentionally not asserted — it is a nullable, conditionally-set field the API does not reliably return.

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 now contain the new properties:
    • json-logs/samples/api/slackLists.create.json -> options.precision, options.date_format, options.emoji, options.max
    • json-logs/samples/api/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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant