chore(weixin): synthetic test id + redact recipient in no-token warning - #62
Merged
NewFuture merged 4 commits intoAug 11, 2026
Merged
Conversation
There was a problem hiding this comment.
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
redactTokento 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.
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.
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Minimal follow-up to #60 (the
contextTokenfail-closed fix, now shipped in v3.1.1).Two small polish items left from review — no behavior change:
send.test.tsused a recipient id that looks like a real Weixin peer id (o9cq806PLhqoC5-fjuN63zCyAInQ@im.wechat). Replaced with an unmistakably synthetic value (oSYNTH0000000000000000000000@im.wechat), perCONTRIBUTING.md(remove account identifiers from tests) and the review notes.error-notice.tsstill logged the full recipient id in itsno contextTokenwarning. Redacted it withredactTokenso 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.Refs: #60, Tencent/openclaw-weixin#247