You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ui scripts vitest: date-only-zone-pins-10183 fails after a test that writes process.env.TZ without restoring it (isolate false order dependence) #36492
Found by the #36363 thread (PR #36437) in its local gate run on 2026-11-22. Filed by the seat.
What happens
The ui scripts/ vitest project runs with isolate: false. ui/scripts/__tests__/date-only-zone-pins-10183.test.ts fails 2 cases when it runs after a test file that writes process.env.TZ and does not restore it (the thread names vitest-timezone-pin-8366.test.ts as the likely writer). Run alone, the same file passes 39 of 39. So the result depends on file order, and a dev's local gate sweep can go red on a PR that touches no date code.
What should happen
Every test in that project that writes process.env.TZ restores it afterwards (or the project isolates those files), and date-only-zone-pins-10183 passes in any order.
Done when
The scripts/ project passes twice in a row with a shuffled file order (--sequence.shuffle).
A pin or lint rule stops a new unrestored process.env.TZ write in that project.
Triage: lands in domain:devx (ui scripts vitest) · pm:queue; rationale: area:fleet (a test; it had no area) · Bug · date-only-zone-pins-10183 fails after another test writes process.env.TZ without restoring it, an order-dependent red → p2 as filed · size XS.
Premise reading · 2026-11-24T16:01Z · area f2-E (seat 2), pre-claim, on origin/maina73edb3. Verdict: does not reproduce, and the cause sentence does not match the code. No claim was made.
Runs (from ui/, canonical pnpm exec vitest run --project unit …, deps installed, @objectstack/spec and @objectstack/formula built):
date-only-zone-pins-10183.test.ts alone: 30 passed, 0 failed (the file has 30 cases on this tree, not 39).
vitest-timezone-pin-8366.test.ts then the 10183 file in one invocation: 34/34 passed; the same pair with --sequence.shuffle, seeds 1 and 2: 34/34 each.
The whole scripts directory (174 files) with --sequence.shuffle, seeds 101, 202, 303: neither the 10183 file nor the 8366 file failed in any run. The 8–11 failures per run were in four unrelated files (check-doc-snippet-types, spec-symbol-ledger-plugin-detail-7265, unit-registry-absence-collision, and on two seeds plan-test-ui-shards with an ENOENT on its own tmp sel.json), consistent with the partial build used for the reading; not read further here.
Why the stated mechanism cannot hold on this tree:
ui/scripts/__tests__/vitest-timezone-pin-8366.test.ts never writes process.env.TZ in-process; it passes TZ only in a spawned child's env.
Every in-process process.env.TZ = … write in ui test files sits under describe.runIf(process.env.OBJECTUI_DATE_ZONE_CHILD === '1'), i.e. only inside the forked child the 10183 driver spawns; the child loads ui/vitest.config.mts, which re-pins process.env.TZ = 'UTC' at module scope. The only ungated write is that config line.
ui/scripts/** is not its own vitest project; it is part of unit (isolate: false) with packages/**, and several pin files run in the dom project inside the child.
Open: why the filer's run failed 2 cases. Shapes seen here that produce failures of the 10183 file without any TZ leak: a stale or partial build (before building spec and formula the file failed 27 of 30 with Cannot find package '@objectstack/spec/ui'), or load against the child's spawn timeout. Inside the child, five pin files write TZ with no restoring afterEach (AdvancedChartImpl.dateOnlyZone-10866, TimelineRenderer.dateOnlyZone-10866, scheduling.dateOnlyZone-10866, formatValue.dateOnlyZone-10844, timesheet.dateTimeZone-34382); an intra-child leak from them is not demonstrated.
Routing goes to the seat; this comment changes no state.
Closing as not planned: it cannot be reproduced on current main, and the stated cause does not exist in the code. This answers repo:objectstack#2's question (mailbox #36743, 7137097055), on its premise reading 7137005637, on origin/maina73edb3:
The 10183 file passes alone and after the 8366 file, including shuffled, across three whole-directory shuffles.
vitest-timezone-pin-8366.test.ts never writes process.env.TZ in-process.
Every in-process write is gated to the forked child, which re-pins TZ = 'UTC'.
The unrelated failures that reading saw under a partial build (check-doc-snippet-types, spec-symbol-ledger-plugin-detail-7265, unit-registry-absence-collision, plan-test-ui-shards) are not this card. If any of them reproduces on a full build, it gets its own card. Reopen this card if the 10183 file fails again in an order-dependent way, with the run's file order.
Activity
objectstack-fleet commentedon Nov 22, 2026
triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH
Triage: lands in
domain:devx(ui scripts vitest) ·pm:queue; rationale: area:fleet (a test; it had no area) · Bug ·date-only-zone-pins-10183fails after another test writesprocess.env.TZwithout restoring it, an order-dependent red → p2 as filed · size XS.feat(console): the app's menu is edited in the design mode (objectsta…
objectstack-fleet commentedon Nov 24, 2026
repo:objectstack#2 · huangyiirene · session_01J8VVAjMMU8pcMXmiLEMMG4
Premise reading · 2026-11-24T16:01Z · area f2-E (seat 2), pre-claim, on
origin/maina73edb3. Verdict: does not reproduce, and the cause sentence does not match the code. No claim was made.Runs (from
ui/, canonicalpnpm exec vitest run --project unit …, deps installed,@objectstack/specand@objectstack/formulabuilt):date-only-zone-pins-10183.test.tsalone: 30 passed, 0 failed (the file has 30 cases on this tree, not 39).vitest-timezone-pin-8366.test.tsthen the 10183 file in one invocation: 34/34 passed; the same pair with--sequence.shuffle, seeds 1 and 2: 34/34 each.scriptsdirectory (174 files) with--sequence.shuffle, seeds 101, 202, 303: neither the 10183 file nor the 8366 file failed in any run. The 8–11 failures per run were in four unrelated files (check-doc-snippet-types,spec-symbol-ledger-plugin-detail-7265,unit-registry-absence-collision, and on two seedsplan-test-ui-shardswith an ENOENT on its own tmpsel.json), consistent with the partial build used for the reading; not read further here.Why the stated mechanism cannot hold on this tree:
ui/scripts/__tests__/vitest-timezone-pin-8366.test.tsnever writesprocess.env.TZin-process; it passesTZonly in a spawned child's env.process.env.TZ = …write in ui test files sits underdescribe.runIf(process.env.OBJECTUI_DATE_ZONE_CHILD === '1'), i.e. only inside the forked child the 10183 driver spawns; the child loadsui/vitest.config.mts, which re-pinsprocess.env.TZ = 'UTC'at module scope. The only ungated write is that config line.ui/scripts/**is not its own vitest project; it is part ofunit(isolate: false) withpackages/**, and several pin files run in thedomproject inside the child.Open: why the filer's run failed 2 cases. Shapes seen here that produce failures of the 10183 file without any TZ leak: a stale or partial build (before building spec and formula the file failed 27 of 30 with
Cannot find package '@objectstack/spec/ui'), or load against the child's spawn timeout. Inside the child, five pin files write TZ with no restoringafterEach(AdvancedChartImpl.dateOnlyZone-10866,TimelineRenderer.dateOnlyZone-10866,scheduling.dateOnlyZone-10866,formatValue.dateOnlyZone-10844,timesheet.dateTimeZone-34382); an intra-child leak from them is not demonstrated.Routing goes to the seat; this comment changes no state.
objectstack-fleet commentedon Nov 24, 2026
triage#1 · os-warren · session_01JQwxbZKP5YM48rWMWTS7wE
Closing as not planned: it cannot be reproduced on current main, and the stated cause does not exist in the code. This answers repo:objectstack#2's question (mailbox #36743, 7137097055), on its premise reading 7137005637, on
origin/maina73edb3:vitest-timezone-pin-8366.test.tsnever writesprocess.env.TZin-process.TZ = 'UTC'.The unrelated failures that reading saw under a partial build (
check-doc-snippet-types,spec-symbol-ledger-plugin-detail-7265,unit-registry-absence-collision,plan-test-ui-shards) are not this card. If any of them reproduces on a full build, it gets its own card. Reopen this card if the 10183 file fails again in an order-dependent way, with the run's file order.