Layer 3 · capability
time_source
Where a runtime reads the current time. A time source gives the time of a run: the wall time of the host, or the simulated time of a simulated run, at its resolution. It is read, never a source of runs: a runtime reads it over a read link when a run of its own starts, and each read is recorded with the time it gave. A start at a time of day is a schedule and its trigger (agentic.trigger), not a time source; a time source wired as the source of a trigger would start a run on every tick of its clock. The block holds a second kind of read: a guard reading, the answer another system gave to a guard's question, such as whether a run is live on a runtime, as the runner answered it: yes, no, or unreadable with the reason it could not be read. A reading is recorded once; a command that guards on it reads it by its identity.
Depends on
- shared · layer 0 · 8 references
Used by
- deployment · layer 9 · 2 references
Entities
GuardReading
One answer another system gave to a guard's question, as it was read: yes, no, or unreadable with the reason it could not be read.
Identified by guard_reading_id (GuardReadingId).
| field | type | meaning |
|---|---|---|
guard | Name | The guard whose question was read, such as runs-. |
subject | string | What the question was about, such as the name of a runtime. |
answer | ReadAnswer | What the other system answered, or Unreadable when its answer could not be read. |
read_failure | optional string | Why the answer could not be read; present when the answer is Unreadable. |
read_at | timestamp | When the answer was read. |
More columns: swipe horizontally, or focus the table and use the arrow keys.
Lifecycle: one state, Recorded; a recorded GuardReading does not change.
TimeReading
One read of a time source: the time it gave. Kept apart from the source, which a read does not change.
Identified by time_reading_id (TimeReadingId).
| field | type | meaning |
|---|---|---|
time_source_id | TimeSourceId | |
read_at | timestamp | The time the source gave. |
More columns: swipe horizontally, or focus the table and use the arrow keys.
Relations:
sourcereferences TimeSource (one, bytime_source_id)
Lifecycle: one state, Recorded; a recorded TimeReading does not change.
TimeSource
One clock a runtime reads, with the kind of time it gives and its resolution.
Identified by time_source_id (TimeSourceId).
| field | type | meaning |
|---|---|---|
name | Name | |
kind | TimeKind | |
resolution | duration | The smallest step of the time it gives; two reads closer than this may give the same time. |
More columns: swipe horizontally, or focus the table and use the arrow keys.
Lifecycle of TimeSource
Retired.Commands
ReadTime
Read the time. A runtime reads the current time of its run. The read is recorded with the time it gave; the source does not change, and no run starts.
Called by: Reader.
| field | type |
|---|---|
time_source_id | TimeSourceId |
at | timestamp |
More columns: swipe horizontally, or focus the table and use the arrow keys.
| outcome | when | result |
|---|---|---|
no-such-source refused | no TimeSource for time_ | Unknown: No time source has this identity. |
retired refused | the TimeSource of time_ has state == Retired | Retired: The time source is retired; it gives no time. |
read | otherwise | creates a TimeReading in Recorded; emits Time |
More columns: swipe horizontally, or focus the table and use the arrow keys.
RecordGuardReading
Record a guard reading. A runtime records the answer another system gave to a guard's question, as it read it. An answer it could not read is recorded as Unreadable with the reason; a guard that reads it refuses.
Called by: Reader.
| field | type | meaning |
|---|---|---|
guard_reading_id | GuardReadingId | The reading's identity, named by the runtime; a guard reads the reading by it. |
guard | Name | The guard whose question was read, such as runs-. |
subject | string | What the question was about, such as the name of a runtime. |
answer | ReadAnswer | What the other system answered, or Unreadable when its answer could not be read. |
read_failure | optional string | Why the answer could not be read. |
at | timestamp | When the answer was read. |
More columns: swipe horizontally, or focus the table and use the arrow keys.
| outcome | when | result |
|---|---|---|
read-failure-missing refused | answer == Unreadable and not (defined(read_ | Read: An answer that could not be read names why; nothing was recorded. |
repeated refused | the GuardReading exists already | Guard: A guard reading of this identity is recorded; a reading is recorded once. |
recorded | otherwise | creates a GuardReading in Recorded; emits Guard |
More columns: swipe horizontally, or focus the table and use the arrow keys.
RegisterTimeSource
Register a time source.
Called by: Keeper.
More columns: swipe horizontally, or focus the table and use the arrow keys.
| outcome | when | result |
|---|---|---|
registered | otherwise | creates a TimeSource in Available; emits Time |
More columns: swipe horizontally, or focus the table and use the arrow keys.
RetireTimeSource
Retire a time source.
Called by: Keeper.
| field | type |
|---|---|
time_source_id | TimeSourceId |
at | timestamp |
More columns: swipe horizontally, or focus the table and use the arrow keys.
| outcome | when | result |
|---|---|---|
no-such-source refused | no such TimeSource | Unknown: No time source has this identity. |
retired | otherwise | moves the TimeSource Available → Retired; emits Time |
wrong-state refused | the TimeSource is in a state that does not allow it | Time: The time source is not in a state this command acts from. |
More columns: swipe horizontally, or focus the table and use the arrow keys.
Events
| event | fields | emitted by |
|---|---|---|
GuardReadingRecorded | guard_ GuardReadingId, guard Name, subject string, answer ReadAnswer | Record |
TimeRead | time_ TimeReadingId, time_ TimeSourceId, at timestamp | Read |
TimeSourceRegistered | time_ TimeSourceId, name Name, kind TimeKind, resolution duration, at timestamp | Register |
TimeSourceRetired | time_ TimeSourceId, at timestamp | Retire |
More columns: swipe horizontally, or focus the table and use the arrow keys.
Views
| view | rows | fields |
|---|---|---|
GuardReadingsGuard readings | each GuardReading | guard_ GuardReadingId, guard Name, subject string, answer ReadAnswer, read_ optional string, read_ timestamp, state State |
TimeReadingsTime readings | each TimeReading | time_ TimeReadingId, time_ TimeSourceId, read_ timestamp, state State |
TimeSourcesTime sources | each TimeSource | time_ TimeSourceId, name Name, kind TimeKind, resolution duration, state State |
More columns: swipe horizontally, or focus the table and use the arrow keys.
Types
| type | is | values or fields |
|---|---|---|
GuardReadingIdThe identity of one guard reading. | an identifier or value | uuid |
ReadAnswerWhat another system answered to a guard's question. Yes and No are its answer; Unreadable means its answer could not be read, and a guard that reads it refuses. | one of | Yes, No, Unreadable |
TimeKindWhat time a source gives. Wall is the time of the host's clock. Simulated is the time of a simulated run, counted from its start, which the simulator advances. | one of | Wall, Simulated |
TimeReadingIdThe identity of one read of a time source. | an identifier or value | uuid |
More columns: swipe horizontally, or focus the table and use the arrow keys.
KPIs
2 KPIs from the KPI catalogue. A gate must be zero for a variant of an architecture to count.
Correctness
| KPI | unit | better | gate | status |
|---|---|---|---|---|
runs_started_by_time_sourceRuns a time source started. How: RunStarted events whose firing came over a trigger link from a time source. A time source is read, never a trigger source; a clock of one second would start 86,400 runs a day. Must be 0. | count | lower | gate | planned source: design |
More columns: swipe horizontally, or focus the table and use the arrow keys.
Quality
| KPI | unit | better | gate | status |
|---|---|---|---|---|
time_reads_per_runReads of a time source per run of the runtimes that read it. How: TimeRead events divided by RunStarted events of the runtimes with a read link to the time source, per time source. A run reads the time once as it starts; more reads cost calls and give it nothing new. | ratio | lower | – | planned source: design |
More columns: swipe horizontally, or focus the table and use the arrow keys.
Settings
The settings a part of this block carries in an architecture document. agenticspec sim check refuses any other setting (setting_unknown) and a value outside its type (setting_invalid), and a part that lacks a setting marked required in the default column; the contract copies a setting into the ports it narrows. The last rows of each table are the settings every part takes. What no setting here types (a file, a path, an audience, the use of a model) goes into the part's notes, a map with free keys and values that the check takes as written and nothing reads.
A part time_source:
| setting | type | unit | default | contract | what |
|---|---|---|---|---|---|
kind | enum Time: wall, simulated | wall | What time the source gives: the wall time of the host (wall), or the time of a simulated run from its start (simulated). | ||
resolution | duration of at least 0s | 1s | The smallest step of the time it gives. A runtime reads it over a read link when a run starts; the source starts no run, however small its step. | ||
count | integer of at least 1 | 1 | How many copies of the part run. | ||
per | part | One copy of the part for each copy of the named part. | |||
notes | notes | Free notes on the part, a map with keys and values of any kind: what no setting of its block types. The check takes any map; the simulator, the search and the contract never read it. |
More columns: swipe horizontally, or focus the table and use the arrow keys.