Skip to content

feat(rotation): buy automatic rotation, $29 per team per 30 days (CoinPay) - #272

Merged
sh1pt-actions-fleet[bot] merged 1 commit into
masterfrom
feat/auto-rotation-billing
Oct 29, 2026
Merged

sh1pt-actions-fleet[bot] merged 1 commit into
masterfrom
feat/auto-rotation-billing

Conversation

@sh1pt-actions-fleet

Copy link
Copy Markdown
Contributor

Anthony 2026-10-29: automatic rotation is a paid add-on at $29/month.

  • Buy: "Turn on automatic rotation, $29 / 30 days" on /teams/:slug/rotation (owner/admin), or POST /api/credshare/teams/:slug/rotation/auto/checkout for CLI/MCP. CoinPay hosted checkout, crypto or PayPal, one-off.
  • Settle: POST /api/coinpay/webhook (signature over raw body) plus the page's return check, idempotent on the checkout session (rotation_payments). Paying again adds 30 days to the current end.
  • Expire: hourly sweep in the app emails owners/admins a renewal link 3 days before, then turns the switch off. Hand-flipped teams (rotation_auto_paid_until NULL) never expire.
  • Due runs now use the effective state, so a lapsed-but-not-yet-swept team still waits for approval.
  • CSP form-action allows https://coinpayportal.com (the 303 to checkout).
  • CoinPay business "app.logicsrc.com" onboarded, keys in vault profullstack/app-logicsrc-com--prod.

Tests: PWA 115/115 on SQLite; auto-rotation + rotation suites also green on Postgres 16.

🤖 Generated with Claude Code

…nPay)

- Rotation page button + POST /api/credshare/teams/:slug/rotation/auto/checkout
  open a CoinPay hosted checkout (owner/admin only).
- POST /api/coinpay/webhook and the page's return check settle once per checkout
  session (rotation_payments); paying again extends from the current end.
- Hourly sweep: renewal email 3 days before, switch off when the days run out.
  A team switched on by hand (paid_until NULL) never expires.
- Migration 012 (both dialects), CSP form-action allows coinpayportal.com.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​profullstack/​coinpay-onboard@​0.3.17610010093100

View full report

@github-actions

Copy link
Copy Markdown

ThreatCrush Security Scan

67 finding(s)

HIGH/CRITICAL: 6 | MEDIUM: 29 | LOW: 32

Severity Rule Location
HIGH secret-private-key apps/pwa/src/routes/keyring.mjs:32
HIGH secret-private-key packages/cli/src/keyring.ts:83
HIGH secret-private-key packages/logicsrc-mcp/src/keyring.ts:20
HIGH secret-private-key plugins/credential-sharing/src/providers/ssh.ts:129
HIGH js-host-header-trust apps/commandboard-web/server.js:27
HIGH js-ssrf-outbound-request apps/pwa/public/sw.js:45
MEDIUM js-unescaped-html-sink apps/commandboard-web/src/main.ts:19
MEDIUM sh-remote-script-execution apps/logicsrc-web/public/install.sh:71
MEDIUM js-unescaped-html-sink apps/logicsrc-web/src/app/[[...slug]]/page.tsx:59
MEDIUM js-unescaped-html-sink apps/logicsrc-web/src/app/layout.tsx:80
MEDIUM js-unescaped-html-sink apps/logicsrc-web/src/app/pricing/page.tsx:42
MEDIUM js-unescaped-html-sink apps/logicsrc-web/src/components/breadcrumbs.tsx:43
MEDIUM js-unescaped-html-sink apps/logicsrc-web/src/components/pit-footer.tsx:16
MEDIUM js-unescaped-html-sink apps/logicsrc-web/src/components/site-shell.tsx:36
MEDIUM js-unescaped-html-sink apps/pwa/public/keyring.js:51
MEDIUM sql-template-interpolation apps/pwa/src/routes/rotation.mjs:79
MEDIUM redos-nested-quantifier packages/cli/src/rotation-catalog.ts:253
MEDIUM redos-nested-quantifier packages/cli/src/rotation-catalog.ts:297
MEDIUM redos-nested-quantifier packages/cli/src/rotation-catalog.ts:299
MEDIUM redos-nested-quantifier packages/cli/src/rotation-catalog.ts:303
MEDIUM redos-nested-quantifier packages/cli/src/rotation-catalog.ts:307
MEDIUM redos-nested-quantifier packages/cli/src/rotation-catalog.ts:326
MEDIUM redos-nested-quantifier packages/cli/src/rotation-catalog.ts:327
MEDIUM redos-nested-quantifier packages/cli/src/rotation-catalog.ts:329
MEDIUM redos-nested-quantifier packages/cli/src/rotation-catalog.ts:330
MEDIUM redos-nested-quantifier packages/cli/src/rotation-catalog.ts:331
MEDIUM redos-nested-quantifier packages/cli/src/rotation-catalog.ts:334
MEDIUM redos-nested-quantifier packages/cli/src/rotation-catalog.ts:395
MEDIUM redos-nested-quantifier packages/cli/src/rotation-catalog.ts:402
MEDIUM redos-nested-quantifier packages/cli/src/rotation-catalog.ts:408
MEDIUM redos-nested-quantifier packages/opencontext/src/ids.ts:10
MEDIUM redos-nested-quantifier packages/opencontext/src/ids.ts:11
MEDIUM js-timing-unsafe-mac-compare packages/opencontext/src/validate.ts:208
MEDIUM redos-nested-quantifier packages/openerrand/src/browser.ts:34
MEDIUM redos-nested-quantifier packages/openontology/src/ids.ts:20
LOW secret-generic-credential apps/pwa/test/appbar.test.mjs:10
LOW secret-private-key apps/pwa/test/keyring.test.mjs:137
LOW secret-generic-credential apps/pwa/test/signup-profile.test.mjs:61
LOW secret-generic-credential apps/pwa/test/signup-profile.test.mjs:72
LOW secret-openai-key packages/cli/src/desktop-flow.test.ts:315
LOW secret-generic-api-key packages/cli/src/desktop-flow.test.ts:315
LOW secret-private-key packages/cli/src/keyring.test.ts:86
LOW secret-private-key packages/cli/src/keyring.test.ts:88
LOW secret-private-key packages/cli/src/rotate-flow.test.ts:125
LOW secret-generic-api-key packages/cli/src/rotate-flow.test.ts:177
LOW secret-generic-credential packages/cli/src/rotate-flow.test.ts:184
LOW secret-generic-api-key packages/cli/src/rotate-flow.test.ts:198
LOW secret-generic-credential packages/cli/src/rotate-flow.test.ts:204
LOW secret-generic-credential packages/cli/src/rotators.test.ts:52
LOW secret-generic-credential packages/cli/src/rotators.test.ts:75

…and 17 more. Full results in the Security tab.

Snippets are redacted; ThreatCrush never prints matched credential material.

@sh1pt-actions-fleet
sh1pt-actions-fleet Bot merged commit 0cfb94e into master Oct 29, 2026
6 checks passed
sh1pt-actions-fleet Bot added a commit that referenced this pull request Oct 29, 2026
…273)

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant