toga-ai 1.0.784 → 1.0.785
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.
- package/knowledge/2.0/apps/dbchanges2/features/rerunnable-additive-inserts.md +23 -2
- package/knowledge/2.0/apps/worker2/INDEX.md +2 -0
- package/knowledge/2.0/apps/worker2/features/clickup-custom-field-conventions.md +60 -0
- package/knowledge/2.0/apps/worker2/features/clickup-general-automation.md +2 -2
- package/knowledge/2.0/apps/worker2/features/qa-qc-branch-automation.md +82 -0
- package/knowledge/2.0/apps/worker2/features/qa-qc-review-pipeline.md +2 -2
- package/knowledge/INDEX.md +1 -1
- package/package.json +1 -1
|
@@ -6,12 +6,13 @@ project: Database Changes
|
|
|
6
6
|
client: shared
|
|
7
7
|
type: feature
|
|
8
8
|
status: active
|
|
9
|
-
updated: 2026-09-
|
|
10
|
-
owners: [bala, kyalamarthi, apeterson, ajean]
|
|
9
|
+
updated: 2026-09-08
|
|
10
|
+
owners: [bala, kyalamarthi, apeterson, ajean, jcardinal]
|
|
11
11
|
files:
|
|
12
12
|
- dbchanges2/Client_Compass/2026-08-26a - CompassCreativeStudioPersona.sql
|
|
13
13
|
- dbchanges2/Core/2026-08-27a - Insert - Netsuite Location SyncAll CronJob.sql
|
|
14
14
|
- dbchanges2/Client/2026-09-01a - PurchaseOrderItemQtyFieldsApiRoleRead.sql
|
|
15
|
+
- dbchanges2/Core/2026-09-08e - Insert QcBatch CronJob.sql
|
|
15
16
|
related:
|
|
16
17
|
- ../architecture.md
|
|
17
18
|
- ../../worker2/features/netsuite-salesorder-open-orders-sync.md
|
|
@@ -185,6 +186,20 @@ Copying one gives you a file that duplicates the job on a second run. Three mech
|
|
|
185
186
|
pre-generated v4 literal makes the file **deterministic and reviewable**, and re-running it inserts
|
|
186
187
|
nothing anyway because of the guard.
|
|
187
188
|
|
|
189
|
+
Three more mechanics, confirmed writing `Core/2026-09-08e - Insert QcBatch CronJob.sql`:
|
|
190
|
+
|
|
191
|
+
- **Reference `CronJobs` UNQUALIFIED in a `Core/` file** — write `INSERT INTO CronJobs …`, not
|
|
192
|
+
`Core.CronJobs`. A `Core/` file runs against the `Core` database, and a cross-database
|
|
193
|
+
`Core.` prefix is exactly the cluster reference that breaks in prod (same rule as `Client_*`
|
|
194
|
+
files never reaching into `Core`).
|
|
195
|
+
- **⚠ Always set `dtCreated = NOW()` explicitly — a missing `dtCreated` writes a ZERO date, silently.**
|
|
196
|
+
This cluster's `sql_mode` is `''` (empty), so MySQL does **not** reject a `NOT NULL DATETIME`
|
|
197
|
+
with no value; it coerces it to `0000-00-00 00:00:00`. Nothing errors. Include `dtCreated` in
|
|
198
|
+
every `CronJobs` insert (and any other timestamped seed here).
|
|
199
|
+
- **Guard on `uuid = <literal> OR action = '<action>'`.** Using both in the `NOT EXISTS` makes the
|
|
200
|
+
file a no-op whether a prior run inserted the row by its (pre-generated) uuid literal or an
|
|
201
|
+
earlier hand-written row already registered the same action.
|
|
202
|
+
|
|
188
203
|
Decide `isActive` deliberately, and say why in the file header: `isActive = 1` is correct when the
|
|
189
204
|
action has **no prerequisites** (e.g. an upsert-only sync that never deletes), and `0` when a human
|
|
190
205
|
must sequence it. Give the job a `maxExecutionTime` and **place its schedule relative to its
|
|
@@ -295,6 +310,12 @@ concluding a migration is production-safe.
|
|
|
295
310
|
[FIELD_SQL calculated fields](../../_underscore/features/calculated-sql-fields.md).
|
|
296
311
|
|
|
297
312
|
## Change history
|
|
313
|
+
- 2026-09-08 — Extended the **`Core.CronJobs` registration** shape with three mechanics confirmed on
|
|
314
|
+
`Core/2026-09-08e - Insert QcBatch CronJob.sql`: reference `CronJobs` **unqualified** in a `Core/`
|
|
315
|
+
file (a `Core.` prefix is a cross-database reference that breaks in prod); **always set
|
|
316
|
+
`dtCreated = NOW()`** because this cluster's `sql_mode` is `''` and a missing value silently writes
|
|
317
|
+
a `0000-00-00` zero date instead of erroring; and guard on **`uuid = <literal> OR action = '<action>'`**
|
|
318
|
+
so a re-run is a no-op by either key. (jcardinal)
|
|
298
319
|
- 2026-09-04 — Sharpened the index guard: check `information_schema.STATISTICS` on **`COLUMN_NAME` +
|
|
299
320
|
`SEQ_IN_INDEX = 1`**, not on `INDEX_NAME` — an existing index under a different name goes
|
|
300
321
|
undetected by a name-based guard and you add a duplicate. Found while sizing (and then dropping)
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
| [Automated PR Merger — Concurrent Force-Push Clobber Race](features/automated-pr-merger-force-push-race.md) | The automated PR merger `_Worker_Team_GitHub::Merge` (`worker2` `Worker/Team/Github.php`) merges approved PRs to `_production` by **force-pushing from a clone t |
|
|
10
10
|
| [Callback Scheduling ("call me back") — worker2 AI-BDR](features/callback-scheduling.md) | The **AI-BDR callback path**: what happens between a prospect saying *"call me back later"* on a Vapi call and the dialer actually placing that second call. |
|
|
11
11
|
| [ClickUp Connectivity Watchdog](features/clickup-connectivity-watchdog.md) | A cron watchdog that emails when the ClickUp integration looks disconnected during business hours. |
|
|
12
|
+
| [ClickUp Custom-Field Conventions (constant IDs, runtime option values, Task Type migration)](features/clickup-custom-field-conventions.md) | How worker2 code must reference ClickUp custom fields. |
|
|
12
13
|
| [ClickUp Design Sprint Automation (Final Design Outcome)](features/clickup-design-sprint-automation.md) | `_Worker_Clickup_Design` is meant to drive the design-sprint workflow in ClickUp via the API, replacing a set of native ClickUp automations. |
|
|
13
14
|
| [ClickUp General Automation (Sub-Environment reservation, Has UI / Has Code roll-ups)](features/clickup-general-automation.md) | `_Worker_Clickup_GeneralAutomation` reacts to ClickUp custom-field changes on a Task. |
|
|
14
15
|
| [ClickUp GitHub-tab Auto-linking & Ticket-id Branch Naming](features/clickup-github-autolink.md) | How ClickUp surfaces branches/PRs/commits in a ticket's **GitHub tab**, and the branch / PR-title naming convention that triggers it. |
|
|
@@ -43,6 +44,7 @@
|
|
|
43
44
|
| [OneUptime Incident → ClickUp Task Sync (Monitor/Oneuptime/SyncIncidents)](features/oneuptime-incident-clickup-sync.md) | An internal/shared TOGA ops feature: worker2 polls the OneUptime API every 15 minutes for **currently-open** incidents and ensures a ClickUp task exists for eac |
|
|
44
45
|
| [OneUptime push-metric monitors for 2.0 workers](features/oneuptime-worker2-monitoring.md) | A second, **OneUptime-reporting** monitoring pattern for the 2.0 worker2 tier, ported from the 1.0 `App_SystemMonitor_Compass` monitors. |
|
|
45
46
|
| [Platform Cache Cleanup (_Worker_Platform_Cache — Clean + Truncate)](features/platform-cache-cleanup.md) | `_Worker_Platform_Cache` owns maintenance of the shared **Cache** cluster that backs api2's [multi-client data retrieval](../../api2/features/cross-client-data- |
|
|
47
|
+
| [QA/QC Branch Automation (auto-mirror + rebuild-from-ledger revert)](features/qa-qc-branch-automation.md) | Two CTO-approved (AGREE) pieces of GitHub branch automation, centralized in **worker2** rather than per-repo GitHub Actions. |
|
|
46
48
|
| [QA/QC Review Pipeline (ClickUp review chain, QC batch + defect/client-review)](features/qa-qc-review-pipeline.md) | The ClickUp-driven **QA then QC** review chain for the platform-wide QA/QC dev process (per the approved `QA-QC Plan.txt`). |
|
|
47
49
|
| [Service Request → Sales Order → Purchase Order generation (Sync/ServiceRequest)](features/service-request-sales-order-generation.md) | `_Worker_Sync_ServiceRequest` turns a **Service Request into a Sales Order, and then into one Purchase Order per vendor**, for **any** tenant. |
|
|
48
50
|
| [SSO Stability Monitor (Monitor/Operations/SsoStability)](features/sso-stability-monitor.md) | `_Worker_Monitor_Operations::SsoStability(): string` is the **reporter half** of the SAML uptime monitor. |
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: ClickUp Custom-Field Conventions (constant IDs, runtime option values, Task Type migration)
|
|
3
|
+
framework: "2.0"
|
|
4
|
+
repo: worker2
|
|
5
|
+
project: Worker
|
|
6
|
+
client: shared
|
|
7
|
+
type: feature
|
|
8
|
+
status: draft
|
|
9
|
+
updated: 2026-09-08
|
|
10
|
+
owners: [jcardinal]
|
|
11
|
+
files:
|
|
12
|
+
- _underscore/Component/Api/Clickup/Clickup.php
|
|
13
|
+
related:
|
|
14
|
+
- ./clickup-general-automation.md
|
|
15
|
+
- ./qa-qc-review-pipeline.md
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Summary
|
|
19
|
+
|
|
20
|
+
How worker2 code must reference ClickUp custom fields. Two rules that keep automation from
|
|
21
|
+
breaking when ClickUp field/option ids change, plus the in-flight **Task Type** field migration.
|
|
22
|
+
|
|
23
|
+
## How it works
|
|
24
|
+
|
|
25
|
+
### Field IDs are constants; option VALUES are resolved at runtime
|
|
26
|
+
|
|
27
|
+
- Custom-field IDs are named constants on `_Component_Api_Clickup`
|
|
28
|
+
(`CLICK_UP_CUSTOM_FIELD_ID__*`). **Reference the constant, never a raw id string.**
|
|
29
|
+
- Dropdown option **values** are resolved at **runtime** from the field's
|
|
30
|
+
`type_config->options` — read by `orderindex`, set by option id. **Never hardcode** an
|
|
31
|
+
option's numeric value; ClickUp reassigns them.
|
|
32
|
+
|
|
33
|
+
### Task Type migration — two separate fields
|
|
34
|
+
|
|
35
|
+
There are currently **two** Task Type fields, mid-migration:
|
|
36
|
+
|
|
37
|
+
- **OLD** `093170c3` = `CLICK_UP_CUSTOM_FIELD_ID__TASK_TYPE` — still used by the **Design
|
|
38
|
+
iteration carry**. Design tasks carry **only** the OLD field.
|
|
39
|
+
- **NEW (QA/QC)** `dc9f15da` = `CLICK_UP_CUSTOM_FIELD_ID__TASK_TYPE_NEW`.
|
|
40
|
+
|
|
41
|
+
## Gotchas
|
|
42
|
+
|
|
43
|
+
- **Do NOT repoint the shared `CLICK_UP_CUSTOM_FIELD_ID__TASK_TYPE` constant to the new
|
|
44
|
+
field** while Design tasks carry only the OLD field — it breaks the Design iteration carry.
|
|
45
|
+
New QA/QC code reads `..._TASK_TYPE_NEW`; leave the OLD constant pointing at `093170c3`.
|
|
46
|
+
- **Never hardcode a dropdown option value** — resolve it from `type_config->options` at runtime.
|
|
47
|
+
|
|
48
|
+
## Security
|
|
49
|
+
|
|
50
|
+
The ClickUp webhook-signature gap and the hardcoded `_Component_Api_Clickup::ACCESS_TOKEN` are
|
|
51
|
+
captured (with the rotation plan) in [QA/QC review pipeline](./qa-qc-review-pipeline.md) — see
|
|
52
|
+
its *Known security gaps* section rather than duplicating them here. Never paste the token value.
|
|
53
|
+
|
|
54
|
+
## Change history
|
|
55
|
+
- 2026-09-08 — Initial (draft, on `feature-qa-qc`, not deployed): documented constant-ID /
|
|
56
|
+
runtime-option-value rule and the two-field Task Type migration (OLD `093170c3`
|
|
57
|
+
`..._TASK_TYPE` still used by Design iteration carry; NEW `dc9f15da` `..._TASK_TYPE_NEW`). Do
|
|
58
|
+
not repoint the shared constant while Design tasks carry only OLD. (jcardinal)
|
|
59
|
+
</content>
|
|
60
|
+
</invoke>
|
|
@@ -15,7 +15,7 @@ files:
|
|
|
15
15
|
related:
|
|
16
16
|
- ./qa-qc-review-pipeline.md
|
|
17
17
|
- ./clickup-work-type-automation.md
|
|
18
|
-
-
|
|
18
|
+
- ./clickup-custom-field-conventions.md
|
|
19
19
|
---
|
|
20
20
|
|
|
21
21
|
## Summary
|
|
@@ -65,7 +65,7 @@ Entry: `_Worker_Clickup::Webhook` inspects the field change and fans out to
|
|
|
65
65
|
the `CLICK_UP_CUSTOM_FIELD_ID__*` constants in `_Component_Api_Clickup`; dropdown option values
|
|
66
66
|
are read at runtime from `type_config->options` (by `orderindex`, set by option id) — never
|
|
67
67
|
hardcode an option's numeric value. See
|
|
68
|
-
[ClickUp custom-field
|
|
68
|
+
[ClickUp custom-field conventions](./clickup-custom-field-conventions.md).
|
|
69
69
|
|
|
70
70
|
## Change history
|
|
71
71
|
- 2026-09-08 — Initial (draft, on `feature-qa-qc`, not deployed): new `_Worker_Clickup_GeneralAutomation`
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: QA/QC Branch Automation (auto-mirror + rebuild-from-ledger revert)
|
|
3
|
+
framework: "2.0"
|
|
4
|
+
repo: worker2
|
|
5
|
+
project: Worker
|
|
6
|
+
client: shared
|
|
7
|
+
type: feature
|
|
8
|
+
status: draft
|
|
9
|
+
updated: 2026-09-08
|
|
10
|
+
owners: [jcardinal]
|
|
11
|
+
files:
|
|
12
|
+
- worker2/Worker/Team/Github.php
|
|
13
|
+
- worker2/Worker/Github.php
|
|
14
|
+
- dbchanges2/Team/2026-09-08a - Create EnvironmentBranchMerges table.sql
|
|
15
|
+
related:
|
|
16
|
+
- ./qa-qc-review-pipeline.md
|
|
17
|
+
- ../architecture.md
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Summary
|
|
21
|
+
|
|
22
|
+
Two CTO-approved (AGREE) pieces of GitHub branch automation, centralized in **worker2** rather
|
|
23
|
+
than per-repo GitHub Actions. **Not deployed yet** — on the `feature-qa-qc` branch working tree.
|
|
24
|
+
|
|
25
|
+
1. **Branch auto-mirror** — keep certain branches a byte-for-byte copy of a source branch.
|
|
26
|
+
2. **Rebuild-from-ledger revert** — undo one task's changes on a QA/QC branch by rebuilding the
|
|
27
|
+
branch from its merge ledger, not by `git revert`.
|
|
28
|
+
|
|
29
|
+
Both feed the QA/QC review flow: a denied review routes a task to Rework and reverts its code —
|
|
30
|
+
see [QA/QC review pipeline](./qa-qc-review-pipeline.md).
|
|
31
|
+
|
|
32
|
+
## How it works
|
|
33
|
+
|
|
34
|
+
### Branch auto-mirror
|
|
35
|
+
|
|
36
|
+
- `MIRROR_MAP` declares target ← source pairs:
|
|
37
|
+
- `_sandbox-client` ← `_production`
|
|
38
|
+
- `_demo` ← `_production`
|
|
39
|
+
- `_security-qc` ← `_stage`
|
|
40
|
+
- `_performance-qc` ← `_stage`
|
|
41
|
+
- Driven by GitHub `push` webhooks; one `runTask` per target.
|
|
42
|
+
- A mirror = **hard-reset the target to the source + `git push --force-with-lease`**. This is
|
|
43
|
+
safe **only** because a mirror target holds no work of its own — it is a pure copy.
|
|
44
|
+
|
|
45
|
+
### Rebuild-from-ledger revert
|
|
46
|
+
|
|
47
|
+
- Pieces: `RevertTask` / `RebuildBranch` / `recordMerge`, the `REBUILDABLE_BRANCHES` allowlist,
|
|
48
|
+
and the `Team.EnvironmentBranchMerges` ledger (created by
|
|
49
|
+
`2026-09-08a - Create EnvironmentBranchMerges table.sql`).
|
|
50
|
+
- To undo one task's changes on a QA/QC branch, **rebuild** the branch: reset to `_production`,
|
|
51
|
+
then re-merge the remaining good tasks from the ledger (all recorded merges **minus** the
|
|
52
|
+
failed task).
|
|
53
|
+
- This replaces `git revert -m 1`. QA/QC env branches also carry `_production` merges, so
|
|
54
|
+
merge-commit revert (and revert-of-revert) break there — rebuild-from-ledger is the only
|
|
55
|
+
correct undo.
|
|
56
|
+
|
|
57
|
+
### Safety rules (load-bearing)
|
|
58
|
+
|
|
59
|
+
- **Force-push is gated to `REBUILDABLE_BRANCHES` only.** Mirror targets and `_production` are
|
|
60
|
+
excluded from rebuild force-push.
|
|
61
|
+
- **A per-repo+branch MySQL `GET_LOCK` serializes a merge against a rebuild** so they never
|
|
62
|
+
interleave on the same branch.
|
|
63
|
+
- **Conflicts skip + email** — a conflicted rebuild/merge is skipped and reported, never pushed
|
|
64
|
+
half-built.
|
|
65
|
+
|
|
66
|
+
## Gotchas
|
|
67
|
+
|
|
68
|
+
- **A mirror target must hold no work of its own.** The force-push mirror overwrites it whole;
|
|
69
|
+
any local-only commits on a mirror target are lost.
|
|
70
|
+
- **Never `git revert` a QA/QC env-branch merge.** Env branches carry `_production` merges too,
|
|
71
|
+
so merge-commit revert / revert-of-revert break. Use `RebuildBranch` (reset + re-merge from
|
|
72
|
+
the ledger).
|
|
73
|
+
|
|
74
|
+
## Change history
|
|
75
|
+
- 2026-09-08 — Initial (draft, on `feature-qa-qc`, not deployed): centralized GitHub branch
|
|
76
|
+
automation in worker2. Auto-mirror via `MIRROR_MAP` (hard-reset + force-with-lease, push
|
|
77
|
+
webhook-driven); rebuild-from-ledger revert (`RevertTask`/`RebuildBranch`/`recordMerge`,
|
|
78
|
+
`REBUILDABLE_BRANCHES`, `Team.EnvironmentBranchMerges`) replacing `git revert -m 1`. Force-push
|
|
79
|
+
gated to rebuildable branches; `GET_LOCK` serializes merge vs rebuild; conflicts skip+email.
|
|
80
|
+
(jcardinal)
|
|
81
|
+
</content>
|
|
82
|
+
</invoke>
|
|
@@ -18,7 +18,7 @@ files:
|
|
|
18
18
|
related:
|
|
19
19
|
- ./clickup-general-automation.md
|
|
20
20
|
- ./qa-qc-branch-automation.md
|
|
21
|
-
-
|
|
21
|
+
- ./clickup-custom-field-conventions.md
|
|
22
22
|
---
|
|
23
23
|
|
|
24
24
|
## Summary
|
|
@@ -70,7 +70,7 @@ code triggered when a task *left* a status; the QA/QC entry must be on entering
|
|
|
70
70
|
QA/QC entry point had to move to the entering event or the whole chain never starts.
|
|
71
71
|
- **The unit-test gate is a stub (`runUnitTests()` returns true).** It does not block anything yet.
|
|
72
72
|
- **Custom-field option VALUES are resolved at runtime, IDs are constants** — see
|
|
73
|
-
[ClickUp custom-field
|
|
73
|
+
[ClickUp custom-field conventions](./clickup-custom-field-conventions.md).
|
|
74
74
|
|
|
75
75
|
## Known security gaps (discovered, not yet fixed — separate tickets)
|
|
76
76
|
|
package/knowledge/INDEX.md
CHANGED
|
@@ -19,7 +19,7 @@ _Auto-generated by `knowledge.js index`. Do not hand-edit._
|
|
|
19
19
|
## 2.0 framework
|
|
20
20
|
|
|
21
21
|
- **_underscore** (_Underscore) _(framework core)_ — 82 doc(s) → [2.0/apps/_underscore/INDEX.md](2.0/apps/_underscore/INDEX.md)
|
|
22
|
-
- **worker2** (Worker) —
|
|
22
|
+
- **worker2** (Worker) — 68 doc(s) → [2.0/apps/worker2/INDEX.md](2.0/apps/worker2/INDEX.md)
|
|
23
23
|
- **api2** (API) — 25 doc(s) → [2.0/apps/api2/INDEX.md](2.0/apps/api2/INDEX.md)
|
|
24
24
|
- **dbchanges2** (Database Changes) _(framework core)_ — 15 doc(s) → [2.0/apps/dbchanges2/INDEX.md](2.0/apps/dbchanges2/INDEX.md)
|
|
25
25
|
- **toga2-supply** (TOGa Supply) — 9 doc(s) → [2.0/apps/toga2-supply/INDEX.md](2.0/apps/toga2-supply/INDEX.md)
|
package/package.json
CHANGED