Tag Validation and Normalization

Enforce canonical tag keys, category rules, length limits, and normalized lookup semantics across tag writes.

Overview

Description

Tag Validation and Normalization converts labels and category input into canonical, bounded tag identities before persistence.

Tag Validation and Normalization is delivered through typed package contracts rather than a surface-specific shortcut. Its primary modules separate the public input or configuration shape from validation, durable state, and the operation that produces the result. That separation lets product surfaces and integrations invoke one implementation while tenant scope and existing domain rules remain in force. Errors stay bounded to the request instead of weakening the underlying data contract.

Selling Points

  • Prevents casing and whitespace variants from fragmenting facets.
  • Enforces category-aware constraints consistently.
  • Gives every caller the same canonical lookup behavior.
  • Applies one typed package contract across every supported caller and surface.
  • Keeps invalid inputs and unavailable dependencies from silently widening durable state.

User Story

As a workspace member, I can enter a natural tag label without creating accidental duplicates such as AI, ai, and ai . In practice, I configure or invoke the capability through a supported surface, supply only the inputs its contract accepts, and receive a result governed by the same rules as every other caller. I can inspect the resulting row, setting, event, or query state and correct my input when validation fails. I walk away with a repeatable workflow rather than a one-off client implementation.

Extension Surface

Fixed core: canonicalization must remain stable for identity, uniqueness, and merge safety.

The fixed_core rating is evidenced by packages/tags/src/validate.ts, which defines the supported seam used by trusted callers or configuration. The capability can be composed wherever that contract is available, but its invariants are not replaced by tenant-authored executable code. This keeps extension honest: callers control documented inputs and policy choices while the package owns validation and safety.

Capabilities & Limits

  • Capability: Executes the scoped workflow described above through the cited live implementation paths.
  • Capability: Preserves typed validation and applicable tenant, schema, lifecycle, or service boundaries.
  • Limit: Normalization does not infer the best semantic tag; AI Tag Suggestions handles proposals. Tag Validation and Normalization supports the concrete operations described here and composes them with tenant, schema, or lifecycle checks already owned by the package. It does not grant raw database access, make unsupported inputs valid, or assume that optional providers and downstream consumers exist. Callers remain responsible for permissions and meaningful configuration, and product rendering or external delivery stays outside the package unless explicitly stated.

Implementation Map

  • packages/tags/src/validate.ts
  • validateTag
  • packages/tags/src/normalize.ts
  • normalizeRawTag
  • packages/tags/src/tag-format.ts
  • TAG_FORMAT_REGEX

Properties

Property
Value
product
dots-platform
extensibility
fixed-core
module
Dotabases
packages
tags
status
shipped
surface
cross-cutting
summary
Enforce canonical tag keys, category rules, length limits, and normalized lookup semantics across tag writes.

Connections

Tag Validation and Normalization · Explore connections

  • implemented bytopackages/tags/src/normalize.ts
  • implemented bytopackages/tags/src/tag-format.ts
  • implemented bytopackages/tags/src/validate.ts
  • implementstoDS_Dotabases — Comprehensive Module Spec
  • requiresfromAI Tag Suggestions
  • complementsfromTag Taxonomy and Categories
  • requiresfromTag Lifecycle and Merge

Connected Records7

Complements
Implemented by
packages/tags/src/normalize.ts
packages/tags/src/tag-format.ts
packages/tags/src/validate.ts
Implements
DS_Dotabases — Comprehensive Module Spec
Requires
7 connections.