@drawbridge/drawbridge-agents 0.1.10 → 0.1.12
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.
|
@@ -39,6 +39,14 @@ skill) so it stops living only in tribal memory.
|
|
|
39
39
|
sync upserts the same invoice from three concurrent webhooks (finalized/payment_succeeded/voided)
|
|
40
40
|
and relies on the index to reject the losing insert so the catch can redo it as an update. Drop
|
|
41
41
|
the index → silent duplicate invoice rows; remove the catch → concurrent events throw + retry.
|
|
42
|
+
- The `contact` collection's **unique multikey index on `leads`** (drawbridge-api
|
|
43
|
+
`schema/contact.js`) and sync's contact resolution (`lib/contact.js` + `queue/contact.js`) are
|
|
44
|
+
one contract: a lead belongs to at most one contact. One submission enqueues two resolve jobs
|
|
45
|
+
(lead insert + totals-update events) that race; the index rejects the losing create and the
|
|
46
|
+
worker retries it into the update path. The merge path must delete duplicate contacts BEFORE
|
|
47
|
+
`$set`-ing the survivor (the expanded `leads` array collides with rows about to be deleted).
|
|
48
|
+
Drop the index → duplicate contacts, doubled segment members, double-billed `contact.create` +
|
|
49
|
+
`segment.join`; reorder the merge → every merge aborts E11000 and duplicates never heal.
|
|
42
50
|
|
|
43
51
|
## `@drawbridge/*` package coordination
|
|
44
52
|
|
|
@@ -54,3 +62,16 @@ skill) so it stops living only in tribal memory.
|
|
|
54
62
|
- Import names against a package's **actual exports** — a missing export resolves to `undefined`
|
|
55
63
|
and throws at call time, not at import. Check `drawbridge-docs/reference/packages.md` (the
|
|
56
64
|
generated export surface) when unsure.
|
|
65
|
+
|
|
66
|
+
## Shopify sales channel
|
|
67
|
+
|
|
68
|
+
- `@drawbridge/shopify` storefront `getProduct`/`getProductVariantsPage` throw the **exact
|
|
69
|
+
message `'Shopify product not found'`** when the Storefront API can't see a product
|
|
70
|
+
(unpublished from the Drawbridge channel / deleted); transport and GraphQL failures throw
|
|
71
|
+
`'Shopify storefront error: …'`. drawbridge-sync's product worker (`queue/product.js`)
|
|
72
|
+
string-matches the not-found message to send publish-this-product ResourceFeedback instead of
|
|
73
|
+
retrying. Reword the message → unpublished products retry-loop forever and merchants get no
|
|
74
|
+
feedback; drawbridge-api's shopifyProduct route relies on the not-found throw staying a throw.
|
|
75
|
+
- The `write_resource_feedbacks` and `read_publications` scopes live in drawbridge-shopify-app's
|
|
76
|
+
`shopify.app.*.toml` but power other repos: sync's product ResourceFeedback sends and the
|
|
77
|
+
embedded app's publishing section. Removing either → silent Shopify userErrors, no crash.
|
package/package.json
CHANGED