Skip to content

Interview: implement deletion interview cpm#1747

Open
JGStyle wants to merge 3 commits into
mainfrom
feat/gdpr-data-deletion-interview
Open

Interview: implement deletion interview cpm#1747
JGStyle wants to merge 3 commits into
mainfrom
feat/gdpr-data-deletion-interview

Conversation

@JGStyle

@JGStyle JGStyle commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

✨ What is the change?

also fix a bug with the core deletion to make sure all course phases are reached (edge case where the course participation was not yet created, the core would not fan out to that service.)

📌 Reason for the change / Link to issue

as part of the bigger move to get gdpr deletion across prompt
https://github.com/orgs/prompt-edu/discussions/683

🧪 How to Test

As a user with data on the interview phase, request deletion
Approve the deletion as an admin from the privacy dashboard
Verify the users data has been deleted.
F.e. by looking at the removed interview slots, or by verifying the db records were deleted in the interview db

🖼️ Screenshots (if UI changes are included)

full deletion process in demo:

2026-07-14.at.21.07.56.mp4

✅ PR Checklist

  • Tested locally or on the dev environment
  • Code is clean, readable, and documented
  • Tests added or updated (if needed)
  • Screenshots attached for UI changes (if any)
  • Documentation updated (if relevant)

Summary by CodeRabbit

  • New Features
    • Added support for privacy-related deletion requests in the interview service.
    • Interview assignment records associated with specified course participation IDs can now be deleted.
    • The interview service now advertises and exposes its privacy deletion capability alongside data export.

@JGStyle JGStyle self-assigned this Jun 25, 2026
@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The interview service adds privacy deletion for interview assignments. Core privacy export and deletion preparation now resolve phase types from courses in which the student participates.

Changes

Privacy data handling

Layer / File(s) Summary
Assignment deletion query
servers/interview/db/query/privacy.sql, servers/interview/db/sqlc/privacy.sql.go
Adds a SQL and generated query method that delete interview_assignment rows matching supplied course participation UUIDs.
Privacy deletion endpoint wiring
servers/interview/main.go, servers/interview/privacy/main.go, servers/interview/privacy/service.go
Advertises privacy deletion, registers the deletion endpoint, and deletes assignments for the subject’s course participation IDs.
Course-associated phase type resolution
servers/core/db/query/course_phase_type.sql, servers/core/db/sqlc/course_phase_type.sql.go, servers/core/coursePhaseType/service.go, servers/core/privacy/service/deletion_handler.go, servers/core/privacy/service/export_handler.go
Adds a student-course phase type lookup and uses it when preparing privacy deletion and export data.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant PrivacyDataDeletionHandler
  participant Queries
  participant interview_assignment
  PrivacyDataDeletionHandler->>Queries: Delete assignments for subject.CourseParticipationIDs
  Queries->>interview_assignment: Execute DELETE with UUID array
  interview_assignment-->>Queries: Return execution error
Loading

Possibly related PRs

Suggested labels: Component: Core

Suggested reviewers: rappm, mathildeshagl

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title is concise and matches the main change: adding interview deletion support.
Description check ✅ Passed The description covers the change, reason, testing steps, screenshots/demo, and checklist items required by the template.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/gdpr-data-deletion-interview

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@JGStyle JGStyle force-pushed the feat/gdpr-data-deletion-interview branch from 5c95b99 to 1d1c073 Compare July 11, 2026 17:47
@JGStyle

JGStyle commented Jul 11, 2026

Copy link
Copy Markdown
Contributor Author

rebase on main

@JGStyle JGStyle marked this pull request as ready for review July 12, 2026 07:08
@JGStyle JGStyle requested a review from a team July 12, 2026 07:08

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@servers/interview/privacy/main.go`:
- Line 14: Update InitPrivacyModule to register the privacy deletion endpoint on
the coursePhaseApi route group instead of the unscoped api group, ensuring
RegisterPrivacyDataDeletionEndpoint is mounted beneath
/api/course_phase/:coursePhaseID and uses the SDK-authenticated route context.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b65163eb-8d50-4352-b62e-b4e45707e269

📥 Commits

Reviewing files that changed from the base of the PR and between 9178d5f and 1d1c073.

📒 Files selected for processing (5)
  • servers/interview/db/query/privacy.sql
  • servers/interview/db/sqlc/privacy.sql.go
  • servers/interview/main.go
  • servers/interview/privacy/main.go
  • servers/interview/privacy/service.go

Comment thread servers/interview/privacy/main.go

@mathildeshagl mathildeshagl left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as for Certificate phase: looks good, just I think it would make sense to add E2E tests here as you go already, so we do not have to add them in a follow-up later on. @JGStyle

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

Labels

Component: Interview schau mi o Translation: Ready to review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants