Repository navigation
Description
Implementation: FlyBot (ours) — PR follows within 24h. Do not pick up without a pickup-ok comment on this issue.
Written-by: FlyBot Lead
Claimed-by: FlyBot Lead
Claim-Id: b8416b79222d43199c9183fce882b342
Branch: dev/1-face-when-local-tz
Base: 5cb1692
At: 2026-11-15T08:38:28Z
Implementation: FlyBot (ours) — PR follows within 24h. Do not pick up without a pickup-ok comment on this issue.
Written-by: FlyBot Lead
Bot: FlyBot Dev-1
What goes wrong
plugins/social/test/face-rooms.test.js pins a local-time render to fixed UTC strings. faceRoomTitle formats through core/src/shared/face-title.js formatFaceWhen, which reads the host's local zone (date.getHours(), getMinutes(), getMonth(), getDate()), so the same instant renders differently per zone — and only TZ=UTC produces the strings the test expects:
TZ |
2026-10-17T14:38:00.000Z |
|---|---|
| UTC | Oct 17 14:38 (asserted) |
| Asia/Shanghai | Oct 17 22:38 |
| Europe/Berlin | Oct 17 16:38 |
| America/New_York | Oct 17 10:38 |
Two assertions on live main 5cb16923 therefore go red on any machine that is not in UTC — for a rendering that is correct:
:250const at = '2026-10-17T14:38:00.000Z'→:254expectsFace-to-face · UiA1415, UiB1415 · Oct 17 14:38.#194case at:644::646/:647expiresAt: '2026-10-17T13:06:00.000Z'with:649expecting/12:56$/, and:650/:651createdAt: '2026-10-17T12:40:00.000Z'.
Red first, base 5cb16923, plugins/social → node --import ./test/resolve.mjs --test test/face-rooms.test.js (38 tests, 36 pass / 2 fail in both zones):
TZ=Asia/Shanghai
not ok 9 - owner-typed face-room lines encode as a human envelope
+ 'Face-to-face · UiA1415, UiB1415 · Oct 17 22:38'
- 'Face-to-face · UiA1415, UiB1415 · Oct 17 14:38'
not ok 28 - #194: a face room title shows one time, the creation time, before and after Enter chat
The input did not match the regular expression /12:56$/. Input:
'Face-to-face · Alice · Oct 17 20:56'
TZ=America/New_York → same two, actual `… · Oct 17 10:38` and `'Face-to-face · Alice · Oct 17 08:56'`
Different offsets, same class of failure: the expectation is tied to the host zone, not to an offset bug.
Expected
The tests keep asserting exactly what they assert today — the title carries the room's local creation time, and two rooms with the same owners stay distinguishable — but pass in every zone:
- build the fixture instants from local components (
new Date(2026, 9, 17, 14, 38).toISOString()), soOct 17 14:38and/12:56$/hold everywhere; or - assert against
formatFaceWhen(at)computed in the same process.
Expectations stay exact: no tolerance window, no regex that accepts any hour, no skip/todo, and the neighbouring assertions (:253 titleA === titleB, :255-262, :257-260 two different starts must still differ) unchanged. The test must not become vacuous.
Scope
- Test only:
plugins/social/test/face-rooms.test.js(+ its byte-identical mirror if this file keeps one). - No product change:
core/src/shared/face-title.js/plugins/social/src/face-rooms.jskeep formatting in local time. - T1 (test-only diff), no user-visible behaviour change.
plugins/social/test/**maps todocs/subsystems/social.md; test-only, so the commit carries aDocs-not-needed:trailer rather than a doc edit.
Acceptance
- Red on the base in a non-UTC zone (above, two zones, same class).
- Green after the change in
TZ=UTC,TZ=Asia/Shanghai,TZ=Europe/Berlin, twice each, 38/38 every run. - Whole social package green in a non-UTC zone (
TZ=Asia/Shanghai npm --prefix plugins/social test, 701/701), andnpm run verifyexit 0. - No third hard-coded local render left in the same file.
Out of scope (checked, not changed)
plugins/social/test/social.test.js:4076/:4086 carries the same literal but is not red: shownFaceTitle reuses the timestamp stored in room.name (storedWhen → faceStamp) instead of re-deriving local time — 492/492 under TZ=Asia/Shanghai.
Dedupe (2026-11-15, live main 5cb16923)
git grepon live main: the onlygetHours()-formatted assertions inplugins/social/test/are the two fixed here.- Issue search, open and closed on
repo:ThinkFlowLab/FlyBot:face-rooms timezone,face-rooms UTC,formatFaceWhen,test local time— no hit. Near matches are unrelated: aDate.now()race inroom-invite-preview.test.js(Test flake: room-invite-preview compares a rendered countdown against a second Date.now(), losing a second at the boundary #1839), unknowntimeZonevalidation (An unknown timeZone in one project-read request throws out of the whole Project board, not just the metrics block #1849). - File sha at that tree:
8bae984a066c56f7b5648953486cd18db76055a7.
Activity
HugoXK commentedon Nov 15, 2026
Heartbeat
Written-by: FlyBot Lead
Still-working: b8416b79222d43199c9183fce882b342
At: 2026-11-15T08:45:56Z
social test: face-rooms pins local-time titles to UTC strings, so the…