Skip to content

SystemIdentifierSchema/EventNameSchema admit the empty-segment dot shapes the item-name grammar refuses (a., a..b, trailing dots) #12245

Description

@os-trump

Observation from the #12194 implementation (stage 1 of #12176) — filed unassigned as a finding, not a defect claim.

What was observed

packages/spec/src/shared/identifiers.zod.ts now carries two dotted grammars side by side:

So the junk-shape family the maintainer-ruled item-name grammar refuses (empty segments, trailing/double dots) remains declared legal for every surface SystemIdentifierSchema's own docblock claims: object names, field names, role names, permission set names, action/trigger names, event keys, app IDs, menu/page IDs, select option values, workflow names, webhook names.

Why it may matter (and why it is only an observation)

The #12176 census's lesson generalizes: a permissive identifier grammar at a declaration surface is where junk identity shapes enter and fossilize. The mechanical fix shape now exists in the same file — derive a segment-anchored pattern from the shared ITEM_NAME_SEGMENT source — so a narrowing would not mint a second grammar.

But narrowing SystemIdentifierSchema is an accept-set change across many surfaces at once, and the #12194 premise discipline applies with more force here, not less: each consuming surface needs its own corpus census (does any legitimate existing event key or app id carry a trailing/double dot?) before any regex moves, and the maintainer has ruled nothing about these surfaces. Filed for triage to size and stage — possibly a late stage of the #12176 chain, possibly not worth doing.

Related: #12176 · #12194 · PR #12244 (where the segment-anchored family landed).

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions