Skip to content

fix: fix parameter constraints for LarkMessageTrigger#213

Open
yballul-bytedance wants to merge 1 commit intolarksuite:mainfrom
yballul-bytedance:fix/workflow-schema
Open

fix: fix parameter constraints for LarkMessageTrigger#213
yballul-bytedance wants to merge 1 commit intolarksuite:mainfrom
yballul-bytedance:fix/workflow-schema

Conversation

@yballul-bytedance
Copy link
Copy Markdown

@yballul-bytedance yballul-bytedance commented Apr 2, 2026

Change-Id: Ib291b0c7817cb3e52e80d85dcf26993c7fab487c

  1. 修正 LarkMessageTrigegr 的参数限制,部分群组专用的字段需要额外说明在单聊场景下不可用
  2. 非分支节点,应强调 children 字段设置为 null

Summary by CodeRabbit

  • Documentation
    • Clarified guidance: non-branch Trigger/Action steps should omit children and use next for linear flow
    • Expanded message-trigger docs: receiver meaning differs for chat vs group; scope is group-only; tightened MessageFilter semantics and renamed one field to “仅新话题消息”
    • Updated example JSONs and cleaned table/spacing to match guidance

@github-actions github-actions bot added domain/base PR touches the base domain size/M Single-domain feat or fix with limited business impact labels Apr 2, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 2, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b4e0b28e-1ee6-410a-bd29-785d1873abf8

📥 Commits

Reviewing files that changed from the base of the PR and between 5b4ac3e and f4ccdbd.

📒 Files selected for processing (4)
  • skills/lark-base/references/lark-base-workflow-create.md
  • skills/lark-base/references/lark-base-workflow-get.md
  • skills/lark-base/references/lark-base-workflow-schema.md
  • skills/lark-base/references/lark-base-workflow-update.md
💤 Files with no reviewable changes (2)
  • skills/lark-base/references/lark-base-workflow-update.md
  • skills/lark-base/references/lark-base-workflow-get.md
🚧 Files skipped from review as they are similar to previous changes (2)
  • skills/lark-base/references/lark-base-workflow-create.md
  • skills/lark-base/references/lark-base-workflow-schema.md

📝 Walkthrough

Walkthrough

Updated Lark workflow docs: removed children.links: [] from non-branch Trigger/Action examples and now instruct not to set children for those nodes; preserved linear chaining via next. Clarified LarkMessageTrigger and MessageFilter fields with chat vs group applicability.

Changes

Cohort / File(s) Summary
Workflow Schema
skills/lark-base/references/lark-base-workflow-schema.md
Removed example children: { "links": [] } for non-branch Trigger/Action steps and changed guidance to not set children. Emphasized use of next. Clarified LarkMessageTrigger fields: receiver semantics by receive_scene, scope = group-only, and tightened MessageFilter (sender_contains, is_new_message) to group scenarios.
Workflow API Examples (create/get/update)
skills/lark-base/references/lark-base-workflow-create.md, skills/lark-base/references/lark-base-workflow-get.md, skills/lark-base/references/lark-base-workflow-update.md
Removed children: { "links": [] } from example steps objects in request/response samples for Trigger and Action steps; examples otherwise unchanged.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 I nudged the docs and swept blank links away,
🥕 triggers march in a tidy straight array,
📨 receivers now whisper where to land,
🔎 filters sort by group, precise and planned,
✨ hop along — the workflow's bright and fey.

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description provided does not follow the template structure. It lacks the required Summary, Changes, Test Plan, and Related Issues sections in the specified format. Restructure the description to match the template with proper sections: Summary (1-3 sentences), Changes (bulleted list), Test Plan (with checkboxes), and Related Issues. Translate or include both Chinese and English content if needed.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'fix: fix parameter constraints for LarkMessageTrigger' directly reflects the main change: constraining parameters for LarkMessageTrigger, particularly group-only fields.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

@greptile-apps
Copy link
Copy Markdown

greptile-apps bot commented Apr 2, 2026

Greptile Summary

This PR improves documentation accuracy for Lark Base workflow steps in two ways: non-branch Trigger/Action nodes now omit children entirely (instead of showing children: { links: [] }), and LarkMessageTrigger parameters receive clearer single-chat vs. group-chat semantics for receiver, scope, sender_contains, and is_new_message. The changes are consistent across all four reference files.

Confidence Score: 5/5

Documentation-only PR, safe to merge with one minor wording inconsistency noted.

All findings are P2 style suggestions on documentation text. The only issue is a minor inconsistency where scope is still labelled 必填 while the description says it must not be specified in single-chat, which could confuse developers but does not break any runtime behavior.

skills/lark-base/references/lark-base-workflow-schema.md — scope required-field label vs. single-chat guidance

Important Files Changed

Filename Overview
skills/lark-base/references/lark-base-workflow-schema.md Removes children from non-branch node examples, updates Trigger/Action guidance, adds single-chat constraints for LarkMessageTrigger fields; minor inconsistency: scope still marked 必填 despite being group-only
skills/lark-base/references/lark-base-workflow-create.md Removes children: { links: [] } from both the inline JSON CLI example and the expanded JSON body example for non-branch nodes
skills/lark-base/references/lark-base-workflow-get.md Removes children from the GET response example for non-branch nodes, consistent with schema guidance
skills/lark-base/references/lark-base-workflow-update.md Removes children from the PUT request body example for non-branch nodes, consistent with schema guidance

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[LarkMessageTrigger] --> B{receive_scene}
    B -->|group 群聊| C[receiver: group/user/ref]
    B -->|chat 单聊| D[receiver: user only]
    C --> E[scope: at / all — 必填]
    C --> F[sender_contains — 生效]
    C --> G[is_new_message — 生效]
    D --> H[scope — 请勿指定]
    D --> I[sender_contains — 请勿指定]
    D --> J[is_new_message — 请勿指定]
    E --> K[filter: MessageFilter]
    H --> K
Loading

Reviews (6): Last reviewed commit: "fix: 修正 LarkMessageTrigger 的参数限制" | Re-trigger Greptile

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@skills/lark-base/references/lark-base-workflow-schema.md`:
- Line 91: The schema text forbids setting children on Trigger/Action nodes but
the example workflow objects (AddRecordTrigger, LarkMessageAction,
SetRecordAction, GenerateAiTextAction) still include `"children": { "links": []
}`, causing a contradiction; update those example objects (and the similar
examples in lark-base-workflow-create.md, lark-base-workflow-get.md,
lark-base-workflow-update.md) to remove the children field from Trigger and
Action node examples and instead show chaining via the `next` property (or, if
the API actually requires an empty children object, update the guidance text to
state that children may be present but must be empty), ensuring consistency
between the guidance lines about Trigger/Action and the example payloads.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 8fafee7f-a90e-471b-8e8d-b7be3e2e4619

📥 Commits

Reviewing files that changed from the base of the PR and between 0f96bdf and f9c51f7.

📒 Files selected for processing (1)
  • skills/lark-base/references/lark-base-workflow-schema.md

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Apr 2, 2026

CLA assistant check
All committers have signed the CLA.

@yballul-bytedance yballul-bytedance force-pushed the fix/workflow-schema branch 2 times, most recently from bf65044 to 02d91ff Compare April 3, 2026 04:08
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
skills/lark-base/references/lark-base-workflow-schema.md (1)

825-908: ⚠️ Potential issue | 🟠 Major

Update examples to remove children field from Trigger and Action nodes across all documentation files.

Verification found the main workflow example (lines 825-908) is correctly formatted. However, other examples in the documentation violate the updated guidance:

  • lark-base-workflow-schema.md: Simple example at lines 14-19 incorrectly includes "children": { "links": [] } on AddRecordTrigger
  • lark-base-workflow-create.md: Lines 71-84 show AddRecordTrigger and LarkMessageAction with children fields
  • lark-base-workflow-get.md: Lines 116-128 show AddRecordTrigger and LarkMessageAction with children fields
  • lark-base-workflow-update.md: Lines 79-92 show AddRecordTrigger and LarkMessageAction with children fields

Only branch nodes (IfElseBranch) should include children. Remove these fields from all Trigger and Action node examples to maintain consistency.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@skills/lark-base/references/lark-base-workflow-schema.md` around lines 825 -
908, Examples include extraneous "children" fields on Trigger/Action node
examples; remove any "children" property from AddRecordTrigger,
LarkMessageAction, SetRecordAction, GenerateAiTextAction (and any other
trigger/action node examples) and leave "children" only on branch nodes like
IfElseBranch; update the example JSON blocks so Trigger/Action objects do not
contain "children": { "links": [...] } while preserving all other fields and
existing IfElseBranch.children entries.
🧹 Nitpick comments (2)
skills/lark-base/references/lark-base-workflow-schema.md (2)

91-91: Minor: Add space after backtick for consistency.

There's a missing space between the closing backtick of children and the comma.

✏️ Proposed fix
-所有 Trigger 节点**请勿设置** `children` ,通过 `next` 串联后继。
+所有 Trigger 节点**请勿设置** `children`,通过 `next` 串联后继。

(Note: Alternatively, if you want a space before the comma, use: children,)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@skills/lark-base/references/lark-base-workflow-schema.md` at line 91, The
line mentioning Trigger nodes has a missing space after the closing backtick for
`children`; update the markdown so there's a space before the comma (e.g.,
change "`children`, " to "`children`,") by editing the sentence that contains
the symbol `children` to include the space for consistent punctuation spacing.

115-115: Minor: Add consistent spacing.

Same spacing issue as line 91.

✏️ Proposed fix
-所有 Action 节点**请勿设置** `children` ,通过 `next` 串联后继。
+所有 Action 节点**请勿设置** `children`,通过 `next` 串联后继。
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@skills/lark-base/references/lark-base-workflow-schema.md` at line 115, The
sentence "所有 Action 节点**请勿设置** `children` ,通过 `next` 串联后继。" has an extra space
before the Chinese comma; update this line to use no space between the inline
code `children` and the punctuation (make it "`children`,") to match the spacing
used on line 91 and keep punctuation spacing consistent across the document.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@skills/lark-base/references/lark-base-workflow-schema.md`:
- Around line 263-268: The documentation marks the field `scope` as "必填" while
its description limits it to group scenarios only, creating a contradiction;
update the table row for `scope` so the "必填" column reflects a conditional
requirement (e.g., "有条件" or "群聊必填") or change it to "否" and add a clear
parenthetical note in the description of `scope` that it is required only when
`receive_scene` is `group` and must not be specified when `receive_scene` is
`chat`; also ensure related fields `receive_scene` and `receiver` remain
consistent with that conditional requirement.

---

Outside diff comments:
In `@skills/lark-base/references/lark-base-workflow-schema.md`:
- Around line 825-908: Examples include extraneous "children" fields on
Trigger/Action node examples; remove any "children" property from
AddRecordTrigger, LarkMessageAction, SetRecordAction, GenerateAiTextAction (and
any other trigger/action node examples) and leave "children" only on branch
nodes like IfElseBranch; update the example JSON blocks so Trigger/Action
objects do not contain "children": { "links": [...] } while preserving all other
fields and existing IfElseBranch.children entries.

---

Nitpick comments:
In `@skills/lark-base/references/lark-base-workflow-schema.md`:
- Line 91: The line mentioning Trigger nodes has a missing space after the
closing backtick for `children`; update the markdown so there's a space before
the comma (e.g., change "`children`, " to "`children`,") by editing the sentence
that contains the symbol `children` to include the space for consistent
punctuation spacing.
- Line 115: The sentence "所有 Action 节点**请勿设置** `children` ,通过 `next` 串联后继。" has
an extra space before the Chinese comma; update this line to use no space
between the inline code `children` and the punctuation (make it "`children`,")
to match the spacing used on line 91 and keep punctuation spacing consistent
across the document.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 50ab0bc4-f832-43ec-9864-ed60dc5e1a1b

📥 Commits

Reviewing files that changed from the base of the PR and between bf65044 and 02d91ff.

📒 Files selected for processing (1)
  • skills/lark-base/references/lark-base-workflow-schema.md

@yballul-bytedance yballul-bytedance changed the title fix: 修正 LarkMessageTrigger 的参数限制 fix: fix parameter constraints for LarkMessageTrigger Apr 3, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 3, 2026

🚀 PR Preview Install Guide

🧰 CLI update

npm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@02d91fff06cb994104eca30f83fd9e2bc8bdb670

🧩 Skill update

npx skills add yballul-bytedance/cli#fix/workflow-schema -y -g

@kongenpei kongenpei self-requested a review April 3, 2026 09:17
Change-Id: Ib291b0c7817cb3e52e80d85dcf26993c7fab487c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

domain/base PR touches the base domain size/M Single-domain feat or fix with limited business impact

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants