Skip to content

Implement consent renewal, revocation, and processing-state enforcement #23

Description

@llinsss

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardThird CampaignCampaign: Third CampaignapiAPI surface changescomplianceLegal/privacy compliance (COPPA/FERPA)securitySecurity-sensitive work

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions