Repository navigation
Add the community WeChat QR code and a README Community section - #2574
Merged
Merged
Conversation
The photo of the group invite lived only on the Bot machine. scripts/community-qr.mjs cuts it to the code plus a white quiet zone, drops every pixel outside the code and all metadata, and verifies the written PNG decodes back to the same invite. The committed PNG is 674x674: the 794 px photo crop does not decode in jsQR at 1:1, the 480 px code does, and a phone reads that size at least as well. README.md and README.zh.md get the section between Built on and License, with the expiry note. Fixes #775 Docs-not-needed: README and a maintenance script only; no architecture or subsystem change.
Collaborator
Author
|
Verdict: PASS at 5c6dff0 Ran at this tip: Risk tier: T3 (risk-tier: T3; basis: package.json=T3, scripts/community-qr.mjs=T3, changelog.d/775-community-qr.added.md=T1, docs/assets/wechat-group.png=T0, README.md=T0, README.zh.md=T0). What I checked
Not run
Non-blocking notes
|
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.
Written-by: Dev
Fixes #775
Owner: Chief
Reviewer: Reviewer
Tip SHA: 5c6dff0
Base: d5620ee
Docs-not-needed: README, one asset and a maintenance script; no architecture or subsystem change.
What changed
docs/assets/wechat-group.png— the group invite cut to the code plus a 20% white quiet zone, 674x674, RGBA, no text chunks (no EXIF, no personal data).scripts/community-qr.mjs— reads the source JPEG, locates the code with jsQR, keeps only pixels inside the code quad and paints everything else white, downscales, and refuses to write unless the produced PNG decodes back to the same invite.README.md/README.zh.md— a## Community/## 社区section between## Built onand## License, with the image and alt textWeChat group QR code for FlyBot, one line on the group, and the expiry note (static image + ask for a fresh code).changelog.d/775-community-qr.added.md,package.json— the fragment and the three devDependencies (jpeg-js,jsqr,pngjs); no runtime dependency changed.Verification at the tip
Ran:
node scripts/community-qr.mjstwice — same 674x674 PNG, both times sha2563775e6a6692195a15c2dad9d813aa998f480bb10175959b183943b0ebfd9ae61, payloadhttps://weixin.qq.com/g/AwYAADxvpVtVZlgHI9xPtdCVgn8QWvTLSEjzVtcR7rM665eSyKjcFl0rW--GSgi9; the script's own jsQR check decodes the written PNG back to that payload.node .github/scripts/changelog.mjs check-> 1 fragment well formed.Not run (and why):
TZ=UTC npm run verifylocally — this tree has nocore/node_modules, and the change touches no core or plugin code; CI runs it at this tip. Phone scan — this host has no camera and no vision model; that check stays the owner's.Decoder evidence (the gap Chief flagged)
jsQR on the source JPEG 1080x1596 decodes. On the 1:1 crop (794 px code, 80/159/240/320 px margins) it fails, as does that crop thresholded to pure black/white at 80/110/140/170/200, and at 0.75x/1.5x/2x. Box-filter resampling decodes at 0.4x-0.6x (445-668 px); 0.65x fails again, so the failure is jsQR's above roughly 620 px on this code, not the crop. The committed file therefore uses a 480 px code edge (674x674 overall) and the script re-decodes it before writing, so a future regeneration cannot silently commit a dead code. This proves a decoder reads the file; it does not prove a phone camera does — that stays the owner's check.
Risks
The QR expires (WeChat rotates it about every 7 days); the README says so and points readers at Issues for a fresh one. Replacing it is one run of the script.
package.jsongains three devDependencies; the repo root had no lockfile and CI does not install root dependencies, so no CI impact.Checkpoint
{
"pr": 2574,
"claim": "Chief",
"issue": 775,
"summary": "The community WeChat group QR code is now a committed 674x674 PNG cut from the owner photo: only the code and a white quiet zone, no metadata, no chat content. scripts/community-qr.mjs regenerates it and refuses to write unless jsQR decodes the result back to the same invite. README.md and README.zh.md gain a Community section with the image, alt text and an expiry note. A changelog fragment and three root devDependencies are added.",
"files": [
"docs/assets/wechat-group.png",
"scripts/community-qr.mjs",
"README.md",
"README.zh.md",
"package.json",
"changelog.d/775-community-qr.added.md"
],
"checks": {
"ran": "node scripts/community-qr.mjs; node .github/scripts/changelog.mjs check",
"result": "green",
"at": "5c6dff0a96eae2d784e92d8f6808e3fd62654b58"
},
"next": "none — ready for review; owner still has to scan the committed code with a phone"
}