refactor(pwa): paid auto-rotation runs on @profullstack/key-rotation (#273)
Some checks are pending
CI / build (push) Waiting to run
Deploy to dev2 / deploy (push) Waiting to run
test / test (push) Waiting to run

The checkout, webhook settle, return check and expiry/renewal sweep from #272
move into the new @profullstack/key-rotation package (0.1.0) so other fleet
apps can sell the same add-on. lib/auto-rotation.mjs keeps its exports and
binds the package to credshare_teams, owners/admins, the audit log and the
app.logicsrc.com CoinPay business. No schema or behaviour change.

Co-authored-by: Anthony Ettinger <anthony@profullstack.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
sh1pt-actions-fleet[bot] 2026-10-29 05:33:56 +00:00 • committed by GitHub
parent 0cfb94e56c
commit e60d31a1b4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 62 additions and 152 deletions

View file

@ -147,6 +147,12 @@ the switch off, so due keys wait for approval again. A team switched on by hand
(`rotation_auto_approve = 1` with `rotation_auto_paid_until` NULL) never
expires. State: `GET /api/credshare/teams/:slug/rotation/auto`.
The billing logic (checkout, webhook settle, return check, sweep) is the
[`@profullstack/key-rotation`](https://github.com/profullstack/key-rotation)
package; `apps/pwa/src/lib/auto-rotation.mjs` only binds it to `credshare_teams`,
the audit log and this app's CoinPay business, so other fleet apps can sell the
same add-on.
```sh
logicsrc teams rotate-keys profullstack --queue-due
logicsrc teams rotation-approve profullstack <run-id>