Problem
Consent is validated only when a profile is first created. After that, there is no supported way to revoke consent, record a superseding policy version, distinguish active from historical consent, or block processing after withdrawal. Deletion exists, but deletion alone is not an auditable consent lifecycle and a later request with new metadata can recreate the profile.
For a system handling children's learning data, every processing path should enforce an explicit current consent state.
Proposed change
- Model consent as append-only events (
granted, renewed, revoked) with actor, method, policy version, effective time, and server receipt time.
- Add guardian-authorized endpoints to inspect consent status, renew it, and revoke it.
- On revocation, atomically block new attempts, diagnostics, recommendations, stories, reports, and AI calls before optionally starting deletion according to a documented policy.
- Define policy-version behavior: whether a version change requires renewal, the grace period if any, and the response returned while renewal is required.
- Keep the minimum audit evidence necessary after deletion only if legally justified and documented; otherwise purge it with the student data.
- Include consent history/status in portable exports and retention logic.
- Document that identity/authority verification belongs to the upstream guardian portal while ensuring this API cannot bypass the resulting state.
Acceptance criteria
- Revoked or renewal-required profiles cannot be processed by any student-data endpoint.
- Revocation is idempotent and cannot race with an attempt/diagnostic write to recreate active data.
- Consent history has immutable timestamps and policy versions, and is present in exports.
- Re-consent follows a documented flow and never mutates prior audit events.
- Tests cover grant, renew, revoke, repeated revoke, processing denial, deletion, export, and retention interactions.
PRIVACY.md and API docs describe the lifecycle and remaining legal/product decisions.
Relevant code
agent/profiler.py (consent validation/profile creation)
agent/privacy.py
api/routes.py
PRIVACY.md
Problem
Consent is validated only when a profile is first created. After that, there is no supported way to revoke consent, record a superseding policy version, distinguish active from historical consent, or block processing after withdrawal. Deletion exists, but deletion alone is not an auditable consent lifecycle and a later request with new metadata can recreate the profile.
For a system handling children's learning data, every processing path should enforce an explicit current consent state.
Proposed change
granted,renewed,revoked) with actor, method, policy version, effective time, and server receipt time.Acceptance criteria
PRIVACY.mdand API docs describe the lifecycle and remaining legal/product decisions.Relevant code
agent/profiler.py(consent validation/profile creation)agent/privacy.pyapi/routes.pyPRIVACY.md