Initial Commit
This commit is contained in:
@@ -0,0 +1,94 @@
|
||||
# Tasks: add-payment-provider-stripe
|
||||
|
||||
> Every checkbox reflects work actually done in this change. No
|
||||
> retroactive ticking.
|
||||
|
||||
## 1. Spec authoring
|
||||
|
||||
- [x] 1.1 Read `../suaveplan/enterprise/payment-providers.md` end-to-end
|
||||
- [x] 1.2 Read `openspec/specs/payment-providers/spec.md` (slim-core canonical spec)
|
||||
- [x] 1.3 Read `openspec/AGENTS.md` Sections 13 and 14
|
||||
- [x] 1.4 Draft `proposal.md` from `openspec/templates/proposal.md`
|
||||
- [x] 1.5 Fill in `## Source mapping` — every requirement cites a line
|
||||
range in the upstream source or appears in the "no source line"
|
||||
table with justification
|
||||
- [x] 1.6 Draft `specs/payment-provider-stripe/spec.md` from
|
||||
`openspec/templates/spec-delta.md`
|
||||
- [x] 1.7 Every requirement in the spec delta carries a
|
||||
`**Verified by:**` line naming concrete `it(...)` titles
|
||||
|
||||
## 2. Implementation
|
||||
|
||||
- [x] 2.1 Scaffold `packages/universal/payment-provider-stripe/`
|
||||
(`package.json` at `0.1.0`, `vite.config.ts`, `vitest.config.ts`,
|
||||
`tsconfig.json`, `tsconfig.lib.json`)
|
||||
- [x] 2.2 Implement `src/stripe/stripe.types.ts` — `StripeConfig`,
|
||||
`StripeIntent`, `StripeRefund` wire-format types
|
||||
- [x] 2.3 Implement `src/stripe/stripe.ts` — `StripeProvider` class,
|
||||
every `PaymentProvider` method routed through `httpRequest` with
|
||||
Bearer auth + `Idempotency-Key` forwarding, mappers from Stripe
|
||||
domain to `PaymentIntent` / `Refund`, every error raised through
|
||||
the slim-core `PaymentProviderError`
|
||||
- [x] 2.4 `src/stripe/index.ts` — explicit named barrel
|
||||
- [x] 2.5 `src/index.ts` — package root barrel re-exporting
|
||||
`StripeProvider` + `StripeConfig`
|
||||
- [x] 2.6 `package.json#exports` — root + `./stripe/stripe` subpath
|
||||
|
||||
## 3. Tests
|
||||
|
||||
- [x] 3.1 `src/stripe/stripe.test.ts` — covers every public method,
|
||||
Bearer-auth header presence, `Idempotency-Key` forwarding when
|
||||
caller supplies it AND absence when caller omits, every status /
|
||||
refund-status / refund-reason branch, payment-method absence,
|
||||
`provider: "stripe"` discriminant propagation on raised errors,
|
||||
injected `FetchLike` + caller `signal` forwarding
|
||||
- [x] 3.2 `tests/dep-graph.test.ts` — pins universal-tier purity (no
|
||||
`node:` / `bun:` / `fs` / `path` / `stream` / `net` / `http` /
|
||||
`crypto` imports under `src/`)
|
||||
- [x] 3.3 Every `it(...)` carries `{ timeout: 5000 }`
|
||||
- [x] 3.4 Zero `vi.mock` / `vi.stubGlobal` / `jest.mock` — all tests
|
||||
use real recording `FetchLike` closures
|
||||
|
||||
## 4. Documentation
|
||||
|
||||
- [x] 4.1 `src/stripe/stripe.md` — sibling doc with Purpose,
|
||||
Features, Basic Usage, Advanced Usage, API Reference,
|
||||
Implementation Notes (≥200 words excl. code)
|
||||
- [x] 4.2 `README.md` at package root linking the module doc under
|
||||
`## Modules`
|
||||
- [x] 4.3 Update `CLAUDE.md` package listing under the Network or
|
||||
Foundation section — add `payment-provider-stripe` to the
|
||||
`payment-providers` family description
|
||||
|
||||
## 5. Pre-archive verification (the 5-gate triple)
|
||||
|
||||
- [x] 5.1 `bun run check` — Biome 0/0/0 across the monorepo
|
||||
- [x] 5.2 `bunx turbo lint typecheck test --filter=@suaveplan/payment-provider-stripe` — green
|
||||
- [x] 5.3 `bunx turbo test:coverage --filter=@suaveplan/payment-provider-stripe` — 100/100/100/100
|
||||
- [x] 5.4 `bun scripts/openspec-conformance.ts @suaveplan/payment-provider-stripe` — exit 0 (PASS 0 error, 0 warn, 0 info)
|
||||
- [x] 5.5 `bunx turbo build --filter=@suaveplan/payment-provider-stripe` — green
|
||||
|
||||
## 6. Pre-archive 9-row checklist (AGENTS.md Section 13)
|
||||
|
||||
- [x] 6.1 Generics threaded; literal `name: "stripe"` pinned at the type level
|
||||
- [x] 6.2 Wire-format Stripe responses parsed through typed `StripeIntent` / `StripeRefund` interfaces
|
||||
- [x] 6.3 Every slim-core error code raised by `httpRequest` flows through this provider with `provider: "stripe"` discriminant
|
||||
- [x] 6.4 N/A — no strict-mode toggle on the provider
|
||||
- [x] 6.5 N/A — no OTel instruments in this change
|
||||
- [x] 6.6 N/A — provider holds no in-flight dedup state
|
||||
- [x] 6.7 No retroactive tick
|
||||
- [x] 6.8 No `export *` in any feature barrel — scan returns zero output
|
||||
- [x] 6.9 No direct `vitest` / `bun:test` imports — scan returns zero output
|
||||
|
||||
## 7. Root-doc refresh (§13b)
|
||||
|
||||
- [x] 7.1 `bun scripts/folder-reorg/generate-manifest.ts` — `MANIFEST.md` refreshed (258 packages, 34 plugins; new row for payment-provider-stripe)
|
||||
- [ ] 7.2 `bun scripts/generate-missing.ts` — DEFERRED: pre-existing failure on missing `FOLDERS.yml` (unrelated to this change)
|
||||
- [x] 7.3 Added `@suaveplan/payment-provider-stripe` row to `STATUS.md`
|
||||
- [x] 7.4 Added per-package paragraph to `SUMMARY.md`
|
||||
- [x] 7.5 `bunx markdownlint-cli2 --fix` — exit 0; no findings in touched files
|
||||
|
||||
## 8. Archive
|
||||
|
||||
- [x] 8.1 Fold `specs/payment-provider-stripe/spec.md` into `openspec/specs/payment-provider-stripe/spec.md`
|
||||
- [x] 8.2 Move `openspec/changes/add-payment-provider-stripe/` → `openspec/archive/2026-05-17-add-payment-provider-stripe/`
|
||||
Reference in New Issue
Block a user