Skip to content

Commit 187d06a

Browse files
durable-workflow.github.io: update v2 changes
1 parent 3404d6e commit 187d06a

File tree

1 file changed

+57
-25
lines changed

1 file changed

+57
-25
lines changed

docs/monitoring.md

Lines changed: 57 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -30,55 +30,87 @@ WATERLINE_ENGINE_SOURCE=v2
3030

3131
`/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.
3232

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.
3434

3535
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.
3636

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
3838

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`
3943
- `instance_id`
4044
- `selected_run_id`
4145
- `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`
5347
- `is_current_run`
5448
- `engine_source`
49+
- `class`
50+
- `workflow_type`
51+
- `namespace`
52+
- `business_key`
53+
- `compatibility`
54+
- `status`
5555
- `status_bucket`
5656
- `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`
6062
- `sort_timestamp`
6163
- `sort_key`
62-
- `closed_reason`
64+
- `duration_ms`
65+
- `archived_at`
66+
- `archive_reason`
6367
- `wait_kind`
6468
- `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:
95+
96+
- `current_run_id`
97+
- `current_run_source`
98+
- `current_run_status`
99+
- `current_run_status_bucket`
100+
- `declared_entry_method`
101+
- `declared_entry_declaring_class`
102+
- `compatibility_supported`
103+
- `compatibility_reason`
67104
- `open_wait_id`
105+
- `open_wait_count`
68106
- `resume_source_kind`
69107
- `resume_source_id`
70108
- `next_task_at`
71109
- `next_task_id`
72110
- `next_task_type`
73111
- `next_task_status`
74112
- `next_task_lease_expires_at`
75-
- `liveness_state`
76113
- `liveness_reason`
77-
- `repair_blocked_reason`
78-
- `repair_attention`
79-
- `repair_blocked`
80-
- `task_problem`
81-
- `task_problem_badge`
82114
- `exception_count`
83115
- `exceptions_count`
84116
- `can_issue_terminal_commands`

0 commit comments

Comments
 (0)