Skip to content

Tags

Partial

A tag is an operator key: value label for a dimension Omniglass does not model natively (category: audio-dsp, environment: prod, cost-center: 4021). It is not a signal and has no lifecycle. It rides the same cascade as variables and secrets, with one difference in how values combine. To operate tags, see the admin Tags page.

  • tag is the governed key vocabulary: one row per key, shared across the install. It owns no value.
  • tag_binding is the value cell: one value for one key at one owner on the exclusive arc (platform, location, system, component or outpost), the same arc a variable is owned at.

Splitting them keeps the vocabulary normalized: environment is minted once and reused, so nobody invents env beside Environment. An operator binds by the tag’s name, an ordinary entity name (lowercase letters, digits and hyphens, 100 characters, never a uuid), enforced by the Storage Gateway, the one layer every database read and write passes through. A key also carries an optional label, the friendly string an operator reads (“Cost Center”). The label is not an identifier: it has no uniqueness and nothing resolves through it (ADR-0119).

Minting a key and setting a value are different permissions

Section titled “Minting a key and setting a value are different permissions”
  • Minting a key is governance: an all-scope tag:create (and tag:update, tag:delete), held by an admin or curator (identity and access).
  • Setting a value is the ordinary entity write: binding environment: prod onto a component is component:update, and system and location likewise. A platform binding has no owning entity, so it takes tag:update plus platform:update.

The vocabulary stays curated while tagging stays routine. Reading rides the viewer floor.

  • applies_to narrows a key to a set of entity kinds. Empty means universal; a binding on any other kind is refused at write time.
  • propagates says whether a bound value cascades. A propagating key (the default) resolves down the cascade. A non-propagating key is a flat per-entity set that resolves only from a binding on the entity itself.
  • allowed_values constrains the key to an enum. Empty is free text, which autocompletes the distinct values already in use (GET /tags/{name}:values); a non-empty set is enforced on the binding write and refused with a 422 otherwise (ADR-0024).

Values resolve union-on-key, shadow-on-value

Section titled “Values resolve union-on-key, shadow-on-value”

An entity’s effective tags resolve down the cascade, whose chain and precedence are stated once there. Tags differ only in the combinator: keys union (an entity surfaces every key bound at or above it) and values override (for one key set at several scopes, the most specific binding wins, and the shadowed candidates come back so the console can show the override).

  • GET /components/{name}/effective-tags returns the resolved set, winner plus shadowed.
  • GET /components/{name}:listTags returns only the bindings set directly on the component.
  • :setTag and :removeTag are the writes.
  • A component in several systems resolves per system: ?system= asks as one membership, otherwise the primary membership seeds the chain.
  • A location resolves platform plus its own tree. A system resolves platform, its own tree, and the tree of the location it is placed at. An outpost resolves platform plus its own bindings (ADR-0022).
  • The list routes carry an effective_tags map (key to winning value) per row, resolved for the whole page in one batched query.

The cascade is authorized by the component it resolves for, not band by band (ADR-0093). A caller who can read the component sees every value that cascades onto it, including one owned by a system or location they could not list directly, because a resolved value is part of that component’s configuration. ?system= narrows the answer and never widens it.

Both tables are built; the column mechanics render from the generated schema facts.

tag (content): generated from the migrated schema by make gen
Column Type Constraints Notes
id uuid PK, default uuidv7()
name text not null The governed key operators bind by
applies_to ARRAY not null, default '{}'::text[] Narrows the key to entity kinds; empty is universal
propagates boolean not null, default true Toggles cascade versus flat per-entity binding
created_at timestamp with time zone not null, default now()
updated_at timestamp with time zone not null, default now()
allowed_values ARRAY not null, default '{}'::text[] The value enum; empty is free text, enforced on the binding write
label text The friendly string an operator reads; NULL falls back to the name, verbatim
CHECK constraints and unique indexes on tag
  • tag_name_key: CREATE UNIQUE INDEX tag_name_key ON public.tag USING btree (name)
tag_binding (content): generated from the migrated schema by make gen
Column Type Constraints Notes
id uuid PK, default uuidv7()
tag_id uuid FK → tag.id, not null The key being bound
owner_kind text not null Which arm of the exclusive owner arc holds the cell
value text not null The bound value the cascade resolves
created_at timestamp with time zone not null, default now()
updated_at timestamp with time zone not null, default now()
outpost_id uuid FK → outpost.user_id
component_id uuid FK → component.id
system_id uuid FK → system.id
location_id uuid FK → location.id
CHECK constraints and unique indexes on tag_binding
  • tag_binding_owner_arc: CHECK ((((owner_kind = 'platform'::text) AND (component_id IS NULL) AND (system_id IS NULL) AND (location_id IS NULL) AND (outpost_id IS NULL)) OR ((owner_kind = 'component'::text) AND (component_id IS NOT NULL) AND (system_id IS NULL) AND (location_id IS NULL) AND (outpost_id IS NULL)) OR ((owner_kind = 'system'::text) AND (system_id IS NOT NULL) AND (component_id IS NULL) AND (location_id IS NULL) AND (outpost_id IS NULL)) OR ((owner_kind = 'location'::text) AND (location_id IS NOT NULL) AND (component_id IS NULL) AND (system_id IS NULL) AND (outpost_id IS NULL)) OR ((owner_kind = 'outpost'::text) AND (outpost_id IS NOT NULL) AND (component_id IS NULL) AND (system_id IS NULL) AND (location_id IS NULL))))
  • tag_binding_owner_kind_check: CHECK ((owner_kind = ANY (ARRAY['platform'::text, 'component'::text, 'system'::text, 'location'::text, 'outpost'::text])))
  • tag_binding_component_key_uuid: CREATE UNIQUE INDEX tag_binding_component_key_uuid ON public.tag_binding USING btree (tag_id, component_id) WHERE (owner_kind = 'component'::text)
  • tag_binding_location_key_uuid: CREATE UNIQUE INDEX tag_binding_location_key_uuid ON public.tag_binding USING btree (tag_id, location_id) WHERE (owner_kind = 'location'::text)
  • tag_binding_outpost_key: CREATE UNIQUE INDEX tag_binding_outpost_key ON public.tag_binding USING btree (tag_id, outpost_id) WHERE (owner_kind = 'outpost'::text)
  • tag_binding_platform_key: CREATE UNIQUE INDEX tag_binding_platform_key ON public.tag_binding USING btree (tag_id) WHERE (owner_kind = 'platform'::text)
  • tag_binding_system_key_uuid: CREATE UNIQUE INDEX tag_binding_system_key_uuid ON public.tag_binding USING btree (tag_id, system_id) WHERE (owner_kind = 'system'::text)