Skip to content

fix: clarify IM message dry-run limits#3

Open
hehanlin1996 wants to merge 1 commit into
mainfrom
ai-fix-20260515-im-agent
Open

fix: clarify IM message dry-run limits#3
hehanlin1996 wants to merge 1 commit into
mainfrom
ai-fix-20260515-im-agent

Conversation

@hehanlin1996
Copy link
Copy Markdown
Owner

Summary

Clarifies two IM shortcut UX gaps from the P1 IM/Agent collaboration evidence: im +messages-send --dry-run now explicitly warns that chat membership is not verified, and IM media flags now document the cwd-relative local path restriction.

Changes

  • Add a dry-run _notice.im_chat_membership warning for im +messages-send --chat-id --dry-run, while leaving direct --user-id sends unchanged.
  • Preserve media-upload dry-run descriptions and append the chat-membership caveat for pretty/description output.
  • Update +messages-send and +messages-reply media flag help to say local file paths must be cwd-relative and absolute paths are rejected.
  • Add unit coverage and IM dry-run E2E coverage for the new notice/help behavior.

Test Plan

  • TDD red: new IM dry-run/help unit tests failed before implementation.
  • go test ./shortcuts/im -count=1
  • go test -race -gcflags="all=-N -l" ./shortcuts/im -count=1
  • go build -buildvcs=false -o lark-cli . && LARK_CLI_BIN=$PWD/lark-cli go test ./tests/cli_e2e/im -run 'TestIM_MessagesSend(DryRunWarnsChatMembershipNotVerified|HelpDocumentsMediaPathRestriction)' -count=1 -v
  • gofmt -l shortcuts/im tests/cli_e2e/im/messages_send_dryrun_test.go produced no output
  • go vet ./shortcuts/im ./tests/cli_e2e/im
  • go mod tidy made no changes
  • make unit-test attempted; unrelated existing failure in shortcuts/base (TestBaseRecordExecuteReadCreateDelete/upload_attachment_uses_multipart_for_large_file, MIME detected as application/x-sega-cd-rom for large-report.bin). IM package passed in the same run.

Related Issues

@hehanlin1996 hehanlin1996 force-pushed the ai-fix-20260515-im-agent branch from 19baad1 to 1286237 Compare May 17, 2026 13:38
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