toga-ai 1.0.126 → 1.0.128

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.
@@ -7,4 +7,4 @@
7
7
  | [Client Email Template Sending](features/email-template-sending.md) | `_Model_Client_EmailTemplate` sends a stored, client-defined email template by UUID. | _underscore/Model/Client/EmailTemplate.php, _underscore/Model/Client/EmailTemplateOutgoingEmailAddress.php, _underscore/Email.php |
8
8
  | [Per-Client Database Connections & the Local Logs Trap](features/per-client-database-connections.md) | When `_underscore` serves a request for a client it opens **three distinct per-client database connections**, not one. | _underscore/Database.php, _underscore/ApiRequest.php, _underscore/Model/Client/Logs/Api.php |
9
9
  | [Recursive Item Fulfillments (upstream mirroring)](features/recursive-item-fulfillments.md) | In a multi-tier supply chain a sales order (SO) spawns a purchase order (PO) that becomes another SO downstream, and so on. | _underscore/Model/Client/ItemFulfillment.php, _underscore/Model/Client/ItemFulfillmentItem.php, _underscore/Model/Client/ItemFulfillmentItemUnit.php, _underscore/Model/Client/ItemFulfillmentPackage.php, _underscore/Model/Compass/AdvanceShippingNotice.php, dbchanges2/Core/2026-02-13 - 75601 - RecursiveItemFulfillmentCreation.sql, dbchanges2/Core/2026-06-04 - RecursiveItemFulfillmentPut.sql |
10
- | [Tracking-Number Bridge Migration (ASN / Item Fulfillment / Item Receipt)](features/tracking-number-bridges.md) | Shipment tracking numbers used to live as **scalar FK columns** (`trackingNumberId`, `returnTrackingNumberId`) directly on the lowest-level "unit"/"item" tables | api2/Component/Api/V2/V2.php, _underscore/Model/Client/AdvanceShippingNoticeItemUnit.php, _underscore/Model/Client/AdvanceShippingNoticeItemUnits/TrackingNumber.php, _underscore/Model/Client/ItemFulfillmentItemUnits/TrackingNumber.php, _underscore/Model/Client/ItemFulfillment.php, _underscore/Model/Prudential/AdvanceShippingNotice.php, _underscore/Model/Compass/AdvanceShippingNotice.php, _underscore/Trait/Netsuite/ItemFulfillment.php, api2/Component/Api/Cxml/Cxml.php, dbchanges2/Client/2026-06-10 - TrackingNumberBridges.sql, dbchanges2/Core/2026-06-10 - TrackingNumberBridges.sql |
10
+ | [Tracking-Number Bridge Migration (ASN / Item Fulfillment / Item Receipt)](features/tracking-number-bridges.md) | Shipment tracking numbers used to live as **scalar FK columns** (`trackingNumberId`, `returnTrackingNumberId`) directly on the lowest-level "unit"/"item" tables | api2/Component/Api/V2/V2.php, _underscore/Model/Client/AdvanceShippingNoticeItemUnit.php, _underscore/Model/Client/AdvanceShippingNoticeItemUnits/TrackingNumber.php, _underscore/Model/Client/ItemFulfillmentItemUnits/TrackingNumber.php, _underscore/Model/Client/ItemFulfillment.php, _underscore/Model/Prudential/AdvanceShippingNotice.php, _underscore/Model/Compass/AdvanceShippingNotice.php, _underscore/Trait/Netsuite/ItemFulfillment.php, api2/Component/Api/Cxml/Cxml.php, dbchanges2/Client/2026-06-10 - TrackingNumberBridges.sql, dbchanges2/Core/2026-06-10 - TrackingNumberBridges.sql, dbchanges2/Client_Prudential/2026-06-15 - ItemFulfillmentTrackingNumberAclLogicGroups.sql, dbchanges2/Client_Quad/2026-06-18a - ItemFulfillmentItemReceiptTrackingNumberAclLogicGroups.sql |
@@ -6,8 +6,8 @@ project: _Underscore
6
6
  client: shared
7
7
  type: feature
8
8
  status: active
9
- updated: 2026-06-16
10
- owners: ["jcardinal", "mhammontree"]
9
+ updated: 2026-06-18
10
+ owners: ["jcardinal", "mhammontree", "dfranks"]
11
11
  files:
12
12
  - api2/Component/Api/V2/V2.php
13
13
  - _underscore/Model/Client/AdvanceShippingNoticeItemUnit.php
@@ -20,6 +20,8 @@ files:
20
20
  - api2/Component/Api/Cxml/Cxml.php
21
21
  - dbchanges2/Client/2026-06-10 - TrackingNumberBridges.sql
22
22
  - dbchanges2/Core/2026-06-10 - TrackingNumberBridges.sql
23
+ - dbchanges2/Client_Prudential/2026-06-15 - ItemFulfillmentTrackingNumberAclLogicGroups.sql
24
+ - dbchanges2/Client_Quad/2026-06-18a - ItemFulfillmentItemReceiptTrackingNumberAclLogicGroups.sql
23
25
  related:
24
26
  - recursive-item-fulfillments.md
25
27
  ---
@@ -133,8 +135,16 @@ returnTrackingNumber: {...} }]`, and an IFIU's as `itemFulfillmentItemUnitTracki
133
135
  **Client-DB caveat:** `Records` is a Core-only table, so the client-side `AclRecordExpressions` insert
134
136
  must derive record ids from `AclRecordPermissions` (`SELECT DISTINCT recordId ... WHERE recordId IN (...)`),
135
137
  **not** join `Records`. This gap belongs back in the migration (Core §7 + Client §6b + blank-client template).
138
+ - **The gap surfaces in prod via the NetSuite TOGa Supply per-client sync, not just UI reads.** The
139
+ 1.0 worker cron `worker/crons/toga2/netsuite/sync_togasupply_<client>.php` posts/reads through the IF/IR
140
+ bridge routes during item-fulfillment + item-receipt import, so any NetSuite-integrated client with those
141
+ integrations enabled 403s (EZ-1) on the bridge records the moment the sync exercises them. Fixed one-off
142
+ per client as each starts failing: **Prudential** (`Client_Prudential/2026-06-15 - ...`, recs 317/319) and
143
+ **Quad** (`Client_Quad/2026-06-18a - ...`, all of 317-322) so far. Each new client is whack-a-mole until
144
+ the chain is folded back into the base migration + blank-client template.
136
145
 
137
146
  ## Change history
147
+ - 2026-06-18 — Quad's NetSuite TOGa Supply sync (`sync_togasupply_quad.php`) hit the bridge ACL gap in prod: 403 EZ-1 on `item-fulfillment-tracking-numbers` (Sentry 7559037554, 46×, since the 2026-06-15 deploy). Confirmed `Client_Quad` perms 380-385 (recs 317-322, role 1) had 0 logic groups; added the chain via `Client_Quad/2026-06-18a - ItemFulfillmentItemReceiptTrackingNumberAclLogicGroups.sql` (all 6 bridges, idempotent, RANDOM_BYTES uuids). Noted the gap surfaces via the per-client sync, not only UI reads. (dfranks)
138
148
  - 2026-06-16 — Caught a migration code-update miss: four queries in `Model/Client/ItemFulfillment.php` (`upsShipmentApi`, `fedexShipmentApi`, `fulfill`, `createNetsuiteItemFulfillment`) still joined the dropped `ItemFulfillmentPackages` table to resolve tracking — repointed to `ItemFulfillments_TrackingNumbers`. See the carrier-shipping-labels doc. (mhammontree)
139
149
  - 2026-06-16 — Found + documented the bridge ACL gap: the migration creates bridge `AclRecordPermissions` (317–322) but not their `AclLogicGroups`/`AclLogicGroupExpressions`/`AclRecordExpressions` chain → 403 "No ACL Logic Groups defined" for non-Super-User reads (confirmed prod + all clients). Recorded the `slug='all'`/`sqlExpression='1'` fix for Core + per-client, plus the Client-DB `Records`-table caveat. (mhammontree)
140
150
  - 2026-06-10 — Documented the tracking-number bridge migration: scalar FK columns → `*_TrackingNumbers` bridge tables across ASN/IF/IR, ASN unit table rename, packages-table consolidation. (jcardinal)
@@ -4,4 +4,4 @@
4
4
  |-----|---------|-------|
5
5
  | [TOGa Supply (toga2-supply) Architecture](architecture.md) | `toga2-supply` is the **React + Vite frontend** for TOGa Supply — warehouse fulfillment tooling (shipment selection, fulfill & ship against carrier APIs, NetSui | toga2-supply/src/api/toga.ts, toga2-supply/src/pages/ShipmentItems/view/ShipmentItemsPage.tsx, toga2-supply/src/pages/EditShipment/view/EditShipmentPage.tsx, toga2-supply/src/pages/EditShipment/api/UpdateShipmentApi.ts, toga2-supply/src/pages/Shipments/view/components/ShipmentsCardTableForm/ShipmentsCardTableForm.tsx |
6
6
  | [Fulfill & Ship](features/fulfill-and-ship.md) | Fulfill & Ship lets a warehouse user select sales-order line items, enter serials, pick a carrier/method, and in one action: create the Item Fulfillment records | toga2-supply/src/pages/ShipmentItems/view/ShipmentItemsPage.tsx, toga2-supply/src/pages/EditShipment/view/EditShipmentPage.tsx, toga2-supply/src/pages/EditShipment/view/components/forms/EditShipmentForm.tsx, toga2-supply/src/pages/EditShipment/api/UpdateShipmentApi.ts, toga2-supply/src/pages/Shipments/view/components/ShipmentsCardTableForm/ShipmentsCardTableForm.tsx, toga2-supply/src/pages/Shipments/api/ShipmentsApi.ts, _underscore/Model/Client/ItemFulfillment.php, _underscore/Trait/Netsuite/ItemFulfillment.php, _underscore/Component/Library/Carriers/Ups/Ups.php |
7
- | [AWS Amplify Build & Deploy (non-prod environments)](workflows/amplify-build-and-deploy.md) | How `toga2-supply` (React + Vite) builds and deploys on **AWS Amplify**. | toga2-supply/amplify.yml, toga2-supply/.github/workflows/sync-stage-environments.yml, toga2-supply/.env.qc-security |
7
+ | [AWS Amplify Build & Deploy (non-prod environments)](workflows/amplify-build-and-deploy.md) | How `toga2-supply` (React + Vite) builds and deploys on **AWS Amplify**. | toga2-supply/amplify.yml, toga2-supply/.gitattributes, toga2-supply/.github/workflows/sync-stage-environments.yml, toga2-supply/.env.qc-security |
@@ -10,6 +10,7 @@ updated: 2026-06-18
10
10
  owners: ["jcardinal"]
11
11
  files:
12
12
  - toga2-supply/amplify.yml
13
+ - toga2-supply/.gitattributes
13
14
  - toga2-supply/.github/workflows/sync-stage-environments.yml
14
15
  - toga2-supply/.env.qc-security
15
16
  related:
@@ -75,6 +76,23 @@ _stage ──▶ Amplify ──▶ build --mode stage
75
76
 
76
77
  ## Edge cases & escalation
77
78
 
79
+ - **Console build spec silently overrides the repo `amplify.yml`.** A build spec saved in the
80
+ Amplify console (App settings → Build settings) **takes precedence over the repo-root
81
+ `amplify.yml`**. Symptom seen: the log ran the custom `preBuild` (`NODE_OPTIONS=8192`,
82
+ `npm ci --legacy-peer-deps`) but the `build` phase started and completed instantly with **zero
83
+ commands** (`# Starting phase: build` → `# Completed phase: build`, no `# Executing command:`
84
+ lines), producing no `dist/` → `CustomerError: Artifact directory doesn't exist: dist`. Cause:
85
+ the console spec had the custom `preBuild` but an **empty `build` phase**, and it won over the
86
+ repo file. Fix: either paste the full spec (with the build command) into the console editor, or
87
+ remove the console override so Amplify uses the repo `amplify.yml`. Diagnostic: if you don't see
88
+ the `Branch '...' -> Vite mode '...'` echo in the build log, the build phase isn't running.
89
+ - **`amplify.yml` must be LF, not CRLF.** A CRLF-terminated `amplify.yml` (easy to produce on
90
+ Windows) can break Amplify's parsing of a multi-line `- |` block-scalar command — the simple
91
+ one-line `preBuild` entries survive but the block-scalar `build` command is dropped, giving the
92
+ same empty-build symptom as above. Mitigations applied: `.gitattributes` pins `*.yml`/`*.yaml`
93
+ to `eol=lf`, and the build step is written as a **single-line** command (no block scalar) to
94
+ remove the parsing fragility entirely. `core.autocrlf` is `false` in this repo, so bytes commit
95
+ as-is — keep the file LF.
78
96
  - **Silent wrong-endpoint trap (caused a production outage):** When Vite is given a `--mode`
79
97
  with no matching `.env.<mode>`, it **silently falls back to the base `.env`** (which points at
80
98
  beta) instead of erroring. An `amplify.yml` that built `--mode "$AWS_BRANCH"` therefore ran
@@ -96,6 +114,10 @@ _stage ──▶ Amplify ──▶ build --mode stage
96
114
 
97
115
  ## Change history
98
116
 
117
+ - 2026-06-18 — Diagnosed empty-`build`-phase failure (`Artifact directory doesn't exist: dist`):
118
+ console build spec overrides the repo `amplify.yml`, and CRLF can drop the block-scalar build
119
+ command. Switched build step to a single-line command, added `.gitattributes` pinning `*.yml`
120
+ to LF. (jcardinal)
99
121
  - 2026-06-18 — Fixed production-breaking deploy: `amplify.yml` now strips the leading `_` from
100
122
  `$AWS_BRANCH` to get the Vite mode and **fails loudly** if `.env.$MODE` is missing (was
101
123
  silently falling back to beta); heap set to 8192; sync workflow targets underscore-prefixed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "toga-ai",
3
- "version": "1.0.126",
3
+ "version": "1.0.128",
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",