carlos / platform Public

plans 6a census after Astra round 2: plans-6a-units re-layered (22 units: DiscoverableBillingAccounts and migrateBillingAccounts changed, ResolveBillingProblem and SetBillingDiscoveryRetry new), census-propose re-run; ledger

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Paul Campbell pushed by claude agent, operated by paul@keymail.dev 1c091402382087d734a5f765d183243323c73dc0 parent 4153797
5 files changed, +23 −12
  • docs/superpowers/notes/census-proposal-plans-6-checkout.md +5 −3
  • docs/superpowers/notes/plans-6a-ledger.md +5 −0
  • internal/provision/testdata/plan14-root-reads-chain.tsv +2 −2
  • internal/provision/testdata/plan14-root-reads-plans-6-checkout.tsv +2 −2
  • internal/provision/testdata/plan14-root-reads-plans-6a-units.tsv +9 −5

CI failed — run details

diff --git a/docs/superpowers/notes/census-proposal-plans-6-checkout.md b/docs/superpowers/notes/census-proposal-plans-6-checkout.md
index 57bb50e1d..9accd3d84 100644
--- a/docs/superpowers/notes/census-proposal-plans-6-checkout.md
+++ b/docs/superpowers/notes/census-proposal-plans-6-checkout.md
@@ -24,15 +24,15 @@ Recorded dispositions, which each change must still satisfy:
- `internal/console/server.go` `NewServer`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-self-serve-moves-1;basis=console construction adds the lifetime judge, the cutover admission gate and its first marker read; claims-off app materialisation moves to the cutover watch; the existing logs/data route literal moves and is not a filesystem read;rev3=census-ruling-plans-4d-lapse;basis=registers GET and POST /a/{sqid}/plan/keep (the owner-only keep page, plans 4d) beside the account settings routes; no goroutine; read sites unchanged, offsets moved
- `internal/console/store.go` `Store.migrate`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-self-serve-moves-1;basis=console.service user carlos-console, J4 root-input: adds the three account/app-scoped lifetime intent tables and apps.lifetime at unarmed store boot, then backfills missing lifetimes;rev3=census-ruling-plans-4d-lapse;basis=adds the additive account_plans.lapse_since and account_plans.disabled columns and calls migratePlanLapse last, which creates the console's own plan_lapse_items table (plans 4d). No read added; the new store units are the plans-4d-units decision.
-Seal: `d206d109846b6656385256cc44a75a9a866d8b5d0b4cad742140107880a54d38` → `a7d4bb220e3274151c522bd913eacadc6da1645f35b42b6d33116d050609c0ff`.
+Seal: `ff9bed97d0d1a1bdafba39ff84eb0180c24288c6069222e00bad80d14f8245fc` → `d15a9e830b9165c0b246160c33962fa86fdb85a8ba1ac1be94363048f312bf41`.
Overlay: `internal/provision/testdata/plan14-root-reads-plans-6-checkout.tsv`, appended to `internal/provision/testdata/plan14-root-reads-chain.tsv`.
## Decision: census-ruling-plans-6a-units
-Twenty new units, written by hand in `internal/provision/testdata/plan14-root-reads-plans-6a-units.tsv` (chained before this proposal's overlay, after main's rootfs-apps-2 lines, seal `d206d109846b6656385256cc44a75a9a866d8b5d0b4cad742140107880a54d38`), regenerated after the Astra fix pass and the Plan 4d integration. Each is accepted legacy, mirroring its closest sibling:
+Twenty-two new units, written by hand in `internal/provision/testdata/plan14-root-reads-plans-6a-units.tsv` (chained before this proposal's overlay, after main's rootfs-apps-2 lines, seal `ff9bed97d0d1a1bdafba39ff84eb0180c24288c6069222e00bad80d14f8245fc`), regenerated after the Astra fix pass and the Plan 4d integration. Each is accepted legacy, mirroring its closest sibling:
-- console SQL on the console's own billing tables (`billing_price_books`, `billing_accounts`, `billing_problems`): `Store.NotePriceBook`, `Store.SetBillingCustomer`, `putBillingState`, `type sqlExecer` (an interface; not a read), `Store.LiveBillingAccounts`, `Store.DiscoverableBillingAccounts`, `Store.billingAccountWhere`, `Store.OpenBillingProblem`, `Store.BillingProblems`, `Store.BillingProblem`, `Store.CloseBillingProblem`, `Store.migrateBilling`, `Store.migrateBillingAccounts` (J4, as the plans-4a store units);
+- console SQL on the console's own billing tables (`billing_price_books`, `billing_accounts`, `billing_problems`): `Store.NotePriceBook`, `Store.SetBillingCustomer`, `putBillingState`, `type sqlExecer` (an interface; not a read), `Store.LiveBillingAccounts`, `Store.DiscoverableBillingAccounts`, `Store.SetBillingDiscoveryRetry` (discovery's outstanding-work flag), `Store.ResolveBillingProblem` (a sync resolving a missing-subscription problem), `Store.billingAccountWhere`, `Store.OpenBillingProblem`, `Store.BillingProblems`, `Store.BillingProblem`, `Store.CloseBillingProblem`, `Store.migrateBilling`, `Store.migrateBillingAccounts` (J4, as the plans-4a store units);
- `Store.SaveBillingSync`: one transaction holding the billing row, the guarded plan write and, for a fall, Plan 4d's own lapse-mark and grace-reset statements (`markLapseSQL`, `deleteCapStateSQL`); called only by `Server.applyBillingPlan`, which shares `applyAccountPlan`'s transition under the account's lapse lock (J4);
- console SQL on `account_plans`: `setBillingPlanTx` (ownership guard and unchanged-write check inside that transaction) and `billingSetPlan` (the same upsert as `Store.SetAccountPlan`) (J4);
- `Server.handleAPIBillingProblems`: the one site is `r.URL.Query()` for `?all=1`, not a read;
@@ -41,3 +41,5 @@ Twenty new units, written by hand in `internal/provision/testdata/plan14-root-re
- `plans.LoadPriceBook`: the operator-configured `CARLOS_PRICE_BOOK` file, read once at console start, as `plans.LoadCatalog`; also read by the operator-run `pricebook-export`.
Since Astra's review at 7826d2e0 (which approved the seventeen units then listed): `Store.SetBillingPlan` is gone and `Store.PutBillingState` no longer reads itself; `setBillingPlanTx`, `putBillingState`, `type sqlExecer`, `Store.DiscoverableBillingAccounts` and `Store.SaveBillingSync` are new; `Store.SetBillingCustomer` and `Store.migrateBillingAccounts` gained the `bound_at` column. Two of main's plans-4d units changed body only (`Store.MarkLapse`, `Store.DeleteCapState`: their statements moved into constants shared with `SaveBillingSync`), approved above through census-propose. None of them runs as root or reads a path a tenant, an app or a box agent can name. All are dormant unless `CARLOS_BILLING` is set. Reviewer: Astra (cross-model); decisions go to Paul on #280.
+
+Since Astra's round 2 at 05b28473 (which approved the twenty then listed): `Store.DiscoverableBillingAccounts` and `Store.migrateBillingAccounts` changed (the `discover_retry` column and its use), and `Store.SetBillingDiscoveryRetry` and `Store.ResolveBillingProblem` are new. All four are parameterized console SQL on the console's own billing tables.
diff --git a/docs/superpowers/notes/plans-6a-ledger.md b/docs/superpowers/notes/plans-6a-ledger.md
index 2c11e2c15..d124f1d36 100644
--- a/docs/superpowers/notes/plans-6a-ledger.md
+++ b/docs/superpowers/notes/plans-6a-ledger.md
@@ -53,3 +53,8 @@ Final: fixed Astra finding 5 (billing bypassed Plan 4d's lapse lifecycle), after
Final: Ruling: a deleted account in SaveBillingSync is (false, false, nil), not ErrAccountGone, so a sync for it finishes rather than retrying; TestSetBillingPlanRefusesADeletedAccount now asserts that and no row — cost if wrong: none.
Final: merged origin/main 9b81d97b (f713e241); census: 20 hand units seal 544fad24, census-propose seal a6fe3a52, record-write layer on plans4d; census tests ok; full go test ./internal/console/ -run Claim -timeout 40m → ok (478 s); darwin and windows builds ok.
Final: merged origin/main d34c0a72 (rootfs apps plan 2); hand overlay unchanged, re-sealed d206d109 after main's lines; census-propose re-run; census tests ok; targeted console tests, darwin and windows builds ok.
+Round 2: fixed finding 1 (discovery dropped a failed candidate) — billing_accounts.discover_retry, set when any candidate's sync fails and cleared only when all succeed; DiscoverableBillingAccounts includes retrying accounts regardless of subscription or window — TestDiscoveryKeepsAFailedCandidate RED→GREEN.
+Round 2: fixed finding 2 (pending replacement kept the old paid limits) — decideBilling applies the ended old subscription's default plan when the adopted replacement is pending or unrecognised, committed with the adoption (lapse via applyBillingPlan) — TestPendingReplacementAppliesTheOldEnd RED→GREEN.
+Round 2: fixed finding 3 (close raced a sync) — closeBillingProblemLocked re-reads the problem and makes the deciding provider read under the account's billing lock; a sync that reads the subscription resolves its open subscription_missing problem (Store.ResolveBillingProblem) — TestCloseMissingRacingASyncKeepsTheSync RED→GREEN.
+Round 2: TestBillingSyncGracePassAndOperatorDoNotDeadlock now drives applyAccountPlan too. Example catalog Free awake_hours_month 100→90 (Paul), golden regenerated; no test asserted the catalog's 100.
+Round 2: census: plans-6a-units now 22 units (DiscoverableBillingAccounts, migrateBillingAccounts changed; ResolveBillingProblem, SetBillingDiscoveryRetry new), seal ff9bed97; census-propose seal d15a9e83; record-write digests unchanged; census tests ok.
diff --git a/internal/provision/testdata/plan14-root-reads-chain.tsv b/internal/provision/testdata/plan14-root-reads-chain.tsv
index c3ab2948d..6e13002a1 100644
--- a/internal/provision/testdata/plan14-root-reads-chain.tsv
+++ b/internal/provision/testdata/plan14-root-reads-chain.tsv
@@ -40,5 +40,5 @@ plan14-root-reads-plans-4d-units.tsv d8040ae2e40478dd1d5d8eac4010f3382cf22b4766e
plan14-root-reads-plans-4d-lapse.tsv e44eb0934bbb3c22b2b40d0d923cb33b1d092a8437e694bf733e685fb224ece2
plan14-root-reads-rootfs-apps-2-new.tsv b9e0e5339dee58e5851774f049ae6096f5b7617de917efcc2b4bec7b3f71b495
plan14-root-reads-rootfs-apps-2.tsv b1b17467ff148c3a0b1dd3312b7a80498db11cc4b455e2331c6b0da2e369e2ee
-plan14-root-reads-plans-6a-units.tsv d206d109846b6656385256cc44a75a9a866d8b5d0b4cad742140107880a54d38
-plan14-root-reads-plans-6-checkout.tsv a7d4bb220e3274151c522bd913eacadc6da1645f35b42b6d33116d050609c0ff
+plan14-root-reads-plans-6a-units.tsv ff9bed97d0d1a1bdafba39ff84eb0180c24288c6069222e00bad80d14f8245fc
+plan14-root-reads-plans-6-checkout.tsv d15a9e830b9165c0b246160c33962fa86fdb85a8ba1ac1be94363048f312bf41
diff --git a/internal/provision/testdata/plan14-root-reads-plans-6-checkout.tsv b/internal/provision/testdata/plan14-root-reads-plans-6-checkout.tsv
index ec2e8972e..bd5f14a3d 100644
--- a/internal/provision/testdata/plan14-root-reads-plans-6-checkout.tsv
+++ b/internal/provision/testdata/plan14-root-reads-plans-6-checkout.tsv
@@ -16,7 +16,7 @@ internal/console/store.go Store.migrate legacy accepted-legacy accepted-legacy;r
@coverage cmd/console 7f76470f2e1dc2b3b25bfe39b8a3f66360fb4a6629e44336657d8a814d2a845b
@coverage cmd/pricebook-export 624784dc3f674ce3a5b2a030a1450c858b32db5278a3358dd900c6d684aadcc5
@coverage internal/billing 6f70b1b5235eeff6a4f6e6debf29128379946b810c03996a75a2779a4f036bbd
-@coverage internal/billing/billingtest 8e273dfa46bdfe7326e2377f42c7a51e87a069da57b0e9f7c2730ddea626f37e
+@coverage internal/billing/billingtest d2b79226ca223d73c35e4e58b0da1ec50a2765e1358a019319e79c3220a8274b
@coverage internal/billingstripe ea8f4e2a16003884007bc9579ccc3f5633180af974236f6dc5119c42b2e4d1e3
-@coverage internal/console 9584db9f0447b8685b391ef5ea4d0d62bf95679c489814283485666c39755f8a
+@coverage internal/console d07c22133c0e9cdaf6c1303def5097f2d9e169caf7aaa7f088ae5deef1632347
@coverage internal/plans 74d41bf58428aa03367a66ea3e4e9f190285ffb4a563f8791b71ad011a57f7ea
diff --git a/internal/provision/testdata/plan14-root-reads-plans-6a-units.tsv b/internal/provision/testdata/plan14-root-reads-plans-6a-units.tsv
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