toga-ai 1.0.921 → 1.0.922
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -6,7 +6,7 @@ project: Worker
|
|
|
6
6
|
client: shared
|
|
7
7
|
type: feature
|
|
8
8
|
status: active
|
|
9
|
-
updated: 2026-09-
|
|
9
|
+
updated: 2026-09-30
|
|
10
10
|
owners: [jcardinal]
|
|
11
11
|
files:
|
|
12
12
|
- worker2/Worker/Monitor/Clickup.php
|
|
@@ -35,6 +35,7 @@ Distinct from the sibling email watchdog [`_Worker_Clickup_Health`](./clickup-co
|
|
|
35
35
|
- `HIGH` (full failure / Offline) — **blind read**: the ClickUp call threw, OR a monitored `togahub.com` webhook has no readable `health.status`. "We don't know the status."
|
|
36
36
|
- `DEGRADED` — a monitored `togahub.com` webhook has `health.status = "suspended"`, OR no `togahub.com` subscription exists at all. A known outage we can see.
|
|
37
37
|
- `OK` — every monitored webhook is readable and not suspended (so `active`, `failing`, any other readable status → OK).
|
|
38
|
+
- **Coverage check** (`evaluateCoverage()`, added 2026-09-25) also → `DEGRADED`: a watched space/event has no covering webhook, a duplicate covering webhook, or a covering webhook with `health.status = "suspended"` (`self::SUSPENDED_STATUS`). `failing` is OK here too (ClickUp is still retrying). Unreadable status is not flagged by coverage — the main loop already makes it `HIGH`.
|
|
38
39
|
- Precedence: `HIGH` > `DEGRADED` > `OK`. `probe` is `OK` on any successful read (even when `alarm=HIGH` from a blind webhook) and `DEGRADED` only when the ClickUp read itself failed.
|
|
39
40
|
- **OneUptime criteria must match the tokens** (config lives outside the repo): Request Body Contains `"alarm":"HIGH"` → Offline + incident; Contains `"alarm":"DEGRADED"` → Degraded; received in 1 min AND Contains `"alarm":"OK"` → Online (OK-gated recovery).
|
|
40
41
|
- **Push URL is an in-file `$ONEUPTIME_URL` local, not `[oneuptime]` config** — the established team convention for every `Worker/Monitor/*` file (Operations, Staples, Compass, Aig, Prudential, Nycdoe, Fleet). A cso review suggested reading it from config; the developer rejected that on purpose — the heartbeat URL is treated as low-sensitivity and stays inline, matching the siblings. See the credential note in [OneUptime push-metric monitors](./oneuptime-worker2-monitoring.md). The `$push` guard still soft-fails on a blank URL so the job can deploy inert.
|
|
@@ -47,6 +48,7 @@ Distinct from the sibling email watchdog [`_Worker_Clickup_Health`](./clickup-co
|
|
|
47
48
|
- Keep the metric POST non-fatal — a monitoring outage must never break the worker job.
|
|
48
49
|
|
|
49
50
|
## Change history
|
|
51
|
+
- 2026-09-30 — Coverage check flagged any covering webhook with status ≠ `active` as degraded, so `failing` (fail_count 1) made the monitor Degraded. Now flags only `suspended`; const `HEALTHY_STATUS` → `SUSPENDED_STATUS`, `CheckWebhook()` uses `self::SUSPENDED_STATUS` (duplicate local removed). `Worker/Clickup/Project.php` (EnsureWebhooks) only reads `degradedHealth` for a message — unaffected. Not yet committed/deployed at capture. (jcardinal)
|
|
50
52
|
- 2026-09-22 — Reworked the alarm rule from "any status ≠ active → DEGRADED" to three levels: `HIGH` on a blind read (ClickUp call failed, or a webhook has no readable `health.status`), `DEGRADED` on `"suspended"` or no `togahub.com` subscription, `OK` for everything else (`active`/`failing`/other). Original was too sensitive. Also hardened: blind-path OneUptime push wrapped in try/catch (non-fatal), `health` guarded against a non-object, stale "Left BLANK" URL comment removed (URL is live). Payload fields changed: `activeCount` → `okCount`, added `suspendedCount`/`blindCount`. OneUptime monitor criteria must be set to match `"alarm":"HIGH"` and `"alarm":"DEGRADED"`. (jcardinal)
|
|
51
53
|
- 2026-09-21 — Created `_Worker_Monitor_Clickup::CheckWebhook` (OneUptime, `*/10`, stricter than the email watchdog). Recreated the inbound webhook under the service account (`pk_87469444`, new id `bd6168ab-…`, deleting the old OAuth-owned one) so both this monitor and `_Worker_Clickup_Health` can see it — the two were previously blind to it (token-ownership gotcha above). (jcardinal)
|
|
52
54
|
|
package/package.json
CHANGED