From 464df9aa9b8530f89f8c613cb43a74fbfc8bbad0 Mon Sep 17 00:00:00 2001 From: Danijel Martinek Date: Mon, 18 May 2026 20:58:23 +0200 Subject: [PATCH] chore(work): finish 04-retention-purge-job --- docs/work/_system/_state.json | 11 +++-------- .../04-retention-purge-job/_story.md | 6 +++--- .../_epic.md | 4 ++-- 3 files changed, 8 insertions(+), 13 deletions(-) diff --git a/docs/work/_system/_state.json b/docs/work/_system/_state.json index fe0f42d..a40375e 100644 --- a/docs/work/_system/_state.json +++ b/docs/work/_system/_state.json @@ -1,5 +1,5 @@ { - "updated_at": "2026-05-18T18:46:05.646Z", + "updated_at": "2026-05-18T18:58:24.087Z", "epics": { "binder-wrap-helper": { "status": "done", @@ -178,10 +178,10 @@ "blocks": [] }, "04-retention-purge-job": { - "status": "todo", + "status": "done", "title": "Background retention purge job in core-shared", "ac_total": 1, - "ac_completed": 0, + "ac_completed": 1, "depends_on": [ "01-pii-retention-type-primitives" ], @@ -437,11 +437,6 @@ } }, "ready": [ - { - "epic": "compliance-manifests-pii-retention-subprocessors", - "story": "04-retention-purge-job", - "title": "Background retention purge job in core-shared" - }, { "epic": "compliance-manifests-pii-retention-subprocessors", "story": "05-backfill-template-collections", diff --git a/docs/work/epics/compliance-manifests-pii-retention-subprocessors/04-retention-purge-job/_story.md b/docs/work/epics/compliance-manifests-pii-retention-subprocessors/04-retention-purge-job/_story.md index 6768a94..5527f68 100644 --- a/docs/work/epics/compliance-manifests-pii-retention-subprocessors/04-retention-purge-job/_story.md +++ b/docs/work/epics/compliance-manifests-pii-retention-subprocessors/04-retention-purge-job/_story.md @@ -3,12 +3,12 @@ id: 04-retention-purge-job epic: compliance-manifests-pii-retention-subprocessors title: Background retention purge job in core-shared type: technical-story -status: todo +status: done feature: core-shared depends-on: [01-pii-retention-type-primitives] blocks: [] created: 2026-05-18T17:52:09Z -updated: 2026-05-18T18:06:15.725Z +updated: 2026-05-18T18:58:23.920Z --- ## Goal @@ -41,4 +41,4 @@ Retention without automated purge is a compliance statement with no enforcement. ## Tasks -- [ ] Add `retention-purge.job.ts` + unit tests to `packages/core-shared/src/payload/retention-purge/` — walks `custom.retention.purgeSchedule` per collection, registers scheduled jobs via `IJobQueue`, executes pseudonymize or hard-delete per `postDeletion.action`, emits optional audit entry per row, unit tests cover all branches including graceful auditLog skip — all gates pass on this commit. +- [x] Add `retention-purge.job.ts` + unit tests to `packages/core-shared/src/payload/retention-purge/` — walks `custom.retention.purgeSchedule` per collection, registers scheduled jobs via `IJobQueue`, executes pseudonymize or hard-delete per `postDeletion.action`, emits optional audit entry per row, unit tests cover all branches including graceful auditLog skip — all gates pass on this commit. diff --git a/docs/work/epics/compliance-manifests-pii-retention-subprocessors/_epic.md b/docs/work/epics/compliance-manifests-pii-retention-subprocessors/_epic.md index 04af235..d6da48e 100644 --- a/docs/work/epics/compliance-manifests-pii-retention-subprocessors/_epic.md +++ b/docs/work/epics/compliance-manifests-pii-retention-subprocessors/_epic.md @@ -7,7 +7,7 @@ status: in-progress features: [core-shared, core-eslint, auth, blog, media, marketing-pages, navigation] created: 2026-05-18T17:52:09Z -updated: 2026-05-18T18:46:05.473Z +updated: 2026-05-18T18:58:23.920Z --- ## Goal @@ -19,7 +19,7 @@ Ship the declarative compliance manifests + generators so downstream consumers g - [x] [01 — PII and retention type primitives in core-shared](01-pii-retention-type-primitives/_story.md) - [x] [02 — ESLint rule pii-declaration-must-be-complete](02-eslint-rule-pii-declaration-complete/_story.md) - [x] [03 — ADR-022 amendment and evaluate-library skill update](03-adr-022-amendment-and-evaluate-library-skill/_story.md) -- [ ] [04 — Background retention purge job in core-shared](04-retention-purge-job/_story.md) +- [x] [04 — Background retention purge job in core-shared](04-retention-purge-job/_story.md) - [ ] [05 — Backfill existing template collections](05-backfill-template-collections/_story.md) - [ ] [06 — Compliance generator scripts](06-compliance-generator-scripts/_story.md) - [ ] [07 — Pre-commit hook and CI integration](07-pre-commit-and-ci-integration/_story.md)