chore(work): finish 04-core-consent-implementation
This commit is contained in:
@@ -3,7 +3,7 @@ id: 04-core-consent-implementation
|
||||
epic: dsr-consent-and-cookie-banner
|
||||
title: core-consent implementation — Payload impl, DI binders, migration helpers, tRPC router
|
||||
type: technical-story
|
||||
status: in-progress
|
||||
status: done
|
||||
feature: core-consent
|
||||
depends-on: [03-core-consent-foundation]
|
||||
blocks:
|
||||
@@ -13,7 +13,7 @@ blocks:
|
||||
10-auth-signup-migration,
|
||||
]
|
||||
created: 2026-05-19T12:00:00Z
|
||||
updated: 2026-05-19T13:01:40.900Z
|
||||
updated: 2026-05-19T13:27:09.005Z
|
||||
---
|
||||
|
||||
## Goal
|
||||
@@ -54,4 +54,4 @@ Story 03 established the type surface and structural enforcement. This story del
|
||||
|
||||
- [x] Add `PayloadConsent` Payload-backed implementation in `core-consent/` reading/writing `users.consentState` and emitting `CONSENT_GRANT`/`CONSENT_WITHDRAW` audit entries via injected `core-audit` + `RecordingConsent` test double in `packages/core-testing/` + DI binders `core-consent/di/bind-production.ts` and `core-consent/di/bind-dev-seed.ts`; contract tests covering grant/withdraw/isGranted round-trip, audit entry shape, and `getCategories`; all gates pass.
|
||||
- [x] Add `extractAnonymousConsent(cookieHeader: string)` + `migrateAnonymousConsent({ userId, cookieState, bannerVersion, policyVersion })` helpers in `core-consent/` with tests covering the happy path (cookie present → calls `IConsent.grant` with `method: "signup-migration"`) and the absent-cookie no-op; all gates pass.
|
||||
- [ ] Add protocol-agnostic handlers in `core-consent/handlers/` + `consentRouter` tRPC router in `core-consent/consent.router.ts` exporting `grant`, `withdraw`, `isGranted`, `getCategories` procedures with auth checks; integration tests asserting response shapes and auth error passthrough; all gates pass.
|
||||
- [x] Add protocol-agnostic handlers in `core-consent/handlers/` + `consentRouter` tRPC router in `core-consent/consent.router.ts` exporting `grant`, `withdraw`, `isGranted`, `getCategories` procedures with auth checks; integration tests asserting response shapes and auth error passthrough; all gates pass.
|
||||
|
||||
@@ -16,7 +16,7 @@ features:
|
||||
auth,
|
||||
]
|
||||
created: 2026-05-19T12:00:00Z
|
||||
updated: 2026-05-19T11:54:41.015Z
|
||||
updated: 2026-05-19T13:27:09.005Z
|
||||
---
|
||||
|
||||
## Goal
|
||||
@@ -32,7 +32,7 @@ Epic A delivered declarative PII inventory + retention + sub-processors. Epic B
|
||||
- [x] [01 — Subject-linkage types in core-shared](01-subject-linkage-types/_story.md)
|
||||
- [x] [02 — Audit action enum amendment (ADR-018)](02-audit-enum-amendment/_story.md)
|
||||
- [x] [03 — core-consent foundation: types + brand + withConsent + conformance + ESLint rule](03-core-consent-foundation/_story.md)
|
||||
- [ ] [04 — core-consent implementation: Payload impl + DI + migration helpers + tRPC router](04-core-consent-implementation/_story.md)
|
||||
- [x] [04 — core-consent implementation: Payload impl + DI + migration helpers + tRPC router](04-core-consent-implementation/_story.md)
|
||||
- [ ] [05 — core-consent React subpath: ConsentProvider + useConsent()](05-core-consent-react/_story.md)
|
||||
- [ ] [06 — core-dsr: scaffold + interfaces + Payload impls + handlers + dsrRouter](06-core-dsr/_story.md)
|
||||
- [ ] [07 — core-api router composition: dsrRouter + consentRouter into appRouter](07-core-api-router-composition/_story.md)
|
||||
|
||||
Reference in New Issue
Block a user