@drawbridge/drawbridge-agents 0.1.8 → 0.1.9
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.
|
@@ -29,6 +29,11 @@ skill) so it stops living only in tribal memory.
|
|
|
29
29
|
units unbillable.
|
|
30
30
|
- Every `$inc` on a `totals.*` counter needs a matching entry in `drawbridge-sync/lib/totals.js`
|
|
31
31
|
`SOURCES` — that map is the only drift backstop.
|
|
32
|
+
- The `invoice` collection's **unique partial index on `stripeInvoiceId`** (drawbridge-api
|
|
33
|
+
`schema/invoice.js`) and sync's `upsertInvoice` E11000 catch (`lib/buffer.js`) are one contract:
|
|
34
|
+
sync upserts the same invoice from three concurrent webhooks (finalized/payment_succeeded/voided)
|
|
35
|
+
and relies on the index to reject the losing insert so the catch can redo it as an update. Drop
|
|
36
|
+
the index → silent duplicate invoice rows; remove the catch → concurrent events throw + retry.
|
|
32
37
|
|
|
33
38
|
## `@drawbridge/*` package coordination
|
|
34
39
|
|
package/package.json
CHANGED