[Agent] Issue #329: stale issue 280 9h without a customer cr #333

Closed
pook wants to merge 41 commits from agent-task/329 into main
Owner

Closes #329

Changes

feat: issue #329 stale-issue-280-9h-without-a-customer-cr (agent task agent-ta)

Acceptance Criteria

Stale issue #280 (9h). Without a customer creation helper, Stripe checkout sessions can't be linked to user records — billing breaks at the most fundamental level.

Create src/billing/stripeCustomer.ts:

  • Export createStripeCustomer(email: string, userId: string): Promise<string> that calls stripe.customers.create() with email and metadata { userId }
  • Export getCustomerByUserId(userId: string): Promise<Stripe.Customer | null> that queries by metadata
  • Add Prisma customers table if not exists with columns: id, stripeCustomerId, email, userId, createdAt
  • Unit tests with mocked Stripe SDK verifying create call parameters and metadata attachment

Acceptance: npx jest tests/unit/stripeCustomer.test.ts passes with mocked Stripe calls. TypeScript compiles clean.


Generated by CEO Planner (priority: 3)

Tokens: 25 in / 6135 out

Closes #329 ## Changes feat: issue #329 stale-issue-280-9h-without-a-customer-cr (agent task agent-ta) ## Acceptance Criteria Stale issue #280 (9h). Without a customer creation helper, Stripe checkout sessions can't be linked to user records — billing breaks at the most fundamental level. Create `src/billing/stripeCustomer.ts`: - Export `createStripeCustomer(email: string, userId: string): Promise<string>` that calls `stripe.customers.create()` with email and metadata `{ userId }` - Export `getCustomerByUserId(userId: string): Promise<Stripe.Customer | null>` that queries by metadata - Add Prisma `customers` table if not exists with columns: id, stripeCustomerId, email, userId, createdAt - Unit tests with mocked Stripe SDK verifying create call parameters and metadata attachment Acceptance: `npx jest tests/unit/stripeCustomer.test.ts` passes with mocked Stripe calls. TypeScript compiles clean. --- *Generated by CEO Planner (priority: 3)* Tokens: 25 in / 6135 out
feat: issue #329 stale-issue-280-9h-without-a-customer-cr (agent task agent-ta)
Some checks failed
CI Quality Gate / Lint / Typecheck / Test / Build (pull_request) Has been cancelled
1d68d71bfc
Author
Owner

Closed 2026-04-10 during pipeline triage.

Merge conflicts with current main were blocking the CEO agent's backlog view. Reopen / resubmit against current main if the work is still relevant — CEO now injects open issues/PRs into its prompt and avoids duplicating.

Closed 2026-04-10 during pipeline triage. Merge conflicts with current main were blocking the CEO agent's backlog view. Reopen / resubmit against current main if the work is still relevant — CEO now injects open issues/PRs into its prompt and avoids duplicating.
pook closed this pull request 2026-04-10 15:05:59 -04:00
Some checks failed
CI Quality Gate / Lint / Typecheck / Test / Build (pull_request) Has been cancelled

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
pook/compliancebot!333
No description provided.