Skip to content

resource-metadata Specification

Purpose

One rule for where a value about a worker, trigger or group lives (property, config or tag) and how relations between them are expressed, so every new field lands in the right place and infra types stay free of business-domain concepts.

Requirements

Requirement: Property, Config or Tag

Every value about a worker, trigger or group SHALL be exactly one of the following: - a property: the platform acts on it; - config: the worker's code reads it; workers only; - a tag: only people, clients and scripts read it.

Each new field SHALL state which of the three it is.

Scenario: Classifying a new value

  • WHEN a change adds a value the Runtime uses to route outputs
  • THEN it SHALL be a property; a value only the worker reads SHALL be config, and a value only clients read SHALL be a tag

Requirement: Properties Are Infra Only

A property SHALL be an infra concept: topics, shards, pacing, secrets, schedules, ownership, groups, observed status and output topics. A business-domain concept such as a scenario, world, universe, venue, strategy or instrument SHALL NOT be a property of a worker, trigger or group. It SHALL be config when the worker reads it, or a domain tag otherwise. When the platform must act on a domain grouping, the domain layer SHALL map it onto groups.

Scenario: Scenario access

  • WHEN access to a scenario's workers must be restricted
  • THEN the scenario tooling SHALL put them in a group owned by the scenario's owners, and no worker SHALL carry a scenario property

Requirement: Tags Never Change Behavior

The platform SHALL store, filter by and return tags without interpreting them. Adding, changing or removing a tag SHALL NOT change what the platform or a worker does.

Scenario: Retagging a running worker

  • WHEN a client changes a running worker's world tag
  • THEN the worker's delivery, outputs, access and lifecycle SHALL be unchanged

Requirement: Config Is Fixed With the Worker

A worker's config SHALL be delivered to its code on every triggering event and SHALL be fixed after creation; changing it SHALL mean a new worker. Triggers SHALL have no config.

Scenario: A different config

  • WHEN a script needs a worker with another config value
  • THEN it SHALL create a new worker, not change the existing one

Requirement: Three Kinds of Relation

Relations SHALL be expressed in exactly one way each: - containment: a group's parents and an item's groups, stored as properties; - lifecycle: a trigger's owner_worker_id, stored as a property; - data flow: derived from worker input topics, trigger target topics and recorded output topics, and never stored.

No item SHALL name another item as its parent or as a dependency.

Scenario: A strategy needs a feed

  • WHEN a strategy worker listens to a topic a feed publishes to
  • THEN the dependency SHALL be derived from those topics, and neither worker SHALL store a reference to the other

Requirement: Documented Delineation

The workmanager docs SHALL explain properties, config and tags (with the table of each for workers, triggers and groups), infra versus domain values, and the three kinds of relation. The api's trigger docs and the tag references SHALL link to that page.

Scenario: Looking up where a value goes

  • WHEN a developer reads the workmanager docs' page on properties, config and tags
  • THEN it SHALL list every current worker, trigger and group field with its kind