You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Every persisted Course has at least one Cohort. A course with no scheduled offering uses one synthetic, open-ended self_paced cohort rather than a fabricated schedule.
C5.1a already defines this model contract. The course parser currently creates an implicit self-paced cohort for source repositories without a cohorts/ directory, and the curriculum service can create one lazily. The remaining gap is guaranteeing the invariant for pre-existing rows and courses created through Studio or another package-owned path.
Scope
Backfill existing Course rows with no cohorts.
Apply the same guarantee to Studio and package-owned course creation paths.
Preserve the parser/import behavior for cohortless source repositories and prove re-import remains idempotent.
Keep the generated cohort explicitly self-paced: stable self-paced slug, mode=self_paced, and no start or end date. Do not invent registration or event dates.
Acceptance criteria
An additive data migration creates one self-paced cohort for every existing course with zero cohorts. Courses that already have one or more cohorts remain unchanged, and the migration does not alter enrollment, progress, source provenance, or dated cohort rows.
Creating a course through Studio or another package-owned creation endpoint cannot leave it without a cohort. If no cohort is supplied, the course receives the synthetic self-paced cohort in the same transaction.
The curriculum importer persists the implicit self-paced cohort for a source course with no cohorts/ directory; re-import creates no duplicate and keeps the cohort stable.
Package operator flows cannot remove a course's last cohort and leave a cohortless course; they either reject that removal or create the fallback atomically.
Generated self-paced cohorts are represented without schedule dates or scheduled-offering registration/event details in course and learner surfaces.
Tests cover the migration with both cohortless and already-cohorted courses, importer re-import, Studio/API creation, and last-cohort removal.
Package quality gates pass, and both consuming sites run their own affected checks against the package change, with the three results reported separately.
Related work
Phase 5 model contract: docs/plan/phase-5.md, C5.1a.
Goal
Every persisted
Coursehas at least oneCohort. A course with no scheduled offering uses one synthetic, open-endedself_pacedcohort rather than a fabricated schedule.C5.1a already defines this model contract. The course parser currently creates an implicit
self-pacedcohort for source repositories without acohorts/directory, and the curriculum service can create one lazily. The remaining gap is guaranteeing the invariant for pre-existing rows and courses created through Studio or another package-owned path.Scope
Courserows with no cohorts.self-pacedslug,mode=self_paced, and no start or end date. Do not invent registration or event dates.Acceptance criteria
cohorts/directory; re-import creates no duplicate and keeps the cohort stable.Related work
docs/plan/phase-5.md, C5.1a.