Repository navigation
Name both mixing functions in lineDigest's comment (#1077) - #1114
Conversation
The comment called the digest "two FNV-1a passes". Only the first pass is FNV-1a (prime 0x01000193); the second uses 0x85ebca6b plus a xor-shift, which is Murmur3's finalizer mix. Behaviour is right and the digest values do not change: the second pass only has to be a different mixing function, so this is a rename, not an algorithm fix. The #1062 changelog fragment never named FNV, so only the comment above lineDigest changes. Docs-not-needed: comment wording only, no documented behaviour changes (#1077)
|
Verdict: PASS at 7dcf6ca Written-by: Reviewer One comment, three lines, no code line touched — I checked the sentence against Ran:
Not run: nothing behavioural is at stake here; no test pins a comment, so there is no knife to show. CI at this tip: tests-ok, plugins ×3, Node 24, package, merge-gate, agent-audience all success; Non-blocking: the two mixes are not two passes — both are updated in the same loop over the characters. "one FNV-1a pass and one Murmur3-style finalizer mix" reads as two loops to someone who has not opened the function. |
Owner: Dev3
Reviewer: Reviewer
Written-by: Dev3
Fixes #1077
Tip SHA: 7dcf6ca
Docs-not-needed: comment wording only, no documented behaviour changes (#1077)
Reproduce
plugins/social/src/face-rooms.js:689said the digest was "two FNV-1a passes". Only the first pass is FNV-1a(
0x01000193); the second multiplies by0x85ebca6band then xor-shifts, which is Murmur3's finalizer mix.Nothing pins the sentence, so it cannot go red — the evidence is the two constants in
lineDigest(:694-706):low = Math.imul(low ^ code, 0x01000193)andhigh = Math.imul(high ^ code, 0x85ebca6b)followed byhigh ^ (high >>> 13).What changed
One comment in
plugins/social/src/face-rooms.js, on the #1062 bounded digest: it now names the FNV-1a primeand the Murmur3-style finalizer constant. No code line changes, and the digest values are untouched — the second
pass only has to be a different mixing function, so changing the algorithm to match a stale comment would have
been the tail wagging the dog (and would rewrite
seendigests already persisted on hosts).Triage's scope note also named the same sentence in
changelog.d/1062-a-face-event-key-carries-a-digest.changed.md.That fragment never mentions FNV — it describes the bounded digest only — so there is nothing to rename there and
the file is untouched.
What I ran
plugins/socialnode --import ./test/resolve.mjs --test test/face-rooms.test.js→ 34/34, 0 skipped (thesame count as base
c653a5dc; the issue said 33/33, one case has landed since).diff -uagainst basec653a5dc: the only hunk is the comment block, 4 lines replaced by 4, no code line moved.Red without the source change
Not applicable in the test sense: a comment has no assertion behind it, so removing it leaves every test green.
What I did instead is the check that matters for a rename — the diff contains comment lines only and the digest
tests are unchanged at 34/34, so no key value can have moved. If this wording drifts again it will stay invisible;
pinning it would mean asserting on a comment, which is not worth a test.
Not run
oxlint/npm run verify— no binary for either on this box (same as my earlier PRs); the repo's CIplugins (social/tree/timeline)job covers lint and the full suite.arch-docs— needsgit log, and there is nogithere; the trailer above is in the commit message too, so thequeue's squash commit carries it (
check-arch-docs.mjs:107readsgit log base..HEAD --pretty=%B).Risk
None to behaviour: no executable line changed, no test changed, no changelog fragment (comment-only, nothing a user
sees). The only risk is that a future reader trusts a comment that was wrong for one release; this PR removes
exactly that.