toga-ai 1.0.715 → 1.0.716

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-08-30
9
+ updated: 2026-08-31
10
10
  owners: ["dfranks", "bala", "jcardinal", "mhammontree", "snaredla"]
11
11
  files:
12
12
  - worker/crons/toga2/netsuite/common_sync_togasupply.php
@@ -732,6 +732,35 @@ Parameters are stored **per client DB** but accessed **through the TOGa2 API**,
732
732
  line). **Fix (`library`):** skip lines whose `adjustQtyBy` is null in **BOTH** passes over
733
733
  `inventoryList->inventory` (the item-build pass and the serial/unit pass). Shared fix; unblocked NYCHH
734
734
  inventory adjustments.
735
+ - **⚠ Item-receipt sync froze on a PARTIAL receipt's NULL-quantity PO lines — the item-receipt TWIN of the
736
+ inventory-adjustment NULL-quantity fix above (fixed 2026-08-31).** For a partial item receipt NetSuite
737
+ returns **all** the PO's linked lines but sets `quantity=null` on the lines **not received on this
738
+ receipt** (SuiteQL `transactionline.quantity` is NULL for an un-received PO line). The REST shim
739
+ `App_Api_Netsuite_Rest::fetchItemReceiptById` (`rest.php` ~L2196) faithfully carries that null, and
740
+ `syncItemReceiptFromNetsuite` wrote those null lines into the `POST /v2/item-receipts` payload →
741
+ `ItemReceiptItems.quantity` is `NOT NULL` → api2 `EV-10` / MySQL **1048** "Column 'quantity' cannot be
742
+ null", the section threw (no per-record try/catch — fail-loud by design), and froze at `1-RUNNING`
743
+ re-trying the same poison receipt every 5 min. Seen on **NYCHH** ITEM_RECEIPTS: stuck on receipt **#22302**
744
+ (NetSuite internalId 3425518, dated 2023-05-01; 5 PO lines, 2 received qty 260, 3 returned null), watermark
745
+ frozen at 2023-05-01, throwing every run (`Logs.Issue 578`, "Invalid API Response" from
746
+ `send()` `toga2.php:3517`). **Fix (`library`):** skip line items whose `quantity` **`is_null`** (NOT
747
+ `empty`, so a legitimate received qty of 0 still writes) in **BOTH** passes over
748
+ `$nsItemReceipt->itemList->item` — the payload-build loop (~L3376) and the unit/serial pass (~L3538).
749
+ Shared fix; no signature change, no SQL. Recovery is automatic: the watermark sits at the failing window's
750
+ start, so on deploy the section self-heals (RUNNING→IDLE, watermark advances past #22302, window regrows).
751
+ Diagnosis chain (reinforces the playbook above): `Client_Nychh.Parameters` to localize the stuck section
752
+ (`1-RUNNING` + frozen watermark) → `Logs.Event` filtered by `clientId=3` for the crash file:line +
753
+ `transactionId` (`Logs.Event` carries `clientId`, `Logs.Issue` does not) → `Logs_Nychh.Api` on that
754
+ `transactionId` for the untruncated `EV-10`/1048 rejection and the payload showing the `quantity:null`
755
+ lines.
756
+ - **⚠ OPEN, not yet root-caused (found 2026-08-31): NYCHH ITEM_FULFILLMENTS watermark frozen at 2021-12-29.**
757
+ `NETSUITE_EXECUTION_MODE_ITEM_FULFILLMENTS='3-IDLE'` with the window collapsed to ~3s (it has been
758
+ throwing recently) but currently **IDLE** — so it crawls a few seconds per run rather than sitting in a
759
+ hard `1-RUNNING` freeze. Distinct from the fixed ITEM_RECEIPTS freeze above; needs its own investigation.
760
+ Context: the 2026-08-31 full 19-client togasupply prod sweep found all other clients healthy
761
+ (`864000-IDLE`) except Elite SALES_ORDERS `864000-RUNNING` (healthy mid-run, large window, not stuck) and
762
+ AIG SALES_ORDERS `8-RUNNING` (the known held account, already documented). Only NYCHH ITEM_RECEIPTS was in
763
+ a true `1-RUNNING` freeze.
735
764
  - **⚠ Item-fulfillment stale-item prune must delete tracking-number children before the unit AND the item
736
765
  (fixed 2026-08-30).** In `syncItemFulfillmentFromNetsuite`'s cleanup loop, deleting a stale
737
766
  item-fulfillment-item-**unit** failed api2 `EV-11` / MySQL **1451** (FK
@@ -792,6 +821,16 @@ Parameters are stored **per client DB** but accessed **through the TOGa2 API**,
792
821
 
793
822
  ## Change history
794
823
 
824
+ - 2026-08-31 — **Item-receipt partial-receipt NULL-quantity fix (shared, `library`).**
825
+ `syncItemReceiptFromNetsuite` now **skips line items whose `quantity` is null** (unreceived PO lines on a
826
+ partial receipt) in both passes over `$nsItemReceipt->itemList->item` (payload-build ~L3376 + unit/serial
827
+ ~L3538), guarded on `is_null` so a received qty of 0 still writes. This is the item-receipt twin of the
828
+ 2026-08-30 inventory-adjustment NULL-quantity skip — the receipt path never got that guard. It unfroze
829
+ NYCHH ITEM_RECEIPTS (stuck `1-RUNNING` on receipt #22302 / NetSuite 3425518 / 2023-05-01 → `EV-10`/1048
830
+ "quantity cannot be null", `Logs.Issue 578`); self-heals on deploy. Also flagged an OPEN item: NYCHH
831
+ ITEM_FULFILLMENTS watermark frozen at 2021-12-29 (`3-IDLE`, window collapsed to ~3s), not yet root-caused.
832
+ 19-client sweep otherwise healthy. `library` only, no SQL, `php -l` clean; not deployed at capture time.
833
+ (jcardinal)
795
834
  - 2026-08-31 — **Invoice + serial-unit + duplicate-Item root-cause fixes (shared, `library`).**
796
835
  `syncInvoiceFromNetsuite` now assigns a **sequential 1..N invoice `lineNumber`** (NetSuite reuses `line`
797
836
  across multi-SO invoices → `InvoiceItems UNIQUE(invoiceId,lineNumber)` 1062 → atomic rollback → NYCHH
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "toga-ai",
3
- "version": "1.0.715",
3
+ "version": "1.0.716",
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",