Leave Slack bots out of community counts
Repair bots imported before ingestion learned to drop them. Reads what Slack’s own user lists said (is_bot, or Slackbot) and takes each member whose every account is such a bot out of community counts and analytics. They do not become staff: contact.is_team, team-only views and direct-message checks still mean the customer’s own people. Deletes nothing here: identities, observations and history all stay. To find classified accounts, use search_members with filters.team set to "all". A member with a bot account and any other account is flagged in mixedMemberIds and not changed. Applying it can write outside this instance: a company left with nobody but staff and bots has its record dissolved in any organisation sink that holds one. Call it with dry_run first and check organisationDissolves, which counts those without sending or queueing anything. Safe to run again, and it leaves alone an account somebody cleared. If connectionsWithoutEvidence names a connection, upload its export ZIP again or re-walk it with run_backfill from the start, then call this again.
Parameters
Count what would change without writing anything. Do this first: the counts it returns are what the real call applies, because both make the same selection.
Also classify accounts somebody cleared with clear_non_person_account. Off by default: a person who said an account is human is not overruled by a re-run.
CLI flags
Also classify accounts somebody cleared with members clear-non-person