# Census overlay design-plans-and-caps (plans 1: the plan catalog, account_plans table, limits record publisher and operator door), loaded LAST, after run-lifecycle-logs-325. PROPOSED-design-plans-and-caps, asked of the census owner on #280. # Every unit is console or CLI code that makes no root decision. New units: the account_plans store methods (console SQL on its own table, J4 root-input like their store siblings), LoadCatalog (reads the operator's CARLOS_PLAN_CATALOG once at start) and the CLI's --sponsored file read (runs as the invoking user). Changed legacy units serve (starts the plan limits worker, loads the catalog) and Store.migrate (adds the account_plans table) are re-frozen at their main disposition. Frozen declarations are added, so the seal moves. @legacy 1b9b193a3f55138826e8a065961f0980f18388627ebe489becdbf5ffac494ac4 internal/console/accountplans.go Store.SetAccountPlan legacy accepted-legacy accepted-legacy;rev3=PROPOSED-design-plans-and-caps;basis=root-input; console SQL on its own account_plans table, as its store siblings (J4). file:QueryRow@442 7eb5c9bbffd4d730b95505d852a5a75fd7f07753ecf2d66d3b68407cbe76f69c @legacy 488e0480e559bc7f74cdc7eb6a093b306f5eafde135d5c7b9dc5ab0b9515daea internal/console/accountplans.go Store.EnsureDefaultPlans legacy accepted-legacy accepted-legacy;rev3=PROPOSED-design-plans-and-caps;basis=root-input; console SQL on its own account_plans table, as its store siblings (J4). file:Exec@98 c9e38a24f10b5506742cf8fb34f6fb10a0bd0f629f4803cbfdcc2d6694ab6a3d @legacy 514a165480c078a30e26cdbf8081220b81db5c0633316d1a46271f6bc072012c accounts_plan.go runAccountsPlanWithSession legacy accepted-legacy accepted-legacy;rev3=PROPOSED-design-plans-and-caps;basis=CLI reads the operator's own --sponsored limits file and sends it to the console; runs as the invoking user, no root decision. file:ReadFile@1162 c8db16e139cc1a02d451335a28402c567c3908f384c14dea16e15e6026a44814 @legacy 5570650aa632c6a07aa544b20a6f4c01f31a5360444451d1916ef37d441ce7e5 internal/console/accountplans.go Store.MarkPlanPublished legacy accepted-legacy accepted-legacy;rev3=PROPOSED-design-plans-and-caps;basis=root-input; console SQL on its own account_plans table, as its store siblings (J4). file:Exec@98 43aa704ded511651c2948f44d6d0c804f3ff8e9d36499e9de657c99a283df927 @legacy 58d3755c518d7bf88610e288b493599964bb3afd703fa62bb7452b6332d13b8d internal/console/accountplans.go Store.AccountPlan legacy accepted-legacy accepted-legacy;rev3=PROPOSED-design-plans-and-caps;basis=root-input; console SQL on its own account_plans table, as its store siblings (J4). file:QueryRow@99 0c9fdbcd19e89a561c8dbc52e6a973eb1a35d8b146ce83687e85ff5184eea2af @legacy 61e20dfe844371a097829fb3f865859c6e71da4fdbef53f442c58e1e2e87786b internal/console/store.go Store.migrate legacy accepted-legacy accepted-legacy;rev3=J4;basis=root-input file:Exec@12017,file:Exec@17861 8007284feae307e4044f00985c762facbc04353c1c2ddc67875e4287f4837e45 @legacy 87a3e64380f0da91d8a7eb317008c513fbe31db96a227910603373c478e4b981 internal/console/accountplans.go Store.PlansToPublish legacy accepted-legacy accepted-legacy;rev3=PROPOSED-design-plans-and-caps;basis=root-input; console SQL on its own account_plans table, as its store siblings (J4). file:Query@124 51dd2e6ad481a44508e1263f1378b86f7967fa35f22b1fee81d8aeab99dd0134 @legacy 8b0591778ec6d0f70d57059e12892322e2f01e8d445494a3648e71653f3fbd11 cmd/console/main.go serve legacy accepted-legacy accepted-legacy;rev3=PROPOSED-scan-demand-revival;basis=Console service wires the optional callback signer and starts the claim-guarded queue worker. The same three data path literals move; it does not add a privileged reader. data-literal@4077,data-literal@5178,data-literal@5415 0ce0d9a987a1f90cebbee79dea2f0fc4d72a81bf12dc8f79a0db75125f8c1974 @legacy d8e10348b4d71b79ee5213dd91db825fd2b31b939ac344dd2a8c0e66aff139e4 internal/plans/catalog.go LoadCatalog legacy accepted-legacy accepted-legacy;rev3=PROPOSED-design-plans-and-caps;basis=console reads the operator-configured CARLOS_PLAN_CATALOG file once at start; a bad file stops the console. file:ReadFile@61 d0b604d9cf163e4c63b96eb3f0460380840b37be30c6e208f5243152977a5361 accounts_plan.go runAccountsPlanWithSession legacy accepted-legacy accepted-legacy;rev3=PROPOSED-design-plans-and-caps;basis=CLI reads the operator's own --sponsored limits file and sends it to the console; runs as the invoking user, no root decision. file:ReadFile@1162 c8db16e139cc1a02d451335a28402c567c3908f384c14dea16e15e6026a44814 cmd/console/main.go serve legacy accepted-legacy accepted-legacy;rev3=PROPOSED-scan-demand-revival;basis=Console service wires the optional callback signer and starts the claim-guarded queue worker. The same three data path literals move; it does not add a privileged reader. data-literal@4077,data-literal@5178,data-literal@5415 0ce0d9a987a1f90cebbee79dea2f0fc4d72a81bf12dc8f79a0db75125f8c1974 internal/console/accountplans.go Store.AccountPlan legacy accepted-legacy accepted-legacy;rev3=PROPOSED-design-plans-and-caps;basis=root-input; console SQL on its own account_plans table, as its store siblings (J4). file:QueryRow@99 0c9fdbcd19e89a561c8dbc52e6a973eb1a35d8b146ce83687e85ff5184eea2af internal/console/accountplans.go Store.EnsureDefaultPlans legacy accepted-legacy accepted-legacy;rev3=PROPOSED-design-plans-and-caps;basis=root-input; console SQL on its own account_plans table, as its store siblings (J4). file:Exec@98 c9e38a24f10b5506742cf8fb34f6fb10a0bd0f629f4803cbfdcc2d6694ab6a3d internal/console/accountplans.go Store.MarkPlanPublished legacy accepted-legacy accepted-legacy;rev3=PROPOSED-design-plans-and-caps;basis=root-input; console SQL on its own account_plans table, as its store siblings (J4). file:Exec@98 43aa704ded511651c2948f44d6d0c804f3ff8e9d36499e9de657c99a283df927 internal/console/accountplans.go Store.PlansToPublish legacy accepted-legacy accepted-legacy;rev3=PROPOSED-design-plans-and-caps;basis=root-input; console SQL on its own account_plans table, as its store siblings (J4). file:Query@124 51dd2e6ad481a44508e1263f1378b86f7967fa35f22b1fee81d8aeab99dd0134 internal/console/accountplans.go Store.SetAccountPlan legacy accepted-legacy accepted-legacy;rev3=PROPOSED-design-plans-and-caps;basis=root-input; console SQL on its own account_plans table, as its store siblings (J4). file:QueryRow@442 7eb5c9bbffd4d730b95505d852a5a75fd7f07753ecf2d66d3b68407cbe76f69c internal/console/store.go Store.migrate legacy accepted-legacy accepted-legacy;rev3=J4;basis=root-input file:Exec@12017,file:Exec@17861 8007284feae307e4044f00985c762facbc04353c1c2ddc67875e4287f4837e45 internal/plans/catalog.go LoadCatalog legacy accepted-legacy accepted-legacy;rev3=PROPOSED-design-plans-and-caps;basis=console reads the operator-configured CARLOS_PLAN_CATALOG file once at start; a bad file stops the console. file:ReadFile@61 d0b604d9cf163e4c63b96eb3f0460380840b37be30c6e208f5243152977a5361 @coverage . 52c26e70c516dfc51c5eb22345764aac73a2648cb9401c1818a6291a76f04194 @coverage cmd/console 8e2b043dbb63154301a630b811eaf2c7fdf8ee43c4f2253f15a385ca5767c8ba @coverage internal/console e3d03d70aaab18ef02efc0eba542420c8052ad6dd99a7b1d5a1a053c5d7a69da @coverage internal/hostops 35d6280ea8252739aeb855cc107ad930af6513aaae73b24dbb3eacbbd52e9ec7 @coverage internal/plans b89e57501bba666ab00807986ccd921d419475db1cfe0b106241543496e7f6ee