@drawbridge/drawbridge-agents 0.1.22 → 0.1.23
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.
|
@@ -65,6 +65,14 @@ skill) so it stops living only in tribal memory.
|
|
|
65
65
|
- Meter events are **single-writer**: true-ups are `billing.trueup` ledger rows, never meter
|
|
66
66
|
events. A true-up written as a meter event in-window corrupts the reflection poll and strands
|
|
67
67
|
units unbillable.
|
|
68
|
+
- **Upgrade mechanics and the billing path are one contract**: drawbridge-stripe's upgrade
|
|
69
|
+
(`subscription.change`) swaps the metered actions price in place, and classic-mode Stripe then
|
|
70
|
+
ignores meter events on that closing cycle invoice entirely — so drawbridge-sync's
|
|
71
|
+
`settleCycleUsage` bills upgrade-truncated invoices (actions line starts >60s after
|
|
72
|
+
`period_start`) as plain invoice items priced from plans.js instead of the meter. Changing the
|
|
73
|
+
upgrade mechanic (schedules, cycle-anchor reset, `billing_mode=flexible`) or the metering path
|
|
74
|
+
without re-checking the other side silently re-zeroes upgrade-cycle invoices. Detail:
|
|
75
|
+
drawbridge-docs `reference/billing.md` § Stripe meter emission.
|
|
68
76
|
- Every `$inc` on a `totals.*` counter needs a matching entry in `drawbridge-sync/lib/totals.js`
|
|
69
77
|
`SOURCES` — that map is the only drift backstop.
|
|
70
78
|
- The `invoice` collection's **unique partial index on `stripeInvoiceId`** (drawbridge-api
|
package/package.json
CHANGED