| index a1ac793c6..a565eee57 100644 |
| --- a/internal/provision/testdata/plan14-root-reads-plans-6a-units.tsv |
| +++ b/internal/provision/testdata/plan14-root-reads-plans-6a-units.tsv |
| @@ -1,4 +1,4 @@ |
| -# Census overlay plans-6a-units, written by hand: 20 new units of plans 6a billing (console SQL on its own billing tables, account_plans and plan_cap_state, the billing webhook body, the Stripe client response body, and the price book file), a decision. census-ruling-plans-6a-units; the card is docs/superpowers/notes/census-proposal-plans-6-checkout.md. Regenerated after the Astra fix pass and the Plan 4d integration (2026-10-25). |
| +# Census overlay plans-6a-units, written by hand: 22 new units of plans 6a billing (console SQL on its own billing tables, account_plans and plan_cap_state, the billing webhook body, the Stripe client response body, and the price book file), a decision. census-ruling-plans-6a-units; the card is docs/superpowers/notes/census-proposal-plans-6-checkout.md. Regenerated after Astra round 2 (2026-10-25): DiscoverableBillingAccounts and migrateBillingAccounts changed (discover_retry), ResolveBillingProblem and SetBillingDiscoveryRetry new. |
| @legacy 058848562e19e53835d838c5b4ddde13c8da81fae081e57cbd4eae204af25fe0 internal/billingstripe/client.go Client.do legacy accepted-legacy accepted-legacy;rev3=census-ruling-plans-6a-units;basis=the console (cmd/console serve under console.service, user carlos-console), billing only (CARLOS_BILLING test or live): reads one Stripe API response body into memory, bounded to 1 MiB (io.ReadAll of an io.LimitReader); no filesystem read; requests go only to the configured base URL (api.stripe.com) with redirects refused; plans 6a file:ReadAll@1372 81ecef4a9ff10808f4ac61a07b770c16140feb4662fa2590fdef59adf1660d0f |
| @legacy 402179ec120bbe10184783ec7ff2f597ee13422c790edb73df9969d57a7e2f2e internal/console/accountplans.go billingSetPlan legacy accepted-legacy accepted-legacy;rev3=census-ruling-plans-6a-units;basis=root-input; console SQL on its own account_plans table, as Store.SetAccountPlan (J4): the same upsert statement (accountPlanUpsertSQL) run inside setBillingPlanTx's transaction with source billing; reached only through Server.applyBillingPlan, Plan 4d's shared plan transition; plans 6a file:QueryRow@287 a61887543cf2597f94f6a2cc653f2ae1411fad05f2f72f7f03951aab76fa6a7a |
| @legacy 8bd238d3a0be33a386551295d869663caf3bac9c8d563c04ba84cd68432958aa internal/console/accountplans.go setBillingPlanTx legacy accepted-legacy accepted-legacy;rev3=census-ruling-plans-6a-units;basis=root-input; console SQL on its own account_plans table, as its store siblings (J4): inside Store.SaveBillingSync's transaction reads the account and its plan row and writes only a row billing owns (source default or billing) when plan, packs or source change, through billingSetPlan; plans 6a file:QueryRow@259,file:QueryRow@508 2d92b3315668316e8542d93265e0b4486e68a65f5a2f9520f12e4b7a6990eb7a |
| @@ -6,15 +6,17 @@ |
| @legacy 831351c8533c017530058710dcea1217203bb45dc9e97f36eda4834ed801bedf internal/console/billingstore.go Store.BillingProblem legacy accepted-legacy accepted-legacy;rev3=census-ruling-plans-6a-units;basis=root-input; console SQL on its own billing tables (billing_price_books, billing_accounts, billing_problems), as its store siblings (J4); plans 6a billing, dormant unless CARLOS_BILLING is set file:QueryRow@98 73cc657116805beac0faeeccd5f8ffa7c6d49ad1b4e18da1115c7bb0d5a59902 |
| @legacy d75a9b858f9af7957967d283480b8a403954582a7c29b7f3b816e2249de7bed4 internal/console/billingstore.go Store.BillingProblems legacy accepted-legacy accepted-legacy;rev3=census-ruling-plans-6a-units;basis=root-input; console SQL on its own billing tables (billing_price_books, billing_accounts, billing_problems), as its store siblings (J4); plans 6a billing, dormant unless CARLOS_BILLING is set file:Query@215 d11e44fcf7e2104a94224603eccd98bcabcb362b542ad0e82096aa4ddf8ed7be |
| @legacy fd3375ab332dd7f196f0dacdfb26bc99d324b9d33cf05de0f15478a14005f9b9 internal/console/billingstore.go Store.CloseBillingProblem legacy accepted-legacy accepted-legacy;rev3=census-ruling-plans-6a-units;basis=root-input; console SQL on its own billing tables (billing_price_books, billing_accounts, billing_problems), as its store siblings (J4); plans 6a billing, dormant unless CARLOS_BILLING is set file:Exec@99 e7dde269b31cab46f2c0a4d2ca85341ccb6687f73fa8ca397b7a695b234c8e06 |
| -@legacy f3aae7f391692a31c53c72f476f96bf7ae029b768dc769849f75bafbaa27e8cc internal/console/billingstore.go Store.DiscoverableBillingAccounts legacy accepted-legacy accepted-legacy;rev3=census-ruling-plans-6a-units;basis=root-input; console SQL on its own billing tables (billing_price_books, billing_accounts, billing_problems), as its store siblings (J4); plans 6a billing, dormant unless CARLOS_BILLING is set file:Query@141 1efc7014d27552c41db63da132e801049dd2cff18e3eadab2183d25ece9f8116 |
| +@legacy 056a55171d436c9ee748b3e3894d4c7dcd6c460e0425bb78be968e1d7d8f31ba internal/console/billingstore.go Store.DiscoverableBillingAccounts legacy accepted-legacy accepted-legacy;rev3=census-ruling-plans-6a-units;basis=root-input; console SQL on its own billing tables (billing_price_books, billing_accounts, billing_problems), as its store siblings (J4); plans 6a billing, dormant unless CARLOS_BILLING is set file:Query@141 fbe66c8e73dd905a8a2a9ce98d05a93919919c52728308bd88bb0ee0fe472011 |
| @legacy 5d55fae504cedcacbcb41da161f44cc288b97788ef75cc187f321affb395babb internal/console/billingstore.go Store.LiveBillingAccounts legacy accepted-legacy accepted-legacy;rev3=census-ruling-plans-6a-units;basis=root-input; console SQL on its own billing tables (billing_price_books, billing_accounts, billing_problems), as its store siblings (J4); plans 6a billing, dormant unless CARLOS_BILLING is set file:Query@111 3e48b56b487ce954544f28878d473e2f436681b654edffac01aa17d328a9c760 |
| @legacy 0a011a4e53352482026d67d5deffe6f3a00a5dd7e3527aca24491a8d58a5714b internal/console/billingstore.go Store.NotePriceBook legacy accepted-legacy accepted-legacy;rev3=census-ruling-plans-6a-units;basis=root-input; console SQL on its own billing tables (billing_price_books, billing_accounts, billing_problems), as its store siblings (J4); plans 6a billing, dormant unless CARLOS_BILLING is set file:Exec@99,file:QueryRow@329 3cf8826e10d32cc760bfe9226094859534661cfeb5412764c1f0bd056ac926ce |
| @legacy 47e752bc6e2edcceb8096b3d6bddef8281d049f5f2da4d8fde610461e423e9ef internal/console/billingstore.go Store.OpenBillingProblem legacy accepted-legacy accepted-legacy;rev3=census-ruling-plans-6a-units;basis=root-input; console SQL on its own billing tables (billing_price_books, billing_accounts, billing_problems), as its store siblings (J4); plans 6a billing, dormant unless CARLOS_BILLING is set file:Exec@133 39c1d4852dafeb7056d203c67e099afeb74a02250481d78ce8cf56325d8b95ab |
| +@legacy 3df162aaa5f6ccc67e91f73595ae7a9d3a86c9d2ad6283c5ae64dcd0ff33e9be internal/console/billingstore.go Store.ResolveBillingProblem legacy accepted-legacy accepted-legacy;rev3=census-ruling-plans-6a-units;basis=root-input; console SQL on its own billing_problems table, as its store siblings (J4): a parameterized update closing the open problem for one account, subscription and reason when a sync finds the subscription again (Astra round 2 finding 3); plans 6a file:Exec@124 f971823135fa108233e736f514f4fbf7ef869b75e0ed7d4f47bef13b162a67b7 |
| @legacy d306fbc37e7901a40ff55d07c839f0cbed870b254e560340685f23b2f9c2db32 internal/console/billingstore.go Store.SaveBillingSync legacy accepted-legacy accepted-legacy;rev3=census-ruling-plans-6a-units;basis=root-input; console SQL on its own billing_accounts, account_plans and plan_cap_state tables, as its store siblings (J4): one transaction holding the billing row (putBillingState), the guarded plan write (setBillingPlanTx) and, for a fall, Store.MarkLapse's and Store.DeleteCapState's own statements (markLapseSQL, deleteCapStateSQL); called only by Server.applyBillingPlan under the account's lapse lock; plans 6a with Plan 4d file:Exec@652,file:Exec@795 86f1e58bf463540c5621f4de74982c5c337d850b9929f54bb8d4ed01fe231680 |
| @legacy 45ac3ce9f7a0adf6ea9934ea5d3693b18baa76dc8617f22ee762e68d085eb44e internal/console/billingstore.go Store.SetBillingCustomer legacy accepted-legacy accepted-legacy;rev3=census-ruling-plans-6a-units;basis=root-input; console SQL on its own billing tables (billing_price_books, billing_accounts, billing_problems), as its store siblings (J4); plans 6a billing, dormant unless CARLOS_BILLING is set file:Exec@176,file:QueryRow@599 cb793e9a69e21f4e1e5bc03f0cdd19e93779d78461191abb11626250e68c7c24 |
| +@legacy 13779fa0e03715f18e4994649d96fb6f922a9be07351535b73c49b1769709473 internal/console/billingstore.go Store.SetBillingDiscoveryRetry legacy accepted-legacy accepted-legacy;rev3=census-ruling-plans-6a-units;basis=root-input; console SQL on its own billing_accounts table, as its store siblings (J4): sets or clears one account's discover_retry flag after a discovery pass (Astra round 2 finding 1); plans 6a file:Exec@120 251e0f58200194a46aa385156fa829b59f4d43e4a5c5208abf10ac142552ca7c |
| @legacy 16100dbc3405ba377f0546e438b91a081b3e6040c6a0583a071f5d2e3c9b7f81 internal/console/billingstore.go Store.billingAccountWhere legacy accepted-legacy accepted-legacy;rev3=census-ruling-plans-6a-units;basis=root-input; console SQL on its own billing tables (billing_price_books, billing_accounts, billing_problems), as its store siblings (J4); plans 6a billing, dormant unless CARLOS_BILLING is set file:QueryRow@116 98f22e23dbafcb7a4977f258be1650358ad8e9e1285e6297447f581c4b8e184a |
| @legacy bdccb3e57c3cb4b9a770918489f24667093d281fb26800bb0aabbe7dc4a43996 internal/console/billingstore.go Store.migrateBilling legacy accepted-legacy accepted-legacy;rev3=census-ruling-plans-6a-units;basis=root-input; console SQL on its own billing tables (billing_price_books, billing_accounts, billing_problems), as its store siblings (J4); plans 6a billing, dormant unless CARLOS_BILLING is set file:Exec@52 1cd231645b5c265c3eb3e8c5a9d46e072ad3858497985785c07ee6f476327c53 |
| -@legacy c2e0c34b76eb19be1d14005ab745ac8998ee195d8f18d1eeca8c12bc0c6958bd internal/console/billingstore.go Store.migrateBillingAccounts legacy accepted-legacy accepted-legacy;rev3=census-ruling-plans-6a-units;basis=root-input; console SQL on its own billing tables (billing_price_books, billing_accounts, billing_problems), as its store siblings (J4); plans 6a billing, dormant unless CARLOS_BILLING is set file:Exec@60 06d5d655bdf5cbeb12aeff815600d551c6421d2620201d1cb5766d70b33e7de1 |
| +@legacy a61fd20e8c72f20aa2ee886057b309ed634a2b246d2a9e83d922fba329e1ff02 internal/console/billingstore.go Store.migrateBillingAccounts legacy accepted-legacy accepted-legacy;rev3=census-ruling-plans-6a-units;basis=root-input; console SQL on its own billing tables (billing_price_books, billing_accounts, billing_problems), as its store siblings (J4); plans 6a billing, dormant unless CARLOS_BILLING is set file:Exec@60 25fa92fc6b0f2a6fb6a0aa1927b1e1b45c3e9e7798d278ac1e0167b0111810da |
| @legacy 1367e8a45de27c59c76a356483503d125021e3ad54410dec0abc1739eacd13a6 internal/console/billingstore.go putBillingState legacy accepted-legacy accepted-legacy;rev3=census-ruling-plans-6a-units;basis=root-input; console SQL on its own billing tables (billing_price_books, billing_accounts, billing_problems), as its store siblings (J4); plans 6a billing, dormant unless CARLOS_BILLING is set file:Exec@201 32048c1e3ff5e1aa921d767b540df959a99e5e73272da8e16910d5f909e714da |
| @legacy 7786f4105042009f615da72732d7a905c497b0e9ad007525e66f0bffd154356f internal/console/billingstore.go type sqlExecer legacy accepted-legacy accepted-legacy;rev3=census-ruling-plans-6a-units;basis=root-input; an interface naming Exec so putBillingState runs on the store handle or a transaction; not a read; plans 6a file:Exec@28 bc49042df2fe2b696459d70a02fb4994215e7ba3481976e9003b257ce9cf01f7 |
| @legacy 21d74eb85c819d54a948a93455baebbee1a7eb68806a4fb210798764c79bdba0 internal/console/billingwebhook.go Server.handleBillingWebhook legacy accepted-legacy accepted-legacy;rev3=census-ruling-plans-6a-units;basis=root-input; reads the POST /billing/webhook request body bounded to 1 MiB (http.MaxBytesReader), as Server.handleSESEvents; the provider signature is verified before anything in it is used, and the body only names a subscription to re-read; plans 6a, 404 unless CARLOS_BILLING is set file:ReadAll@318 b016f33c678468c04fd9f48e2d0f561eb60a8cdb196024feca6d4a3ee20fdda6 |
| @@ -26,15 +28,17 @@ internal/console/apibilling.go Server.handleAPIBillingProblems legacy accepted-l |
| internal/console/billingstore.go Store.BillingProblem legacy accepted-legacy accepted-legacy;rev3=census-ruling-plans-6a-units;basis=root-input; console SQL on its own billing tables (billing_price_books, billing_accounts, billing_problems), as its store siblings (J4); plans 6a billing, dormant unless CARLOS_BILLING is set file:QueryRow@98 73cc657116805beac0faeeccd5f8ffa7c6d49ad1b4e18da1115c7bb0d5a59902 |
| internal/console/billingstore.go Store.BillingProblems legacy accepted-legacy accepted-legacy;rev3=census-ruling-plans-6a-units;basis=root-input; console SQL on its own billing tables (billing_price_books, billing_accounts, billing_problems), as its store siblings (J4); plans 6a billing, dormant unless CARLOS_BILLING is set file:Query@215 d11e44fcf7e2104a94224603eccd98bcabcb362b542ad0e82096aa4ddf8ed7be |
| internal/console/billingstore.go Store.CloseBillingProblem legacy accepted-legacy accepted-legacy;rev3=census-ruling-plans-6a-units;basis=root-input; console SQL on its own billing tables (billing_price_books, billing_accounts, billing_problems), as its store siblings (J4); plans 6a billing, dormant unless CARLOS_BILLING is set file:Exec@99 e7dde269b31cab46f2c0a4d2ca85341ccb6687f73fa8ca397b7a695b234c8e06 |
| -internal/console/billingstore.go Store.DiscoverableBillingAccounts legacy accepted-legacy accepted-legacy;rev3=census-ruling-plans-6a-units;basis=root-input; console SQL on its own billing tables (billing_price_books, billing_accounts, billing_problems), as its store siblings (J4); plans 6a billing, dormant unless CARLOS_BILLING is set file:Query@141 1efc7014d27552c41db63da132e801049dd2cff18e3eadab2183d25ece9f8116 |
| +internal/console/billingstore.go Store.DiscoverableBillingAccounts legacy accepted-legacy accepted-legacy;rev3=census-ruling-plans-6a-units;basis=root-input; console SQL on its own billing tables (billing_price_books, billing_accounts, billing_problems), as its store siblings (J4); plans 6a billing, dormant unless CARLOS_BILLING is set file:Query@141 fbe66c8e73dd905a8a2a9ce98d05a93919919c52728308bd88bb0ee0fe472011 |
| internal/console/billingstore.go Store.LiveBillingAccounts legacy accepted-legacy accepted-legacy;rev3=census-ruling-plans-6a-units;basis=root-input; console SQL on its own billing tables (billing_price_books, billing_accounts, billing_problems), as its store siblings (J4); plans 6a billing, dormant unless CARLOS_BILLING is set file:Query@111 3e48b56b487ce954544f28878d473e2f436681b654edffac01aa17d328a9c760 |
| internal/console/billingstore.go Store.NotePriceBook legacy accepted-legacy accepted-legacy;rev3=census-ruling-plans-6a-units;basis=root-input; console SQL on its own billing tables (billing_price_books, billing_accounts, billing_problems), as its store siblings (J4); plans 6a billing, dormant unless CARLOS_BILLING is set file:Exec@99,file:QueryRow@329 3cf8826e10d32cc760bfe9226094859534661cfeb5412764c1f0bd056ac926ce |
| internal/console/billingstore.go Store.OpenBillingProblem legacy accepted-legacy accepted-legacy;rev3=census-ruling-plans-6a-units;basis=root-input; console SQL on its own billing tables (billing_price_books, billing_accounts, billing_problems), as its store siblings (J4); plans 6a billing, dormant unless CARLOS_BILLING is set file:Exec@133 39c1d4852dafeb7056d203c67e099afeb74a02250481d78ce8cf56325d8b95ab |
| +internal/console/billingstore.go Store.ResolveBillingProblem legacy accepted-legacy accepted-legacy;rev3=census-ruling-plans-6a-units;basis=root-input; console SQL on its own billing_problems table, as its store siblings (J4): a parameterized update closing the open problem for one account, subscription and reason when a sync finds the subscription again (Astra round 2 finding 3); plans 6a file:Exec@124 f971823135fa108233e736f514f4fbf7ef869b75e0ed7d4f47bef13b162a67b7 |
| internal/console/billingstore.go Store.SaveBillingSync legacy accepted-legacy accepted-legacy;rev3=census-ruling-plans-6a-units;basis=root-input; console SQL on its own billing_accounts, account_plans and plan_cap_state tables, as its store siblings (J4): one transaction holding the billing row (putBillingState), the guarded plan write (setBillingPlanTx) and, for a fall, Store.MarkLapse's and Store.DeleteCapState's own statements (markLapseSQL, deleteCapStateSQL); called only by Server.applyBillingPlan under the account's lapse lock; plans 6a with Plan 4d file:Exec@652,file:Exec@795 86f1e58bf463540c5621f4de74982c5c337d850b9929f54bb8d4ed01fe231680 |
| internal/console/billingstore.go Store.SetBillingCustomer legacy accepted-legacy accepted-legacy;rev3=census-ruling-plans-6a-units;basis=root-input; console SQL on its own billing tables (billing_price_books, billing_accounts, billing_problems), as its store siblings (J4); plans 6a billing, dormant unless CARLOS_BILLING is set file:Exec@176,file:QueryRow@599 cb793e9a69e21f4e1e5bc03f0cdd19e93779d78461191abb11626250e68c7c24 |
| +internal/console/billingstore.go Store.SetBillingDiscoveryRetry legacy accepted-legacy accepted-legacy;rev3=census-ruling-plans-6a-units;basis=root-input; console SQL on its own billing_accounts table, as its store siblings (J4): sets or clears one account's discover_retry flag after a discovery pass (Astra round 2 finding 1); plans 6a file:Exec@120 251e0f58200194a46aa385156fa829b59f4d43e4a5c5208abf10ac142552ca7c |
| internal/console/billingstore.go Store.billingAccountWhere legacy accepted-legacy accepted-legacy;rev3=census-ruling-plans-6a-units;basis=root-input; console SQL on its own billing tables (billing_price_books, billing_accounts, billing_problems), as its store siblings (J4); plans 6a billing, dormant unless CARLOS_BILLING is set file:QueryRow@116 98f22e23dbafcb7a4977f258be1650358ad8e9e1285e6297447f581c4b8e184a |
| internal/console/billingstore.go Store.migrateBilling legacy accepted-legacy accepted-legacy;rev3=census-ruling-plans-6a-units;basis=root-input; console SQL on its own billing tables (billing_price_books, billing_accounts, billing_problems), as its store siblings (J4); plans 6a billing, dormant unless CARLOS_BILLING is set file:Exec@52 1cd231645b5c265c3eb3e8c5a9d46e072ad3858497985785c07ee6f476327c53 |
| -internal/console/billingstore.go Store.migrateBillingAccounts legacy accepted-legacy accepted-legacy;rev3=census-ruling-plans-6a-units;basis=root-input; console SQL on its own billing tables (billing_price_books, billing_accounts, billing_problems), as its store siblings (J4); plans 6a billing, dormant unless CARLOS_BILLING is set file:Exec@60 06d5d655bdf5cbeb12aeff815600d551c6421d2620201d1cb5766d70b33e7de1 |
| +internal/console/billingstore.go Store.migrateBillingAccounts legacy accepted-legacy accepted-legacy;rev3=census-ruling-plans-6a-units;basis=root-input; console SQL on its own billing tables (billing_price_books, billing_accounts, billing_problems), as its store siblings (J4); plans 6a billing, dormant unless CARLOS_BILLING is set file:Exec@60 25fa92fc6b0f2a6fb6a0aa1927b1e1b45c3e9e7798d278ac1e0167b0111810da |
| internal/console/billingstore.go putBillingState legacy accepted-legacy accepted-legacy;rev3=census-ruling-plans-6a-units;basis=root-input; console SQL on its own billing tables (billing_price_books, billing_accounts, billing_problems), as its store siblings (J4); plans 6a billing, dormant unless CARLOS_BILLING is set file:Exec@201 32048c1e3ff5e1aa921d767b540df959a99e5e73272da8e16910d5f909e714da |
| internal/console/billingstore.go type sqlExecer legacy accepted-legacy accepted-legacy;rev3=census-ruling-plans-6a-units;basis=root-input; an interface naming Exec so putBillingState runs on the store handle or a transaction; not a read; plans 6a file:Exec@28 bc49042df2fe2b696459d70a02fb4994215e7ba3481976e9003b257ce9cf01f7 |
| internal/console/billingwebhook.go Server.handleBillingWebhook legacy accepted-legacy accepted-legacy;rev3=census-ruling-plans-6a-units;basis=root-input; reads the POST /billing/webhook request body bounded to 1 MiB (http.MaxBytesReader), as Server.handleSESEvents; the provider signature is verified before anything in it is used, and the body only names a subscription to re-read; plans 6a, 404 unless CARLOS_BILLING is set file:ReadAll@318 b016f33c678468c04fd9f48e2d0f561eb60a8cdb196024feca6d4a3ee20fdda6 |