Files
agentic-dev/docs/work/epics/dsr-consent-and-cookie-banner/02-audit-enum-amendment/_story.md

2.3 KiB

id, epic, title, type, status, feature, depends-on, blocks, created, updated
id epic title type status feature depends-on blocks created updated
02-audit-enum-amendment dsr-consent-and-cookie-banner Audit action enum amendment (ADR-018) technical-story done core-shared
01-subject-linkage-types
03-core-consent-foundation
06-core-dsr
2026-05-19T12:00:00Z 2026-05-19T10:29:21.283Z

Goal

Extend the audit action enum with four new action types needed by consent and DSR, and amend ADR-018 to document the addition.

Why

core-consent's IConsent.grant / IConsent.withdraw emit CONSENT_GRANT / CONSENT_WITHDRAW for Art. 7 legal proof. core-dsr's IProcessingRestriction emits RESTRICT / UNRESTRICT for Art. 18. Both optional cores must emit via core-audit's existing channel; the action types must exist in core-shared's enum before either optional core can be implemented.

Done when

  • The audit action enum in core-shared/audit/ gains CONSENT_GRANT, CONSENT_WITHDRAW, RESTRICT, UNRESTRICT.
  • core-audit's IAuditLog.record accepts the new action types without type errors.
  • docs/guides/audit-and-compliance.md is updated to list the new action types.
  • docs/decisions/ADR-018.md gains an ## Amendments section recording the date and the reason (consent + restriction events added for Epic B).
  • pnpm typecheck && pnpm lint && pnpm test && pnpm conformance && pnpm fallow:audit && pnpm coverage:diff all pass.

In scope

  • Audit action enum extension (four new values) in core-shared/audit/.
  • core-audit type update so IAuditLog.record is compatible with the new values (no new interface methods).
  • docs/guides/audit-and-compliance.md update — "Six action types" wording amended to reflect the new count.
  • ADR-018 amendment section.

Out of scope

  • New audit emission call sites (Stories 04 and 06 — they live in the optional-core implementations).
  • eraseSubject flow changes — existing post-DSR-delete pseudonymization is unchanged.

Tasks

  • Add CONSENT_GRANT, CONSENT_WITHDRAW, RESTRICT, UNRESTRICT to the audit action enum in packages/core-shared/src/audit/ + update core-audit's IAuditLog type to accept the new values + update docs/guides/audit-and-compliance.md with the new action types + add ## Amendments section to docs/decisions/ADR-018.md recording the date and reason; all gates pass.