toga-ai 1.0.1121 → 1.0.1122

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: architecture
8
8
  status: active
9
- updated: 2026-10-19
9
+ updated: 2026-10-23
10
10
  owners: [jcardinal, sking, bala]
11
11
  files:
12
12
  - worker/index.php
@@ -23,10 +23,13 @@ related:
23
23
  - ./features/oneuptime-worker-uptime-monitoring.md
24
24
  - ../../2.0/apps/worker2/features/worker-fleet-role-assignment-monitor.md
25
25
  - ../togadesk/features/email-to-ticket-intake.md
26
+ - ../worker1.5/architecture.md
26
27
  ---
27
28
 
28
29
  The 1.0 `App_` background-job tier (~550 CRON scripts); open for how crons are scheduled, how the 7-worker role election works, and its silent-death failure modes.
29
30
 
31
+ > **Moved:** the worker 1.0 jobs now run on one worker1.5 server on PHP 8.5 (TRUE-83078, commit 58dab19). For how crons run now, see [../worker1.5/architecture.md](../worker1.5/architecture.md).
32
+
30
33
  ## Summary
31
34
 
32
35
  `worker` is the legacy (**1.0** `App_` framework) **background-job tier**: ~550 standalone PHP CRON scripts under `crons/` for everything web apps must not do inline — notifications/reports, DB backups, third-party syncs (NetSuite, EDI partners, NYC DOE, ManageEngine, Syncro…), cloud-infrastructure maintenance, and TOGa / TOGaDesk / TOGa-2 client integrations.
@@ -0,0 +1,5 @@
1
+ # worker1.5 (Worker 1.5) — 1.0 knowledge
2
+
3
+ | Doc | Summary |
4
+ |-----|---------|
5
+ | [Worker 1.5 (1.0 Framework) Architecture](architecture.md) | The single-server 1.0 cron tier that replaced worker's 7-role fleet; open for how the crontab is built from schedules/*.json, the overlap check, and what the cr |
@@ -0,0 +1,49 @@
1
+ ---
2
+ title: Worker 1.5 (1.0 Framework) Architecture
3
+ framework: "1.0"
4
+ repo: worker1.5
5
+ project: Worker 1.5
6
+ client: shared
7
+ type: architecture
8
+ status: active
9
+ updated: 2026-10-23
10
+ owners: [bala]
11
+ files:
12
+ - worker1.5/ebs/cron.worker.php
13
+ - worker1.5/.platform/hooks/postdeploy/020_cron.sh
14
+ - worker1.5/schedules/
15
+ - worker1.5/crons/
16
+ - worker1.5/mvc/get.php
17
+ related:
18
+ - ../worker/architecture.md
19
+ - ../library/architecture.md
20
+ - ../../standards/backend-php.md
21
+ ---
22
+
23
+ The single-server 1.0 cron tier that replaced worker's 7-role fleet; open for how the crontab is built from schedules/*.json, the overlap check, and what the cron list page is (display only).
24
+
25
+ ## Summary
26
+
27
+ `worker1.5` is the 1.0 `App_` background-job tier on **one Elastic Beanstalk server, PHP 8.5, AL2023** (TRUE-83078). It is a copy of the legacy `worker` repo with the same folder layout (`crons/<area>/...`, `crons/toga2/<client>/`). The 7 role schedules were merged into one file. Role election, heartbeat, stale-worker termination and per-role Elastic IPs are gone: one server runs every active job. Builds on `library`.
28
+
29
+ **Critical rules:** the schedule `schedules/cron.<ENVIRONMENT>.json` is the source of truth. Production is `cron.worker.json`. A script not in it never runs. A bad `schedule` (not 5 fields) or a `%` in a command aborts the whole crontab install on deploy. Keep cron's default `/bin/sh`: `App_Framework::isProcessRunning()` only ignores `/bin/sh` parent rows, so another shell breaks the already-running check (TRUE-83121). Any PHP warning exits the request or cron (see the backend-php standard, *Any PHP warning terminates the request*).
30
+
31
+ ## How a job becomes a cron
32
+
33
+ 1. On deploy, `.platform/hooks/postdeploy/020_cron.sh` links `/var/www/html` to `/var/app/current`, reads `ENVIRONMENT` from EB config, and runs `php ebs/cron.worker.php`.
34
+ 2. `cron.worker.php` reads `schedules/cron.<ENVIRONMENT>.json` and writes root's crontab:
35
+ - `cron` → `php /var/www/html/crons/<cron>`; `url` → `wget -q -O /dev/null http://localhost<url>`; `command` → used as is.
36
+ - `active: 0` rows are skipped.
37
+ - Every job appends to the one log file `/var/log/worker-cron.log` (logrotate `/etc/logrotate.d/worker-cron`).
38
+ - It refuses to install if the file is missing, the JSON is bad, a row has no cron/url/command, or there are 0 active jobs.
39
+ 3. Timezone for the installer is `America/Chicago`.
40
+
41
+ Schedule files: `cron.alpha/beta/demo/hotfix/sprint/stage/ui/worker.json`. Only `worker` (production) carries the real list. The others hold 1 to 2 rows.
42
+
43
+ ## Cron list page (`mvc/get.php`)
44
+
45
+ `/` renders the schedule files as a list plus a sidebar. **Display only.** Crons never go through it, so a page error does not stop crons. It reads and sorts the schedule files once into `$scheduleSections`. `cron.worker.json` (empty category) shows as section `misc`.
46
+
47
+ ## Gotchas
48
+ - **Do not read files that are not in this repo on a 1.0 page.** The page read `schedules/cron.worker.catalog.json` (old worker only). The warning became `exit` and the page died about 474 times an hour (9,387 total), probably from a health check on `/`. Fixed in TRUE-83107 (c903b20).
49
+ - **`App_Misc::getFileList` uses `readdir` and does not sort.** Any loop that keeps state per file must set that state on every file. The old loop set `$jsonContents` only for a non-empty category, so `cron.worker.json` reused the previous file's rows, or warned (and exited) if it came first.
@@ -7,7 +7,7 @@ _Auto-generated by `knowledge.js index`. Do not hand-edit._
7
7
  - **library** (Library) _(framework core)_ — 41 doc(s) → [1.0/apps/library/INDEX.md](1.0/apps/library/INDEX.md)
8
8
  - **worker** (Worker) — 43 doc(s) → [1.0/apps/worker/INDEX.md](1.0/apps/worker/INDEX.md)
9
9
  - **dbchanges** (Database Changes) _(framework core)_ — 1 doc(s) → [1.0/apps/dbchanges/INDEX.md](1.0/apps/dbchanges/INDEX.md)
10
- - **worker1.5** (Worker 1.5) — 0 doc(s) → [1.0/apps/worker1.5/INDEX.md](1.0/apps/worker1.5/INDEX.md)
10
+ - **worker1.5** (Worker 1.5) — 1 doc(s) → [1.0/apps/worker1.5/INDEX.md](1.0/apps/worker1.5/INDEX.md)
11
11
  - **togadesk** (TOGa Desk) — 18 doc(s) → [1.0/apps/togadesk/INDEX.md](1.0/apps/togadesk/INDEX.md)
12
12
  - **togaview** (TOGa View) — 9 doc(s) → [1.0/apps/togaview/INDEX.md](1.0/apps/togaview/INDEX.md)
13
13
  - **webhook** (Webhook) — 1 doc(s) → [1.0/apps/webhook/INDEX.md](1.0/apps/webhook/INDEX.md)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "toga-ai",
3
- "version": "1.0.1121",
3
+ "version": "1.0.1122",
4
4
  "description": "TOGA Technology Team Claude Knowledge System — shared AI coding harness with skills, knowledge base CLI, and project installer for Claude Code.",
5
5
  "keywords": [
6
6
  "claude",