Skip to content

chore(weixin): synthetic test id + redact recipient in no-token warning - #62

Merged
NewFuture merged 4 commits into
NewFuture:mainfrom
stwhwing:fix/test-synthetic-id-and-notice-redact
Aug 11, 2026
Merged

NewFuture merged 4 commits into
NewFuture:mainfrom
stwhwing:fix/test-synthetic-id-and-notice-redact

Conversation

@stwhwing

Copy link
Copy Markdown
Contributor

Summary

Minimal follow-up to #60 (the contextToken fail-closed fix, now shipped in v3.1.1).

Two small polish items left from review — no behavior change:

  • test(weixin): send.test.ts used a recipient id that looks like a real Weixin peer id (o9cq806PLhqoC5-fjuN63zCyAInQ@im.wechat). Replaced with an unmistakably synthetic value (oSYNTH0000000000000000000000@im.wechat), per CONTRIBUTING.md (remove account identifiers from tests) and the review notes.
  • fix(weixin): error-notice.ts still logged the full recipient id in its no contextToken warning. Redacted it with redactToken so the warning no longer leaks the peer id (consistent with the redaction goal of fix(weixin): refuse to send when contextToken is missing (avoid silent-drop) #60 / upstream #247).

Test plan

  • npm test (Vitest) — existing silent-drop tests still pass; only the fixture id changed.
  • No production logic touched.

Refs: #60, Tencent/openclaw-weixin#247

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Follow-up to #60 that replaces a realistic test recipient ID and redacts the recipient in a missing-token warning.

Changes:

  • Uses a clearly synthetic recipient ID in sending tests.
  • Applies redactToken to the warning log.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/messaging/send.test.ts Replaces the recipient fixture with a synthetic ID.
src/messaging/error-notice.ts Redacts the recipient in the missing-token warning.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/messaging/error-notice.ts
Addresses Copilot review on PR NewFuture#62: the missing-contextToken branch now
logs a redacted target via redactToken(); add an assertion that the warn
call excludes the full (synthetic) recipient id so the privacy boundary
cannot regress while the suite stays green.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

@NewFuture
NewFuture merged commit 23de8f4 into NewFuture:main Aug 11, 2026
10 checks passed
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.

3 participants