fix(core-dsr): flip processingRestrictedAt in soft-delete for self role

PayloadDataDelete.deleteSubjectData('soft') was NULLing PII fields and
emitting RESTRICT audit entries, but never setting processingRestrictedAt
on self-kind rows — violating GDPR Art. 17 restriction semantics.

softRedactOwnerRows now accepts optional extraData; processOwnerRows
passes { processingRestrictedAt: new Date().toISOString() } when
kind === 'self' and mode === 'soft'. Owner-kind rows are intentionally
excluded (restriction flag belongs on the subject record, not owned rows).

Added two dedicated tests: one asserting the field is present for self,
one asserting it is absent for owner.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-19 20:12:41 +00:00
parent 6606b59d1e
commit cbea635fac
3 changed files with 86 additions and 18 deletions

View File

@@ -1,16 +1,16 @@
{
"generatedAt": "2026-05-19T19:59:56.279Z",
"commit": "8068d1b",
"generatedAt": "2026-05-19T20:12:30.651Z",
"commit": "6606b59",
"repo": {
"statements": 97.04,
"branches": 92.09,
"statements": 97.08,
"branches": 92.03,
"functions": 96.87,
"lines": 97.04,
"lines": 97.08,
"counts": {
"lf": 5107,
"lh": 4956,
"brf": 1012,
"brh": 932,
"lf": 5172,
"lh": 5021,
"brf": 1016,
"brh": 935,
"fnf": 319,
"fnh": 309
}
@@ -74,14 +74,14 @@
},
"@repo/core-dsr": {
"statements": 100,
"branches": 92,
"branches": 91.35,
"functions": 96.88,
"lines": 100,
"counts": {
"lf": 475,
"lh": 475,
"brf": 100,
"brh": 92,
"lf": 540,
"lh": 540,
"brf": 104,
"brh": 95,
"fnf": 32,
"fnh": 31
}