approval instances create accepts unsupported account control value
Nobody has claimed this yet.
- 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 getreports the control as required, typeaccount.- The local lark-cli skill/reference docs list
accountunder controls unsupported byapproval instances create. - If a caller copies a complete
accountvalue object from a previous successful instance and includes it ininstances 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:
approval instances createshould reject unsupportedaccountcontrols with a clear error before sending / after API response; or- the docs and CLI schema should explicitly document that copying a full historical
accountvalue 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 createwhenformcontains unsupported control types such asaccount. - If possible, include the unsupported control names/ids in the error message.
- Keep
--dry-runuseful 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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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