carlos / platform Public

Clone
git clone https://amadan.net/carlos/platform

Plain git — no account needed to clone.

Download

Download this file

1# Whole-branch code review brief: Plans 1 (catalog and account limits)
2
3You are a senior Go reviewer on the carlos platform. Review the
4implementation of Plan 1 on branch `design-plans-and-caps`, range
5`3d444a1b..HEAD` (`git diff 3d444a1b..HEAD`; ignore the docs under
6docs/superpowers/ except as requirements). The review is read-only: do not
7modify the working tree, index, HEAD or branches, and do not build into the
8repo. You may run `go test` for packages you want to probe.
9
10Requirements, in order of authority:
111. Spec: docs/superpowers/specs/2026-10-20-plans-caps-packs-design.md
12 (sections 4, 7, 8.7, 9.4, 10 are what Plan 1 implements; section 3
13 lists product decisions that are not to be argued with).
142. Plan: docs/superpowers/plans/2026-10-20-plans-1-catalog-and-limits.md.
153. The executor's rulings (deviations from the plan, each with its cost):
16 `.superpowers/sdd/2026-10-20-plans-1-catalog-and-limits/progress.md`,
17 lines containing `Ruling:`. Weigh each; say if any is wrong.
18
19The spec is a vision document. For behaviour it is silent on, judge by what
20a reasonable operator or customer would expect, and grade by effect.
21
22Check these deliberately (the plan's Review Focus, inputs its tests may not
23exercise):
241. A catalog edited without a version bump: the console must refuse to
25 start or treat it as new, never publish records whose catalog_id lies.
262. A catalog change that orphans an assignment (plan or pack removed): skip
27 that account, keep its last record, keep publishing everyone else.
283. A deleted (tombstoned) account: no row ensured, no record written.
294. An operator change racing the publish pass: the newer revision wins in
30 the bucket and in published_revision; a stale publish never marks a
31 newer revision published.
325. Partial sponsored limits: unset fields leave the plan's value;
33 min_schedule_seconds 0 must not mean "no minimum".
34
35Also look hard at: the host-claim boundary (hostops classifier entry for
36accounts/<sqid>/limits.json, claim fixtures and probes), behaviour with
37CARLOS_PLAN_CATALOG unset (must be exactly today's behaviour), the operator
38door's authorization (fleet operators only; everyone else gets the stdlib
39404), CAS and retry correctness in publishAccountLimits, SQL in
40accountplans.go, and cross-compilation (darwin/windows).
41
42Do not review the wording of human-facing strings: they passed Paul's copy
43review and are applied verbatim (accounts_plan_copy.go,
44internal/console/apiaccountplan_copy.go, docs/site/plans.md, the cli.md
45entry, nav.json, the accounts usage block).
46
47Output format:
48- Findings, most severe first, each labelled Critical / Important / Minor,
49 with file:line, the concrete failure scenario, and the fix you suggest.
50- "Declined to judge": every behaviour you considered and set aside as
51 outside the plan or spec, one line each with the reason.
52- A verdict: ready to merge, ready with fixes, or not ready.
53