carlos / platform Public

Platform accounts slice 1: follow-ups after merge Issue open

Follow-ups from the slice 1 build (merged as 3f3ef7b). None blocks a first grant on dev; items marked BEFORE PRODUCTION should land before a platform runs on flagship.

  • BEFORE PRODUCTION: a held pending customer-create promise makes every platform request rescan the bucket and log (apiplatformcustomers.go gate); add a per-mint backoff.
  • BEFORE PRODUCTION: expired app-bound per-customer Deploy credentials are never swept by PurgeCLIAuth (excluded so the claim gate cannot abort the sweep); they are inert but accumulate until app purge. Sweep them under a permit, or exclude only when the gate is armed.
  • Tell Tito: customer creation uses the service create budget (100/day per platform credential, 10/day per person).
  • Analytics is switched on for a new id before an ErrPlatformRefTaken refusal (new-id case only).
  • Non-claim create path has no incarnation re-check between manifest read and record write (pre-existing, all callers).
  • Claim-console 202 (pending create) is treated as a refusal by the platform-host CLI path (claim consoles only).
  • carlos platform credentials mint --ttl rounds fractional seconds up (59.5s passes the 1-minute floor).
  • approvedplatformaccountscopytest checks literal presence per file, not id-to-text binding.
  • Smaller test polish: RenameAccountManifest CAS-retry witness; claim-purge kind witness; move subtest destination leftover; platformCustomerPrincipal positional params -> struct.

Slice 2 hand-offs (in the plan's hand-off note): customer delete (one exclusion shared with app create, lifecycle -> account -> billing), claim links (take the lifecycle lock), leave/release, customer account page replacing billing controls (Buy buttons still show, refused), claimed owner's banner already does not start the grace clock.

The two BEFORE PRODUCTION items are fixed on main as 40d86b4: held pending creates back off for 5 minutes (no per-request scan or log line; pruning re-reads under the lifecycle lock), and expired app-bound per-customer credentials are swept when the claim gate is not armed (on gate-armed consoles app purge still removes them). The rest of this list stays open.

Slice 1 dev witness PASSED on dev v0.40.3 (2026-11-20 ~09:35Z, plan Task 16), CLI built at f30e69a5, all platform steps with service tokens only (empty HOME, no person login):

  • Operator grant: carlos accounts platform --account baf --grant --max-customers 3 --plans free --default-plan free on a fresh witness account pa-witness (baf). Platform credential cms minted with services create --role platform.
  • With the platform token: platform customers create shop (bag, ref w1) and bakery (bah, ref w2); a repeat create with ref w1 answered "shop (bag) already exists for reference w1"; list shows 2 of 3.
  • Per-customer credentials minted for bag and bah (publish, 1 h). carlos deploy --kind static with each: live https://site.bag.dev.oncarlos.com and https://site.bah.dev.oncarlos.com, each serving its own page.
  • Isolation: T1 on bah/site and T2 on bag/site channels = 404 (own = 200); T1 shipping into bah refused ("not found"), bah's page unchanged.
  • Revoke: --revoke reported 4 credentials stopped; platform token and both customer tokens = 401 at the platform and app doors; both sites still serve.

Leftovers on dev: accounts baf (revoked platform), bag and bah (linked, unclaimed) with app site. Customer delete arrives in slice 2, so they stay as the witness record.