From c346f85bc8af20797ec03d23550d797c977c112e Mon Sep 17 00:00:00 2001 From: Danijel Martinek Date: Tue, 19 May 2026 14:53:51 +0200 Subject: [PATCH] chore(work): tick task in 04-core-consent-implementation --- docs/work/_system/_state.json | 6 +++--- .../04-core-consent-implementation/_story.md | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/work/_system/_state.json b/docs/work/_system/_state.json index 1e2f1e7..6b53866 100644 --- a/docs/work/_system/_state.json +++ b/docs/work/_system/_state.json @@ -1,5 +1,5 @@ { - "updated_at": "2026-05-19T11:54:41.194Z", + "updated_at": "2026-05-19T12:53:53.314Z", "epics": { "binder-wrap-helper": { "status": "done", @@ -274,10 +274,10 @@ ] }, "04-core-consent-implementation": { - "status": "todo", + "status": "in-progress", "title": "core-consent implementation — Payload impl, DI binders, migration helpers, tRPC router", "ac_total": 3, - "ac_completed": 0, + "ac_completed": 1, "depends_on": [ "03-core-consent-foundation" ], diff --git a/docs/work/epics/dsr-consent-and-cookie-banner/04-core-consent-implementation/_story.md b/docs/work/epics/dsr-consent-and-cookie-banner/04-core-consent-implementation/_story.md index 1a80146..ec6b847 100644 --- a/docs/work/epics/dsr-consent-and-cookie-banner/04-core-consent-implementation/_story.md +++ b/docs/work/epics/dsr-consent-and-cookie-banner/04-core-consent-implementation/_story.md @@ -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: todo +status: in-progress 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-19T09:55:07.020Z +updated: 2026-05-19T12:53:53.146Z --- ## Goal @@ -52,6 +52,6 @@ Story 03 established the type surface and structural enforcement. This story del ## Tasks -- [ ] 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 `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. - [ ] 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.