Data Model¶
Deployment Event (11 visible fields)¶
| Field | Type | Required | UI Treatment |
|---|---|---|---|
component |
string | Yes | Row header (Matrix), lane header (Swimlanes). Implicit โ not in field picker. |
environment |
string | Yes | Column header (Matrix), promoted identifier bottom-right (Swimlanes). Toggleable in Swimlanes picker. |
version |
string | No | Headline identifier (Matrix tile). Secondary top-left (Swimlane node). Up to 50 chars, never truncated. |
status |
enum | Yes | 8 values โ effective (mutate/mutated the environment): success, in-progress, failure; next (the latest deployment beyond the live one): pending, queued, waiting, cancelled, rejected. Tile/box colour is driven by the effective status only; next-status appears as a .ctx-badge layered on the tile, not as the box colour. Implicit โ not in field picker. |
run_url |
string | No | โ "run" dashed link. Opens in new tab. |
sha |
string | No | Plain mono hex. Mid-row left (Matrix), bottom-left (Swimlane). |
run_number |
string | No | # prefix. Mid-row right cluster. |
ref |
string | No | โ prefix. Branch name or PR number. Mid-row left (Matrix), body col 1 (Swimlane). |
actor |
string | No | @ prefix. Headline row right (Matrix), body col 2 (Swimlane). |
happened_at |
datetime | Yes | Rendered as elapsed ("3h ago") on tiles/nodes. Elapsed + absolute UTC in drawer/inspector. |
parrent_deployments |
GUID[] | No | Matrix: โต N parents text. Swimlanes: edges only (text intentionally omitted). Drawer/Inspector: list of truncated GUIDs. |
idis synthetic โ it NEVER appears in any visible UI surface. No fields outside this 11-field whitelist may appear in the UI.
namespace(optional, โค 128 chars) scopesserviceinto the composite identity surfaced ascomponent. It is not a standalone visible field: when present it prefixes thecomponent/lane header asnamespace/service, and only when a bare service name collides across namespaces (#353). Absent โ the component renders unprefixed (legacy rows unchanged).
Swimlane Edge Derivation¶
Edges derived from each node's parrent_deployments array. Only intra-service edges are rendered โ cross-service relationships are ignored.
Attribute Visibility Pickers¶
Matrix Toggles (8)¶
version, run_url, sha, run_number, ref, actor, happened_at, parrent_deployments
Default: all ON.
Swimlanes Toggles (8)¶
environment, version, run_url, sha, run_number, ref, actor, happened_at
parrent_deployments is intentionally absent โ the graph edges already convey parent relationships.
Default: all ON.
KPIs & Derived Values¶
| KPI | Derivation | Class Modifier |
|---|---|---|
| Services | Count of distinct component values in rendered data |
โ |
| Environments | Count of distinct environment values in rendered data |
โ |
| In-flight | Count of slots where state โ | .is-warn (amber text) |
| Failed | Count of slots where state โ | .is-bad (coral text) |
KPI counts derive from visible data only โ filtered by the glob service filter (dd:svcFilterMode / dd:svcPatterns) and the Columns env filter (dd:colHidden). No invented metrics.
Feed Grouping & Search (#397)¶
The Feed view and feed dock read the same GET /api/deployments list endpoint as the Swimlanes drawer/inspector, not a bespoke endpoint. Two list-endpoint query params and one grouping key are specific to the Feed surfaces:
| Param / key | Type | Description |
|---|---|---|
q (query param) |
string, max 200 chars | Server-side free-text search โ case-insensitive substring match against service, namespace, environment, version, status, actor, ref, sha, deployment_id, run_number; a row matches when any field contains the value. Composes by logical AND with the structured filters (service/environment/status/deployment_id/since/until) and is applied before cursor pagination โ next_cursor pages stay consistent for a fixed q. Empty/absent โ no text filter. |
cursor / next_cursor (query param / response field) |
string, opaque | Cursor pagination pair. cursor requests the next page from a prior next_cursor; next_cursor: null marks the final page. |
deployment_id (grouping key) |
string | Not new โ the existing wire field. The Feed surfaces use it as the grouping key: one roll-up per distinct deployment_id. Group order and event order within a group are newest-first by happened_at. |
The Feed surfaces are the only UI surfaces that show deployment_id โ it is not part of the 11-field Matrix/Swimlanes whitelist above, but it is a real wire field, not an invented one.
Extension Field Usage¶
The extension popup panel and notification toasts consume a subset of the existing Deployment Event fields โ no new fields are required.
| Surface | Fields consumed |
|---|---|
| Toolbar badge | status (effective only โ success / in-progress / failure) |
| Notification toast | component, environment, version, status, run_url, run_number |
| Latest-change popup | component, environment, version, status, actor, happened_at, run_url, run_number |
- The popup renders
happened_atas both elapsed and absolute UTC (same as the drawer/inspector). run_urlandrun_numbertogether produce the "Open run" link (samehist-linkpattern as the SPA).- No additional fields beyond the 11-field whitelist are surfaced.
Analytics Derived Metrics¶
Analytics metrics are server-computed from the deployment_events log. They are NOT part of the 11-field visible whitelist and do NOT appear on tiles, nodes, drawers, or the inspector. The SPA receives pre-aggregated responses from /api/analytics/* and renders them in the Analytics view only.
DORA Four Keys โ Definitions¶
| Key | Definition | Unit | approximated |
|---|---|---|---|
| Deployment Frequency | Terminal success events per day over the window |
per_day |
false |
| Lead Time for Changes | Approximated time from first event in a parent_deployments chain to the configured production terminal success event |
hours |
true |
| Change Failure Rate | failure / (success + failure) over terminal events in the window |
ratio (0โ1) |
false |
| Time to Restore | Median restored_at โ failed_at across incidents in the window |
minutes |
false |
Lead-time approximation (binding). True DORA lead time (commit โ prod) is NOT in the event log โ the store carries deployment-state events, not commit timestamps. Lead time is approximated via parent_deployments promotion chains that reach the configured production terminal. The API flags this with approximated: true; the SPA MUST surface the label.
Operator note. The promotion-funnel ladder and the production terminal are operator-configured via
ANALYTICS_FUNNEL_ENVIRONMENTS(defaultdev,staging,qa,preprod,prod; last entry = production terminal for lead-time; values matched case-insensitively against deploymentenvironment). See Configuration โ API.
Classification Thresholds¶
The server assigns each KPI a band (AnalyticsClassification) based on DORA industry thresholds. Bands:
| Band | CSS class | Color token |
|---|---|---|
elite |
.an-class-chip.elite |
--emerald |
high |
.an-class-chip.high |
--blue |
medium |
.an-class-chip.medium |
--amber |
low |
.an-class-chip.low |
--coral |
Classification logic is server-side (in GET /api/analytics/dora); the SPA applies the chip class from the classification field verbatim.
Aggregation Conventions (server-side)¶
- Terminal-only. Frequency and CFR count
success/failure; non-terminal statuses (pending,queued,waiting,cancelled,rejected,in-progress) are excluded from those rates. - Duration. Per
deployment_id:last(happened_at) โ first(happened_at)in minutes. Single-row deployments (no measurable span) are excluded from bins and percentiles. - Incident. A
failurein a(service, environment)slot followed by a latersuccessin the same slot. An unresolved failure (no subsequent success in the window) hasrestored_at: null/duration_minutes: nulland sorts first.severityis derived fromduration_minutes(longer โ higher; unresolved โcritical). - All ordering by
happened_at(emitter-supplied), consistent with ยง8 ofapi-guidelines.md. - Window clamp. The requested
windowis clamped server-side toHISTORY_RETENTION_DAYS;window.clamped = truewhen narrowed. The SPA surfaces the clamp.
Presets Envelope¶
Storage keys:
| Key | Type | Purpose |
|---|---|---|
dd:presets |
JSON array | All saved preset envelopes. |
dd:presetActive |
string | Name of the last-applied preset. Absent when no preset has been applied, or after the active preset is deleted or all settings are reset. |
Envelope shape:
Version guard. On load, envelopes with version !== 1 are silently dropped. The version field is checked before any field access.
Settings keys captured in settings:
| Key | Type | Description |
|---|---|---|
theme |
"dark" \| "light" \| "auto" |
Active theme token. |
notifEnabled |
boolean |
Notification master switch state. |
notifStatuses |
string[] |
Enabled notification statuses (subset of the 8). |
notifSvcMode |
"exclude" \| "include" |
Notification service filter mode. |
notifSvcPatterns |
string[] |
Notification service glob patterns. |
notifEnvMode |
"exclude" \| "include" |
Notification environment filter mode. |
notifEnvPatterns |
string[] |
Notification environment glob patterns. |
view |
"matrix" \| "swimlanes" \| "feed" \| "analytics" |
Active view tab. Route-driven โ applying restores the matching route (withViewRealign), not just an internal re-render. |
svcFilterMode |
"exclude" \| "include" |
Services board glob filter mode. |
svcPatterns |
string[] |
Services board glob patterns. |
failuresOnly |
boolean |
Failures-only toggle state (Matrix). |
matFieldsOn |
string[] |
Active Matrix field keys. |
visFieldsOn |
string[] |
Active Swimlanes field keys. |
colOrder |
string[] |
Environment column order (Matrix). |
colHidden |
string[] |
Hidden environment names (Matrix). |
laneCollapsed |
object (svc โ boolean) |
Collapse state per service lane (Swimlanes). |
laneAutoScroll |
boolean |
Auto-scroll-to-change state (Swimlanes). |
predicate |
string |
Active correlation predicate key (Swimlanes). |
timeWindow |
string |
Active correlation time-window value (Swimlanes). |
svcFilter |
string |
Free-text service filter input value (Matrix + Swimlanes). Persisted under dd:svcFilter. |
feedGrouped |
boolean |
Group-by-deployment toggle state, shared by the Feed view and the feed dock. Default true. |
feedDockOpen |
boolean |
Feed dock open/closed preference. Default false. |
Apply fallback. Unknown or missing keys in settings are silently ignored; the corresponding live setting retains its current value. Unknown array entries for field keys are dropped; if the result is empty, all fields default ON.
Export/import format. Each exported file is a single envelope (not an array). Filename: dd-preset-<slug>.json. Import rejects array inputs (old bulk format) and requires version === 1.
Derived Field Rendering¶
- The
reffield renders as a branch name or PR number per its domain definition. - The
happened_atfield renders as elapsed time on tiles and nodes, and as elapsed plus absolute UTC in drawer and inspector rows. - The bottom-section fallback chain for split tiles:
versionโshaโrefโrun_number.