ci red on main: the #1721 updates-clock tests assume the runner's TZ is UTC — green on the UTC dev server, 10 failures on matou-workstation (GMT-5) and on NZST #1727
Labels
No labels
agent-blocked
agent-working
autopilot
bug
deferred
deploy-pending
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-design
needs-info
needs-triage
no-triage
out-of-scope
priority
ready-for-agent
ready-for-human
ready-for-session
rehearsal-183
snapshot-pending
standing-drive
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/idss#1727
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Symptom
ci/ seam is red onmainat8a0e9c61(sandcastle: #1721 — Updates times render WHERE THE OPERATOR IS, the zone named once). 10 dashboard unit tests fail:Run: https://git.matou.nz/Matou/idss/actions/runs/29905
Root cause — the tests depend on the runner's own TZ
#1721 made these screens render each UTC instant/window where the viewer is
(
dashboard/src/lib/localtime.ts). That is the intended behaviour and it works.But the assertions added/kept alongside it hard-code the UTC strings and assume
the process TZ is UTC.
updatePolicy.test.ts:48says so out loud:Nothing pins
TZ— notdashboard/vitest.config.ts, notscripts/seam-smoke.sh,not
.forgejo/workflows/ci.yml. So the suite passes or fails according to whichmachine runs it:
TZ=UTC(matou-dev-server-01, where the #1721 worker ran and reported green)America/Bogota(matou-workstation, the ci runner — verifiedtimedatectl)Pacific/Auckland(Ben's own machine)'Window14:00–16:00 NZST…' to contain '02:00–04:00'Reproduced deterministically by the healer on matou-workstation:
tests/unit/localtime.test.tsis the one file that got this right — it pins itszones, and it passes under every TZ above.
What needs deciding (why this is agent work, not a harness patch)
Two candidate fixes, and the choice is a product call the healer must not make:
(
process.env.TZ/vi.stubEnvper file, or assert through thelocaltime.tshelpers rather than against literal clock strings), the way
localtime.test.tsalready does. Keeps the suite honest about the local-rendering behaviour
#1721 shipped.
TZ: 'UTC'for the whole dashboard suite (test.envindashboard/vitest.config.ts) and keep explicit-zone tests only where thezone is the subject. Cheapest, but it makes every clock assertion silently
mean "UTC" again — the exact ambiguity #1721 set out to remove.
Whichever is chosen, the fix belongs in
dashboard/, not in the CI workflow:pinning TZ only in
.forgejo/workflows/ci.ymlwould turnmaingreen whileleaving
pnpm testred for any human not sitting at UTC.Note
playwright.harness.config.tsalready pinstimezoneId: 'Pacific/Auckland'for preview renders (#1721 did this deliberately) — the vitest side never got the
matching treatment.
Acceptance
dashboardvitest passes underTZ=UTC,TZ=America/BogotaandTZ=Pacific/Auckland(all three checked in the ticket's verification).gateway-UTC
HH:MMstorage contract stay exactly as they are.mainis green onci.Filed by the swarm healer — ci run 29905, signature
c1408288ddac,heal run
heal-Matou-idss-1790059949-3987232. Regression from8a0e9c61(#1721).swarm-claim host=bens-mac-04 run=29926
(automated multi-host claim — lowest live claim id works this ticket)
Ruled by agent under ADR 0174 — veto anytime.
Decision: of the two candidate fixes, take Option 1 (make the assertions zone-explicit), not Option 2 (pin
TZ=UTCsuite-wide).Ruling: the ten TZ-dependent assertions in
updates/updateReview/updatePolicy/rollout/rollbacknow assert through thelocaltime.tshelpers (windowPhrase,localInstant,localWindow,localClockToUtc) with the same default zone+anchor the components use — exactly aslocaltime.test.tsalready does. No literal clock string is hard-coded, so the suite is deterministic underTZ=UTC,America/BogotaandPacific/Auckland, and a regression that dropped the zone marker or the conversion still reds the test (it would no longer match the helper output). No product code changes: #1721 local-zone rendering and the gateway-UTCHH:MMstorage contract are untouched.Why two-way door: revertible by a later commit (test-only change), and provable by the existing suite run under all three TZs. Option 2 was rejected because it would make every clock assertion silently mean UTC again — the exact ambiguity #1721 removed. The fix lives in
dashboard/, not.forgejo/, sopnpm teststays green for anyone not on UTC.What proves it:
TZ=UTC|America/Bogota|Pacific/Auckland npx vitest run tests/unit/{updates,updateReview,updatePolicy,rollout,rollback}.test.ts— all green.close-report for #1727 — status
success✅ close-report gates passed — every claim verified against main; issue closed.
envelope