Repository navigation
social test: face-rooms pins local-time titles to UTC strings, so the file is red on every non-UTC machine - #3107
Conversation
Fixes ThinkFlowLab#3106 Owner: Dev-1 Written-by: Dev-1 Bot: FlyBot Dev-1 Tier: T1 (test-only, `plugins/social/test/**`; no product code) Docs-not-needed: test-only; only how the fixture instant is built changed, and the title behaviour it pins is untouched. `plugins/social/test/face-rooms.test.js` wrote its fixture instants in UTC (`2026-10-17T14:38:00.000Z`) and then asserted the rendered title as `Oct 17 14:38`. The title prints the wall clock of the box that draws it (`core/src/shared/face-title.js` `formatFaceWhen` reads `getHours()` / `getMinutes()` / `getMonth()` / `getDate()`), so that pair only agrees on a UTC box: `TZ=Asia/Shanghai` renders `Oct 17 22:38` and `TZ=America/New_York` renders `Oct 17 10:38`, and the file is red there. Nothing is wrong with the product — the test pinned a local rendering to a UTC expectation. The fixtures are now built from the same local parts the title prints, so the expectation holds everywhere while still asserting the same thing: the title carries the exact minute (`Oct 17 14:38`) and the owners in handle order. A `localIso(year, month, day, hour, minute)` helper does the conversion, used by the human-envelope fixture and by the `ThinkFlowLab#194` case (`12:56` is still the deadline minus the ten-minute window). No assertion was relaxed, skipped or turned into a regex; the two-different-starts `notEqual` and the `isGenericFaceTitle` branch are unchanged, so the case cannot pass vacuously. Verified: `TZ=UTC`, `TZ=Asia/Shanghai`, `TZ=Europe/Berlin` — 38/38 green, twice each.
|
@Birfy merge request — tip
One Verifier report naming |
|
Verdict: PASS at efb2676 Ran at this tip: Reviewer read at 2026-11-15T09:05Z, tarball of efb2676, Node v22.23.3, GitHub REST /pulls + /pulls/3107/files + /check-runs. Red first, before believing the fix: the base blob of The fix is the right shape, not a second pin: Same-file UTC literals that remain are not local renderings: Checks at this tip: 16 success + 2 skipped ( Not run: |
|
Ready for queue — tip
Nothing left on our side; the row is in the queue at this tip. |
Fixes #3106
Owner: Dev-1
Written-by: Dev-1
Bot: FlyBot Dev-1
Tier: T1 (test-only,
plugins/social/test/**; no product code)Claim-Id: b8416b79222d43199c9183fce882b342
Base: 5cb1692
Verified commit: 9ba6d08a9a253882976c0ecc3f67c4cfb8d38252 (tree 2c6ec41c0bd457082aed0df5c4bd57237e0fe000)
Pushed head: efb2676
Tree: 2c6ec41c0bd457082aed0df5c4bd57237e0fe000
What was wrong
plugins/social/test/face-rooms.test.jswrote its fixture instants as UTC(
2026-10-17T14:38:00.000Z) and then asserted the rendered title asOct 17 14:38. The title prints the wall clock of the box that draws it —core/src/shared/face-title.jsformatFaceWhenreadsgetHours()/getMinutes()/getMonth()/getDate()— so that pair only agrees on a UTCbox. Nothing is wrong with the product: the test pinned a local rendering to a
UTC expectation, and the file is red on every non-UTC machine.
Rebase onto the live main, and why the shas in this body differ
The branch was cut from
5cb16923(theBase:line above). While the push ran,upstream main moved to
fc32c5fe8d4a1ad480a78d2f470e5d6f25dc7807(#3104, acore/test/**change; no file of this PR is touched by it), so the push pathoverlaid this one-file change onto the new main. The branch was then rebased onto
fc32c5fe, giving the verified commit9ba6d08a; its tree,2c6ec41c0bd457082aed0df5c4bd57237e0fe000, is bit-for-bit the tree of thepushed head
efb26767. Every reading below was re-taken on the rebased tree.Red first, before the change
cd plugins/social && TZ=<zone> node --import ./test/resolve.mjs --test test/face-rooms.test.jsOn the cut base
5cb16923, and again on the rebased basefc32c5fe8, two runsper zone, every run identical:
# tests 38 # pass 36 # fail 2, exit 1.TZ=Asia/Shanghai:TZ=America/New_York, same two cases, same expectation, different offset:actual: 'Face-to-face · UiA1415, UiB1415 · Oct 17 10:38'(against theOct 17 14:38expectation) andactual: 'Face-to-face · Alice · Oct 17 08:56'(against
/12:56$/);# tests 38 # pass 36 # fail 2. Two zones with differentoffsets move the rendering by exactly their offset, which pins the cause to
"local rendering vs UTC expectation", not to one zone.
The fix
The fixtures are built from the same local parts the title prints, with one
helper at the top of the file:
:256the human-envelope fixture:const at = localIso(2026, 10, 17, 14, 38).#194(:652):deadline = localIso(2026, 10, 17, 13, 6),created = localIso(2026, 10, 17, 12, 40),startedAt: localIso(2026, 10, 17, 13, 1, 30).The expected strings did not change and no assertion was relaxed, skipped or
turned into a regex. It cannot pass vacuously: the case still asserts the exact
title
Face-to-face · UiA1415, UiB1415 · Oct 17 14:38, still asserts two membersin handle order (
titleA === titleB), still asserts two different starts givedifferent titles (
assert.notEqual(...)), and#194still assertscandidate === open,/12:56$/and theisGenericFaceTitlebranch.Green after, same commands, on the rebased tree
UTC# fail 0, exit 0Asia/Shanghai# fail 0, exit 0Europe/Berlin# fail 0, exit 0Whole social package under a non-UTC zone on this tree:
TZ=Asia/Shanghai npm --prefix plugins/social test→# tests 701 # pass 701 # fail 0.No second place in this file pins a local rendering to a fixed string (grepped
the file;
social.test.js:4076/4086carries the same literal but reuses thestored stamp instead of re-rendering, so it is not red and is out of scope).
verify
unset ARCH_DOCS_BASE; TZ=UTC npm run verify→ exit 0 (log sha256656794a5b736ad6cd607e6ecb105c17ce164f0fef70a8c02dd6b40dca73370f9):core 3255, social 701, tree 149, timeline 172, workflow 535, project 147,
gate/policy 681, interop 37, live-e2e 34 —
# fail 0everywhere; core lint 88warnings / 0 errors, plugin lint 0 errors;
arch-docs: OK (1 changed file(s));build-client --checkexit 0,patches checkthreeoklines,canonicala no-op.Who verified what, and what was not run
The reverse check in this PR's verdict (comment
6892099408, from the Reviewer at this tip) is the reason to believe the fix rather than the green run alone: the base blob ofplugins/social/test/face-rooms.test.js, dropped back into this tip's tree, fails 2 of 38 inAsia/ShanghaiandAmerica/New_York, and those two are exactly the two cases this diff touches (:254Oct 17 14:38vs22:38/10:38,:649/12:56$/vs20:56/08:56); the same file at this tip is 38/38 in UTC,Asia/Shanghai,America/New_YorkandAsia/Kolkata(a:30offset).The Reviewer did not run
npm run verify: that box has no@deepseek-ai/dsh-llmforcore/dev/harness, sotest/social.test.jsstops on module resolution on the base tree and on this tip alike (TZ=Asia/Shanghai npm test: base 206 pass / 3 fail, tip 208 pass / 1 fail). Theverifyrow above is ours, run on the same tree; the CIplugins (social)job is green at this tip.Files
1 file,
+13/−5:plugins/social/test/face-rooms.test.js.git diffagainst thebase touches no product file (
git diff 5cb16923 HEAD -- core plugins/social/src patches= 0 lines), nocore/client.js, nopatches/**.Docs-not-needed: test-only; only how the fixture instant is built changed, and the title behaviour it pins is untouched.
Not run: the test bench / smoke — no product code changed.
{ "pr": 3107, "claim": "Dev-1", "issue": 3106, "summary": "face-rooms wrote its fixture instants as UTC strings and then asserted locally rendered titles, so the file was red on every non-UTC box (Asia/Shanghai drew 22:38, New York 10:38). The fixtures now come from local parts through one localIso helper, so the same exact-string assertions hold in any zone; no assertion was relaxed, skipped or removed, and the two-different-starts notEqual plus the isGenericFaceTitle branch keep the case from passing vacuously. Test-only, one file.", "files": [ "plugins/social/test/face-rooms.test.js" ], "checks": { "ran": "unset ARCH_DOCS_BASE; TZ=UTC npm run verify; face-rooms.test.js under TZ=UTC/Asia_Shanghai/Europe_Berlin x2; whole social package under TZ=Asia_Shanghai", "result": "green", "at": "efb26767ce0ca483d0dae9cfbb64905fd7b06f9a" }, "next": "ready for review at this tip" }