ADR: Programme Progress Remediation Semantics
Status: Draft
Context
Programme progress is currently updated when a submission is created. Correction Batches (remediation) can change scores/outcomes after the fact. We need consistent rules for when programme requirements/enrolments should update in response to remediation.
Decision
-
Monotonic met:
- If a requirement is
met, remediation may only keep itmetor upgrade missing metadata; it must not revert topending/failedunless an explicit “reopen” flag is passed.
- If a requirement is
-
Reopen on downgrade (opt-in):
- When a remediation lowers a submission’s outcome below the requirement, we only reopen the requirement if the batch is marked
reopenProgrammeProgress=true(future optional flag). Default is to keepmetstable to avoid surprise downgrades.
- When a remediation lowers a submission’s outcome below the requirement, we only reopen the requirement if the batch is marked
-
Upgrade on improvement:
- If remediation upgrades a submission so that a previously
pending/failedrequirement now meets the rule, we set it tomet, updatesubmission_id,attempt_count,completed_at, and re-evaluate enrolment completion.
- If remediation upgrades a submission so that a previously
-
Source of truth:
- Use
submission_score_versions.latest(viasubmissions.latest_score_version) when available; otherwise fall back to current submission fields. Programme updates should run after correction batch application.
- Use
-
Enrolment completion:
- On any requirement status change triggered by remediation, recompute pending mandatory requirements and mark enrolment
completed(and issue certificate) if none remain.
- On any requirement status change triggered by remediation, recompute pending mandatory requirements and mark enrolment
Consequences
- No surprise downgrades by default; reopen is explicit.
- Corrections that improve scores can complete requirements/enrolments retroactively.
- Programme listener must be invoked from correction batch application with access to updated score/outcome.
Alternatives Considered
- Automatic downgrade on any score reduction: rejected to avoid unexpected credential revocation.
- Ignore remediation entirely: rejected; would miss legitimate fixes.