Waitinterfaceno test imports itinterface WaitOne thing the work waits on, with the status its dates give it.
| Member | Type | What it is |
|---|---|---|
waitingId | string | |
what | string | |
onWhom | string | |
status | "overdue" | "waiting" | |
daysWaiting | number |
The operating model at work (commons data 0063-operating-model): the code that works on the tables of the operations model (models/operations). What the work waits on is listed with a status that is computed from its dates; a decision that replaces another says so and the other is marked; limits and expiries are found when the time to act has come; copies of data with no owner or no refresh are found; a release is promoted only through the environments in order, and the versions in each environment are compared; a signal is checked against the catalog before it is emitted; the freshness of a source is computed from its latest load; and the statements of a workload are replayed and compared with what they gave.
Waitinterfaceno test imports itinterface WaitOne thing the work waits on, with the status its dates give it.
| Member | Type | What it is |
|---|---|---|
waitingId | string | |
what | string | |
onWhom | string | |
status | "overdue" | "waiting" | |
daysWaiting | number |
waitingOnfunctionfunction waitingOn(on: Runner, asOf?: string | Date): Promise<readonly Wait[]>What the work waits on, the oldest first: overdue where it was needed by a date that has passed.
resolveWaitfunctionfunction resolveWait(on: Runner, waitingId: string, at?: string | Date): Promise<void>Records that what was waited on has come.
supersedefunctionfunction supersede(on: Runner, newId: string, oldId: string): Promise<void>Records that a decision replaces another: the new one is accepted and says what it replaced, and the old one is marked superseded.
decisionsInForcefunctionfunction decisionsInForce(on: Runner): Promise<readonly string[]>The decisions in force: accepted and not replaced.
DueLimitinterfaceno test imports itinterface DueLimitA limit that needs someone to act.
| Member | Type | What it is |
|---|---|---|
limitId | string | |
name | string | |
owner | string | |
expiresAt | string | |
status | "act-now" | "expired" | |
daysLeft | number |
limitsDuefunctionfunction limitsDue(on: Runner, asOf?: string | Date): Promise<readonly DueLimit[]>Finds the limits whose time to act has come: expired, or within the days of notice that its owner needs; the soonest first.
CopyFindinginterfaceno test imports itinterface CopyFindingA copy that nobody answers for or that has not been refreshed.
| Member | Type | What it is |
|---|---|---|
dataCopyId | string | |
dataset | string | |
location | string | |
why | "never refreshed" | "no owner" | "stale" |
copyFindingsfunctionfunction copyFindings(on: Runner, maxAgeDays: number, asOf?: string | Date): Promise<readonly CopyFinding[]>Finds the copies of data with no owner, never refreshed or not refreshed within the days given.
PROMOTION_ORDERconstno test imports itconst PROMOTION_ORDER: readonly ["development", "test", "staging", "production"]The order a release is promoted through.
Promoteinterfaceno test imports itinterface PromoteWhat a promotion was told.
| Member | Type | What it is |
|---|---|---|
promotionId | string | |
releaseId | string | |
environmentId | string | |
by | string | |
evidenceRef? | string | |
at? | string | Date |
Promotedtypeno test imports ittype Promoted = { readonly kind: "promoted" } | { readonly kind: "refused"; readonly why: string };Whether a promotion was made, and why not where it was not.
promotefunctionfunction promote(on: Runner, p: Promote): Promise<Promoted>Promotes a release to an environment and adds it to the log, unless an environment before it in the order (development, test, staging, production) has not had it, or it has no evidence for production: then it is refused and nothing is written.
Parityinterfaceno test imports itinterface ParityWhat runs in each environment.
| Member | Type | What it is |
|---|---|---|
artifact | string | |
versions | Readonly<Record<string, string>> | |
behind | readonly string[] | The environments that are not at the version of the last environment of the order that has one. |
parityfunctionfunction parity(on: Runner, artifact: string): Promise<Parity>The version of an artifact that each environment last received, and which environments are behind the furthest one.
realDataOutsideProductionfunctionfunction realDataOutsideProduction(on: Runner): Promise<readonly string[]>Environments that hold real data and are not production.
SignalDefinterfaceno test imports itinterface SignalDefA signal as the catalog defines it.
| Member | Type | What it is |
|---|---|---|
name | string | |
kind | string | |
unit | string | |
attributes | readonly string[] |
catalogfunctionfunction catalog(on: Runner): Promise<ReadonlyMap<string, SignalDef>>Reads the catalog of signals.
Sampleinterfaceno test imports itinterface SampleOne sample of a signal, ready to be handed to whatever sends telemetry.
| Member | Type | What it is |
|---|---|---|
name | string | |
kind | string | |
unit | string | |
value | number | |
attributes | Readonly<Record<string, string>> | |
at | string |
samplefunctionfunction sample(defs: ReadonlyMap<string, SignalDef>, name: string, value: number, attributes?: Readonly<Record<string, string>>, at?: string | Date): SampleMakes a sample of a signal, and throws where the catalog does not allow it: a name it does not have, attributes that are not exactly the signal's, or a counter that goes down.
Freshnessinterfaceno test imports itinterface FreshnessHow fresh one source is.
| Member | Type | What it is |
|---|---|---|
source | string | |
status | "fresh" | "never-loaded" | "stale" | |
ageHours | number | null | |
maxAgeHours | number | |
owner | string |
freshnessfunctionfunction freshness(on: Runner, asOf?: string | Date): Promise<readonly Freshness[]>Computes the freshness of each source from the latest of its loads that was not undone (the loads of the flow model): fresh, stale, or never loaded.
Replayedinterfaceno test imports itinterface ReplayedWhat replaying one statement found.
| Member | Type | What it is |
|---|---|---|
workloadStatementId | string | |
rows | number | |
baselineRows | number | |
same | boolean | |
ms | number |
replayWorkloadfunctionfunction replayWorkload(on: Runner, workloadId: string): Promise<readonly Replayed[]>Replays the recorded statements of a workload against the database and compares the rows each gives with the number and hash recorded. Only a single select is run: a statement that is anything else, or has more than one statement, is refused and not run.
workloadsfunctionno test imports itfunction workloads(on: Runner): Promise<readonly RowOfProjection<{ id: Column<string>; name: Column<string>; owner: Column<string>; criticality: Column<number>; }>[]>Registers a workload's workloadId lookup so that a caller can name what it replays.