toga-ai 1.0.1052 → 1.0.1053
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.
|
@@ -56,6 +56,7 @@
|
|
|
56
56
|
| [The two sandbox-dev worker2 environments (and how `_underscore` reaches a worker box)](features/sandbox-dev-worker-environments.md) | Two Elastic Beanstalk environments both call themselves "sandbox-dev" worker, they run **different `ENVIRONMENT` values**, they clone **different `_underscore` |
|
|
57
57
|
| [Service Request → Sales Order → Purchase Order generation (Sync/ServiceRequest)](features/service-request-sales-order-generation.md) | Worker `_Worker_Sync_ServiceRequest` that turns a Service Request → Sales Order → one PO per vendor for any tenant; open for the SR→SO→PO chain, its interceptor |
|
|
58
58
|
| [SSO Stability Monitor (Monitor/Operations/SsoStability)](features/sso-stability-monitor.md) | Reporter cron that GETs the saml `/healthcheck` and pushes an SSO heartbeat to a OneUptime monitor; open when working on the SSO uptime probe, its tokens, or it |
|
|
59
|
+
| [Startech Entitlement Provisioning Monitor (Monitor/Startech/EntitlementProvisioning)](features/startech-entitlement-provisioning-monitor.md) | OneUptime monitor that every new entitlement on a Startech-trait client got a 2xx `/sku` call; open when it alarms or when a new client adopts `_Trait_Startech_ |
|
|
59
60
|
| [Startech Webhook Handler (worker2)](features/startech-webhook-handler.md) | Inbound Startech (Easeedesk) webhook handler that creates/updates the matching TOGA 2.0 ticket; open for the webhook flow, its payload, or ticket-type/stage res |
|
|
60
61
|
| [Stranded WorkerJobs (deploy-window job loss) and how to repair them](features/stranded-worker-jobs.md) | Jobs queued while worker2 restarts are dropped silently with no retry and no alert; open when a cron "never ran" or a webhook vanished. |
|
|
61
62
|
| [Talos Meeting-Notes Integration & Token Auto-Refresh (consumer)](features/talos-meeting-notes-integration.md) | Consumer side of Talos: the endpoints, DevCore assistant, and JWT auto-refresh a worker2 dev tool needs to query the meeting-notes corpus; open when a tool must |
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Startech Entitlement Provisioning Monitor (Monitor/Startech/EntitlementProvisioning)
|
|
3
|
+
framework: "2.0"
|
|
4
|
+
repo: worker2
|
|
5
|
+
project: Worker
|
|
6
|
+
client: shared
|
|
7
|
+
type: feature
|
|
8
|
+
status: active
|
|
9
|
+
updated: 2026-10-16
|
|
10
|
+
owners: ["snaredla"]
|
|
11
|
+
files:
|
|
12
|
+
- worker2/Worker/Monitor/Startech.php
|
|
13
|
+
- _underscore/Trait/Startech/Entitlement.php
|
|
14
|
+
related:
|
|
15
|
+
- clients/pcmaticb2b/features/startech-entitlement-provisioning.md
|
|
16
|
+
- 2.0/apps/worker2/features/all-client-email-queue-monitor.md
|
|
17
|
+
- 2.0/apps/worker2/features/oneuptime-worker2-monitoring.md
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
OneUptime monitor that every new entitlement on a Startech-trait client got a 2xx `/sku` call; open when it alarms or when a new client adopts `_Trait_Startech_Entitlement`.
|
|
21
|
+
|
|
22
|
+
## Summary
|
|
23
|
+
|
|
24
|
+
`_Worker_Monitor_Startech::EntitlementProvisioning()` (cron `*/5`) is a push reporter. Why: provisioning fires once in `postPost` and failures only reach `error_log` ([provisioning doc](../../../../clients/pcmaticb2b/features/startech-entitlement-provisioning.md)). Scope = Startech entitlement clients only (developer decision, TRUE-82785) — not every client's entitlement errors, not the 1.0 RetailServices sync.
|
|
25
|
+
|
|
26
|
+
## How it works
|
|
27
|
+
|
|
28
|
+
1. **Clients detected at runtime:** `Core.Clients` → `_Model_<Client>_Entitlement` file exists + `class_uses` contains `_Trait_Startech_Entitlement`. Today only Pcmaticb2b. A new client using the trait is covered with no code change.
|
|
29
|
+
2. **Hosts** per client from Core `DatabaseHosts`, same pattern as [EmailQueue](./all-client-email-queue-monitor.md); log DB registered under its real name, no alias.
|
|
30
|
+
3. **Window:** entitlements with `dtCreated` 10 min to 7 days ago.
|
|
31
|
+
4. **Match:** in `Logs_<Client>.Api`, a row `direction='OUT'`, `method='POST'`, `route='/sku'`, 2xx, `dtStamp` within -60s/+120s of `Entitlements.dtCreated`, and `requestPayload` `customerID` = `Contacts.c_startechUserId`. One Api row confirms one entitlement only.
|
|
32
|
+
5. **Tokens:** `HIGH` = a miss under 24h old; `DEGRADED` = an older miss in the 7 days, or a client could not be read; `status=error` = no client checkable, or no client uses the trait.
|
|
33
|
+
|
|
34
|
+
OneUptime import JSON: `test/@Bala/monitors/monitor-import-startech-entitlement-provisioning.json` (not committed).
|
|
35
|
+
|
|
36
|
+
## Gotchas
|
|
37
|
+
|
|
38
|
+
- Compare `customerID` as string — the logged payload has it sometimes quoted, sometimes int.
|
|
39
|
+
- Keep the `Api` query on a narrow `dtStamp` window (`Api_dtStamp_IDX`, about 118 rows). A route-only scan uses `Api_method_IDX` (133k rows). Never range-scan Core `Logs.Api` over months — it times out. `Logs.Event` keeps only about 7 days.
|
|
40
|
+
- `c_startechUserId` on the contact does not prove this entitlement was provisioned — see gotcha in the provisioning doc.
|
package/knowledge/INDEX.md
CHANGED
|
@@ -22,7 +22,7 @@ _Auto-generated by `knowledge.js index`. Do not hand-edit._
|
|
|
22
22
|
## 2.0 framework
|
|
23
23
|
|
|
24
24
|
- **_underscore** (_Underscore) _(framework core)_ — 101 doc(s) → [2.0/apps/_underscore/INDEX.md](2.0/apps/_underscore/INDEX.md)
|
|
25
|
-
- **worker2** (Worker) —
|
|
25
|
+
- **worker2** (Worker) — 89 doc(s) → [2.0/apps/worker2/INDEX.md](2.0/apps/worker2/INDEX.md)
|
|
26
26
|
- **api2** (API) — 26 doc(s) → [2.0/apps/api2/INDEX.md](2.0/apps/api2/INDEX.md)
|
|
27
27
|
- **dbchanges2** (Database Changes) _(framework core)_ — 22 doc(s) → [2.0/apps/dbchanges2/INDEX.md](2.0/apps/dbchanges2/INDEX.md)
|
|
28
28
|
- **toga2-supply** (TOGa Supply) — 9 doc(s) → [2.0/apps/toga2-supply/INDEX.md](2.0/apps/toga2-supply/INDEX.md)
|
|
@@ -5,7 +5,7 @@ project: TOGa
|
|
|
5
5
|
client: pcmaticb2b
|
|
6
6
|
type: client-feature
|
|
7
7
|
status: active
|
|
8
|
-
updated: 2026-
|
|
8
|
+
updated: 2026-10-16
|
|
9
9
|
owners: [snaredla]
|
|
10
10
|
files:
|
|
11
11
|
- _underscore/Trait/Startech/Entitlement.php
|
|
@@ -79,6 +79,9 @@ Runnable harness: `test/@srija/Startech Testing/PC Matic B2B/test_e2e_pcmaticb2b
|
|
|
79
79
|
- **Silent failure.** On any error the trait `error_log`s and returns — no exception. If creds or endpoint are wrong, provisioning fails invisibly. Check `error_log` / the OUT log.
|
|
80
80
|
- **`/sku` must be an array**, and `customerID` must be capital-D.
|
|
81
81
|
- **One-way, POST-only.** No `postPut` — an entitlement created/updated through any non-POST path (or the `syncWithToga` PUT write-back) does not (re)register the SKU.
|
|
82
|
+
- **Works in prod.** Every `/v2/entitlements` POST since 2026-08-14 got `/sku` 200. 43 entitlements from 2025-10 to 2026-07 (before the July fix) were never provisioned. Alerting: [provisioning monitor](../../../2.0/apps/worker2/features/startech-entitlement-provisioning-monitor.md).
|
|
83
|
+
- **`c_startechUserId` is not a per-entitlement signal.** Entitlements 105 (2026-08-28) and 106 (2026-08-31) were created with no `/v2/entitlements` POST and no OptimumDesk call, but their contacts already had the id. Open: tests, or a second create path that skips Startech. Prove provisioning with the `OUT /sku` log row instead.
|
|
84
|
+
- **OUT log query:** filter by a narrow `dtStamp` window (uses `Api_dtStamp_IDX`); logged `customerID` is sometimes string, sometimes int.
|
|
82
85
|
- **Config drift across envs.** All three env inis must carry `[startechPcmaticb2b]`; a missing section means `_Config::startechPcmaticb2b()` returns falsy and the trait bails.
|
|
83
86
|
|
|
84
87
|
## Related
|
package/package.json
CHANGED