Skip to content

feat(lark): honour bot reach, retire group PAIR, fix walled copy on DM-less bots - #604

Draft
jacoblee-io wants to merge 1 commit into
mainfrom
deploy/feishu-bot-reach
Draft

jacoblee-io wants to merge 1 commit into
mainfrom
deploy/feishu-bot-reach

Conversation

@jacoblee-io

Copy link
Copy Markdown
Collaborator

Runtime half of the sicore change that adds two settings next to access_mode: reach (where a bot may be used) and group_policy (which groups count). Ships with sicore MR !1232.

Group PAIR is retired

A group is served by the dedicated app that was added to it, and by nothing else. The command word is now swallowed rather than forwarded, so a stale code typed into a group neither binds anything nor produces a refusal the room did not ask for.

The personal pairing code in a DM is untouched — that one links a Feishu identity to a Sicore account, which the strict tiers need.

Retiring it also closes a bypass on the sicore side: the shared-app branch that served PAIRed groups reached session creation without calling access.Decide even once.

reach=group_only refuses every DM entry point

The frontend refuses them independently (its personalDM registrar is the authority); declining locally just saves the round trip. One short reply rather than silence — a DM is a place the sender deliberately opened, and no answer there reads as the bot being broken.

Walled copy on a DM-less bot

Both group refusal texts tell the sender to DM the bot, which is a dead end when DMs are closed. The refusal now carries dmDisabled, and dmCanResolveAccess reads it, so those senders are pointed at the console instead.

An extra field rather than a new reason: reason is the contract this runtime localizes, and a new value would drop an un-updated build into its generic fallback, whereas an unknown boolean is simply ignored.

Verified

Ten-step e2e against real Feishu on sicore-test, all passing — including the two invariants easiest to get wrong: group_only does not close groups as a side effect, and turning group_policy=approval on does not silence groups that were already serving. DM refused … reach=group_only and group PAIR ignored … group pairing is retired both confirmed in the runtime log.

Design: sicore docs/design/feishu-bot-reach-and-pair-retirement.md.

…M-less bots

Follows the sicore change that adds two settings next to access_mode:
reach (where a bot may be used) and group_policy (which groups count).
See sicore docs/design/feishu-bot-reach-and-pair-retirement.md.

Group PAIR is retired. A group is served by the dedicated app that was
added to it, and by nothing else, so the command word is swallowed here
rather than forwarded — a stale code typed into a group neither binds
anything nor produces a refusal the room did not ask for. The PERSONAL
pairing code in a DM is untouched: that one links a Feishu identity to a
Sicore account, which the strict tiers need.

reach=group_only refuses every DM entry point. The frontend refuses them
independently (its personalDM registrar is the authority); declining
locally just saves the round trip. One short reply rather than silence —
a DM is a place the sender deliberately opened, and no answer there reads
as the bot being broken.

Both group refusal texts tell the sender to DM the bot, which is a dead
end on a group_only bot. The refusal now carries dmDisabled, and
dmCanResolveAccess reads it, so those senders get the console link
instead. An extra field rather than a new reason: reason is the contract
this runtime localizes, and a new value would drop an un-updated build
into its generic fallback, whereas an unknown boolean is ignored.
@jacoblee-io
jacoblee-io marked this pull request as draft September 14, 2026 12:21
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