Skip to content

finding(core): resolve-authz-context re-states the IANA time-zone probe that @objectstack/spec/shared now exports as the shared value-domain predicate #15134

Description

@claude

Observation-class finding, recorded while implementing the spec half of #14168 (PR #15133). Filed unassigned; no fix attempted in that PR (out of its declared file surface).

Blocked-by: #14168

What was measured

packages/core/src/security/resolve-authz-context.ts:936 carries a module-private isValidTimeZone(tz) — the Intl.DateTimeFormat probe (construct with { timeZone }, catch the RangeError) — used at :941 to sanitise the authz context's time zone. packages/services/service-settings/src/value-domains.ts re-states the same probe as its own module-private isIanaTimeZone, and its docblock says so explicitly ("module-private there, hence re-stated rather than imported").

Since PR #15133 (maintainer ruling 2026-09-02 on #14168: one closed vocabulary and one membership predicate shared by settings specifiers and object fields), @objectstack/spec/shared exports the predicate — isValueDomainMember('iana_time_zone', value) — and the settings door's re-point onto it is the PM's services follow-up card. The core helper is a third copy of the same definition that the ruling did not name.

Why it is worth a card rather than a rider

Three copies of one definition is the shape that drifts: the settings-side TSDoc records that Intl.supportedValuesOf('timeZone') is measurably NOT the definition (it omits UTC, Asia/Kolkata, Europe/Kyiv), and only the copy that carries its pins is protected from a well-meaning "modernisation" to the enumeration. A one-line re-point in core (import { isValueDomainMember } from '@objectstack/spec/shared'; delete the private helper) removes the copy and puts core's time-zone acceptance under the same pins.

Not a defect today: all three copies agree. Suggested disposition: fold into the services re-point card, or a finding-class core card sequenced after #14168's spec half lands.

Generated by Claude Code


Generated by Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions