feat: enable per-user DingTalk card debugging #7

Merged
zheromiku merged 1 commits from feature/card-feedback-debug into main 2026-07-21 18:06:43 +08:00
Owner

Summary

  • Add an optional single-user allowlist for DingTalk's official card debug tool.
  • Inject _CARD_DEBUG_TOOL_ENTRY=show only through that user's top-level privateData during createAndDeliver.
  • Keep all non-allowlisted direct and group users unchanged.
  • Document the optional environment variable without real IDs.

Verification

  • 189 target tests passed, 0 failed.
  • Race detector passed for DingTalk and main packages.
  • go vet, target build, and git diff --check passed.
  • Static scan found no credentials, real template ID, debug user ID, or debug message phrase.

Safety

  • Debugging is disabled when DINGTALK_CARD_DEBUG_USER_ID is empty.
  • The allowlisted user ID is runtime-only and is not stored in Git or logs.
  • No database migration is introduced by this PR.
## Summary - Add an optional single-user allowlist for DingTalk's official card debug tool. - Inject `_CARD_DEBUG_TOOL_ENTRY=show` only through that user's top-level `privateData` during `createAndDeliver`. - Keep all non-allowlisted direct and group users unchanged. - Document the optional environment variable without real IDs. ## Verification - 189 target tests passed, 0 failed. - Race detector passed for DingTalk and main packages. - `go vet`, target build, and `git diff --check` passed. - Static scan found no credentials, real template ID, debug user ID, or debug message phrase. ## Safety - Debugging is disabled when `DINGTALK_CARD_DEBUG_USER_ID` is empty. - The allowlisted user ID is runtime-only and is not stored in Git or logs. - No database migration is introduced by this PR.
zheromiku added 1 commit 2026-07-21 18:06:41 +08:00
zheromiku merged commit fcf4559c9a into main 2026-07-21 18:06:43 +08:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Weknora/dobotai-platform#7