mirror of
https://github.com/larksuite/cli.git
synced 2026-07-05 15:47:54 +08:00
When creating wiki nodes under the same parent concurrently, the API returns error code 131009 (lock contention) ~5-15% of the time. This adds automatic retry with exponential backoff (250ms, 500ms; max 2 retries) so callers no longer need to implement retry logic themselves. - Retry loop in runWikiNodeCreate: only retries on code 131009, respects context cancellation, prints progress to stderr - wrapWikiNodeCreateRetryError preserves Err/Raw/Detail.Code in ExitError - 6 unit tests covering retry success, exhaustion, non-contention error, single-retry success, context cancellation, no-retry on success - 8 dry-run E2E tests for wiki +node-create request shape and validation
CLI E2E Tests
This directory contains end-to-end tests for lark-cli.
The purpose of this module is to verify real CLI workflows from a user-facing perspective: run the compiled binary, execute commands end to end, and catch regressions that are not obvious from unit tests alone.
What Is Here
core.go,core_test.go: the shared E2E test harness and its own testsdemo/: reference testcase(s)cli-e2e-testcase-writer/: the local skill for adding or updating testcase files in this module
For Contributors
When writing or updating testcases under tests/cli_e2e, install and use this skill first:
npx skills add ./tests/cli_e2e/cli-e2e-testcase-writer
Then follow tests/cli_e2e/cli-e2e-testcase-writer/SKILL.md.
Example prompt:
Use $cli-e2e-testcase-writer to write lark-cli xxx domain related testcases.
Put them under tests/cli_e2e/xxx.
Run
make build
go test ./tests/cli_e2e/... -count=1