You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/monitoring.md
+57-25Lines changed: 57 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,55 +30,87 @@ WATERLINE_ENGINE_SOURCE=v2
30
30
31
31
`/waterline/api/stats` now includes an `engine_source` object that reports the configured mode, the resolved mode, whether Waterline is actively using v2, any surfaced readiness issues, and the required-table inspection results. When `engine_source=v2` is pinned but the v2 operator surface is incomplete, Waterline list/detail/export/saved-view/stats routes return HTTP `503` with that same `engine_source` payload instead of silently falling back to v1. Instance-scoped `/waterline/api/instances/...` routes remain v2-only; when Waterline is pinned to `v1` or `auto` falls back to v1, those routes return `404` because the legacy bridge does not expose the public instance-id contract.
32
32
33
-
Waterline reads v2 selected-run detail, history-export payloads, dashboard stats, and operator metrics through `Workflow\V2\Contracts\OperatorObservabilityRepository`. The workflow package binds a default implementation that returns the built-in v2 operator contract, and applications can replace that binding when they need to front Waterline with an app-owned repository, tenancy scope, authorization policy, or cached projection layer.
33
+
Waterline reads v2 selected-run detail, list-item projections, history-export payloads, dashboard stats, and operator metrics through `Workflow\V2\Contracts\OperatorObservabilityRepository`. The workflow package binds a default implementation that returns the built-in v2 operator contract, and applications can replace that binding when they need to front Waterline with an app-owned repository, tenancy scope, authorization policy, or cached projection layer.
34
34
35
35
All v2 operator detail payloads return typed JSON values for workflow arguments, output, activity arguments, activity results, command payloads, signal arguments, update arguments, update results, query results, and exception payloads. The browser does not need to unserialize engine-internal encoding to render durable workflow truth — every value in the JSON response is already structured data that JSON clients can use directly.
36
36
37
-
With `v2` enabled, the existing Waterline list, detail, and dashboard routes keep their current endpoint shapes while adding v2-specific fields such as:
37
+
### List-item contract
38
38
39
+
With `v2` enabled, the Waterline list routes (`/waterline/api/flows/{bucket}`) project each paginator row through the typed list-item contract (`RunListItemView`) instead of returning raw summary-model arrays. The contract defines exactly which fields a fleet-list consumer can rely on:
40
+
41
+
-`id`
42
+
-`workflow_instance_id`
39
43
-`instance_id`
40
44
-`selected_run_id`
41
45
-`run_id`
42
-
-`current_run_id`
43
-
-`current_run_source`
44
-
-`current_run_status`
45
-
-`current_run_status_bucket`
46
-
-`workflow_type`
47
-
-`declared_entry_method`
48
-
-`declared_entry_mode`
49
-
-`declared_entry_declaring_class`
50
-
-`compatibility`
51
-
-`compatibility_supported`
52
-
-`compatibility_reason`
46
+
-`run_number`
53
47
-`is_current_run`
54
48
-`engine_source`
49
+
-`class`
50
+
-`workflow_type`
51
+
-`namespace`
52
+
-`business_key`
53
+
-`compatibility`
54
+
-`status`
55
55
-`status_bucket`
56
56
-`is_terminal`
57
-
-`archived_at`
58
-
-`archive_command_id`
59
-
-`archive_reason`
57
+
-`closed_reason`
58
+
-`started_at`
59
+
-`closed_at`
60
+
-`created_at`
61
+
-`updated_at`
60
62
-`sort_timestamp`
61
63
-`sort_key`
62
-
-`closed_reason`
64
+
-`duration_ms`
65
+
-`archived_at`
66
+
-`archive_reason`
63
67
-`wait_kind`
64
68
-`wait_reason`
65
-
-`wait_started_at`
66
-
-`wait_deadline_at`
69
+
-`liveness_state`
70
+
-`visibility_labels`
71
+
-`search_attributes`
72
+
-`repair_attention`
73
+
-`repair_blocked_reason`
74
+
-`repair_blocked`
75
+
-`task_problem`
76
+
-`task_problem_badge`
77
+
-`declared_entry_mode`
78
+
-`declared_contract_source`
79
+
-`declared_contract_backfill_needed`
80
+
-`declared_contract_backfill_available`
81
+
-`exception_count`
82
+
-`history_event_count`
83
+
-`history_size_bytes`
84
+
-`continue_as_new_recommended`
85
+
-`connection`
86
+
-`queue`
87
+
88
+
`repair_blocked` and `task_problem_badge` are computed badge metadata (code, label, description, tone, badge_visible) generated from the stored reason and state columns — the list contract applies the same badge logic that selected-run detail uses.
89
+
90
+
Fields that appear in selected-run detail but not in the list-item contract — such as `open_wait_id`, `resume_source_kind`, `resume_source_id`, `next_task_id`, `projection_schema_version`, `run_navigation`, command/signal/update/wait/task/timeline scopes, and per-run collections — are intentionally excluded from the fleet-list surface. Consumers that need those fields should fetch the selected-run detail route.
91
+
92
+
### Selected-run detail fields
93
+
94
+
The selected-run detail route returns a richer payload that includes everything in the list-item contract plus:
0 commit comments