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
{{ message }}
Repository navigation
Commit a3aab12
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: docs/api.md
+25-1Lines changed: 25 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1070,8 +1070,32 @@ Manually trigger a registered OME strategy.
1070
1070
1071
1071
| Field | Type | Notes |
1072
1072
|---|---|---|
1073
-
|`status`|`"ok" \| "timeout"`|Whether the strategy completed within the timeout |
1073
+
|`status`|`"ok" \| "timeout" \| "not_dispatched"`|`ok` = every dispatched run settled — a dead-lettered run still counts as settled (see `runs[*].error`); `timeout` = at least one run had not settled when `timeout` elapsed; `not_dispatched` = no strategy was dispatched (see below)|
1074
1074
|`name`|`string`| Echoes the requested strategy name |
1075
+
|`dispatched`|`int`| Number of strategy routes enqueued. `0` iff `status == "not_dispatched"`|
1076
+
|`runs`|`list[RunSummary]`| One entry per strategy run *attempt*, not per dispatched route: `{run_id: string, status: string, error?: string}`. A strategy that retried before settling contributes multiple entries sharing one `event_id`. `status` is one of `running` / `success` / `failed` / `dead_letter` / `crashed`. Includes dead-lettered runs |
1077
+
1078
+
**`not_dispatched`** means every subscriber was rejected by one of the
1079
+
four dispatch gates (`_routes_to` / `enabled` / `applies_to` /
1080
+
`Counter`). The most common cause is forgetting `"force": true` on a
1081
+
strategy that is `enabled=false` in `ome.toml` — e.g. triggering
1082
+
`reflect_episodes` without `force` while it is disabled in config
"description": "Manually trigger a registered OME strategy and wait for completion.",
225
+
"description": "Manually trigger a registered OME strategy and wait for its runs to\nsettle. Returns without waiting for the LanceDB index — the response\nreflects markdown state only; poll ``GET /health``'s ``cascade.pending``\nfor index convergence (two consecutive zero samples to guard against the\nwatcher-input window). See docs/api.md#eventual-consistency.",
226
226
"operationId": "trigger_api_v1_ome_trigger_post",
227
227
"requestBody": {
228
228
"content": {
@@ -982,7 +982,7 @@
982
982
"ome"
983
983
],
984
984
"summary": "Trigger",
985
-
"description": "Manually trigger a registered OME strategy and wait for completion.",
985
+
"description": "Manually trigger a registered OME strategy and wait for its runs to\nsettle. Returns without waiting for the LanceDB index — the response\nreflects markdown state only; poll ``GET /health``'s ``cascade.pending``\nfor index convergence (two consecutive zero samples to guard against the\nwatcher-input window). See docs/api.md#eventual-consistency.",
986
986
"operationId": "trigger_api_v2_ome_trigger_post",
987
987
"requestBody": {
988
988
"content": {
@@ -3089,6 +3089,36 @@
3089
3089
],
3090
3090
"title": "MessageItemDTO"
3091
3091
},
3092
+
"RunSummary": {
3093
+
"properties": {
3094
+
"run_id": {
3095
+
"type": "string",
3096
+
"title": "Run Id"
3097
+
},
3098
+
"status": {
3099
+
"type": "string",
3100
+
"title": "Status"
3101
+
},
3102
+
"error": {
3103
+
"anyOf": [
3104
+
{
3105
+
"type": "string"
3106
+
},
3107
+
{
3108
+
"type": "null"
3109
+
}
3110
+
],
3111
+
"title": "Error"
3112
+
}
3113
+
},
3114
+
"type": "object",
3115
+
"required": [
3116
+
"run_id",
3117
+
"status"
3118
+
],
3119
+
"title": "RunSummary",
3120
+
"description": "One strategy run within a trigger response."
3121
+
},
3092
3122
"SearchAgentCaseItem": {
3093
3123
"properties": {
3094
3124
"id": {
@@ -4006,15 +4036,28 @@
4006
4036
"name": {
4007
4037
"type": "string",
4008
4038
"title": "Name"
4039
+
},
4040
+
"dispatched": {
4041
+
"type": "integer",
4042
+
"title": "Dispatched"
4043
+
},
4044
+
"runs": {
4045
+
"items": {
4046
+
"$ref": "#/components/schemas/RunSummary"
4047
+
},
4048
+
"type": "array",
4049
+
"title": "Runs",
4050
+
"default": []
4009
4051
}
4010
4052
},
4011
4053
"type": "object",
4012
4054
"required": [
4013
4055
"status",
4014
-
"name"
4056
+
"name",
4057
+
"dispatched"
4015
4058
],
4016
4059
"title": "TriggerResponse",
4017
-
"description": "Response body for ``POST /api/v2/ome/trigger``."
4060
+
"description": "Response body for ``POST /api/v2/ome/trigger``.\n\n``status`` distinguishes three outcomes that were previously masked as\na single ``ok``:\n\n- ``ok``: at least one strategy was dispatched and all runs settled\n within ``timeout``. Individual run outcomes are in ``runs`` (a\n ``dead_letter`` there is still ``ok`` at this level — the strategy\n *ran*, it just failed permanently).\n- ``timeout``: at least one strategy was dispatched but the engine did\n not go idle within ``timeout``. Runs may be partially complete;\n poll ``GET /health`` for cascade convergence separately.\n- ``not_dispatched``: no strategy was dispatched — the subscriber was\n rejected by one of the dispatch gates (``_routes_to`` / ``enabled`` /\n ``applies_to`` / ``Counter``). Common cause: forgetting\n ``force=true`` on a strategy that is ``enabled=false`` in ome.toml."
0 commit comments