Skip to content

Models are missing PII annotations, and ModerationAuditLog isn't retired #301

Open

Description

@feanil

The openedx-forum 0.6.0 upgrade in openedx-platform is blocked because the new ModerationAuditLog model has no PII annotation, and make pii_check in openedx-platform fails on it. We're holding forum back to 0.5.x in the platform until this is fixed.

This repo's own PII check doesn't pass. Running the make test-pii command against v0.6.0:

Found 19 total models.
19 were eligible for annotation, 6 were annotated.
Coverage is 31.6%

None of the 13 forum.* models are annotated here. Up to now the platform has been carrying their annotations in its .annotation_safe_list.yml, so each new forum model breaks the platform's requirements upgrade instead of breaking CI in this repo. The check is never run here because pii_check isn't in the ci.yml matrix, and the pii_check tox env also fails on its own because it calls make without allowlist_externals.

ModerationAuditLog isn't cleared on retirement. It stores the moderated post's body and an original_author FK, but retire_all_content in src/forum/backends/mysql/api.py only scrubs Comment and CommentThread. A retired learner's post text stays in the audit log. This needs to be fixed before the model can be annotated with pii_retirement: local_api.

What needs to happen:

  • Add PII annotations to the docstrings of all the models in src/forum/backends/mysql/models.py.
  • Retire ModerationAuditLog rows in retire_all_content, either by scrubbing body or deleting them.
  • Fix the pii_check tox env and add it to the CI matrix.
  • Cut a release, then openedx-platform can drop its forum.* safe-list entries and unpin forum.

Activity

  1. added a commit that references this issue on Oct 28, 2026
  2. feanil commented on Oct 28, 2026

    @feanil
    ContributorAuthor

    @openedx/wg-maintainers-forums can one of you look and this and fix it?

  3. added a commit that references this issue on Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions