larksuite / larksuite/cli

approval instances create accepts unsupported account control value

Open
#1,672 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug domain/core
Dominant language
Go
Stars
17.3k
Forks
1.4k
Avg merge
2d 4h
Merged PRs (30d)
105

Description

Summary

lark-cli approval instances create can create an approval instance with an account form control value, even though the approval initiation docs say the account / 收款账户 control is not supported by the create-instance API.

This is confusing because the command succeeds and the approval workflow can continue, but the created instance may not be equivalent to one submitted through the native approval form/template UI where the account control is selected normally.

What happened

For an approval definition that contains a required account control:

  • approval approvals get reports the control as required, type account.
  • The local lark-cli skill/reference docs list account under controls unsupported by approval instances create.
  • If a caller copies a complete account value object from a previous successful instance and includes it in instances create, the CLI/API accepts the request and creates an instance.
  • The approval can proceed to later nodes, which makes the submission look valid even though the control is documented as unsupported.

Expected behavior

One of these should happen:

  1. approval instances create should reject unsupported account controls with a clear error before sending / after API response; or
  2. the docs and CLI schema should explicitly document that copying a full historical account value object is supported and produces a valid native-account-control submission.

From the current docs, option 1 seems safer.

Why this matters

Payment approval templates commonly require a payee bank account. If the API accepts an unsupported account payload, automation can accidentally submit approvals that pass API validation but do not satisfy the template/UI semantics expected by finance users.

Suggested improvement

  • Add a preflight warning/error in lark-cli approval instances create when form contains unsupported control types such as account.
  • If possible, include the unsupported control names/ids in the error message.
  • Keep --dry-run useful by surfacing the same warning there.

Environment

  • CLI: lark-cli
  • Command family: approval instances create
  • Approval control type: account / 收款账户

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the approval instances create command and trace how form controls are validated, including the --dry-run path. Compare the command behavior with the approval initiation documentation, then verify that unsupported account controls are surfaced consistently before submission and in dry-run output.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
api, cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.