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
Normative spec: 04 — Adoption baseline
Recorded owner decision: #13
Full production-like migration/reconciliation owner: #60
Scope
Adopt the existing course-management platform as code, not as a behavioral reimplementation. Begin from a clean checkout of exact source commit 98a235283904b4ef9ad29e196298540756cf1bcc and use the literal cp command to copy the tracked maintained source into this repository. Integrate only enough project settings/routing/dependencies for the unchanged copied code and characterization suite to run in the new scaffold.
Record the source repository and exact commit before copying.
Produce an allowlisted inventory of tracked source to copy, including Django apps, original migrations, tests, fixtures, templates/static assets, management commands, compatibility API, cadmin, and app-label metadata.
Use literal cp from that clean checkout; do not manually read and recreate files or behavior.
Exclude only documented local databases, secrets, virtual environments, caches/build/deploy outputs, unrelated notebooks, and temporary/untracked files.
Record a copied-file manifest with source-relative destination, size, and checksum so omissions and later upstream comparison are mechanical.
Preserve Django app labels, original migration files, and migration-state identity.
Reconcile dependency/settings/URL integration mechanically and minimally, documenting every target-owned or modified-file integration patch as a separately reviewable per-file ledger entry.
First make the unchanged copied characterization suite pass. The baseline expected approximately 760 Django test methods plus 48 end-to-end methods; record actual discovered and passing/skip/xfail counts.
Copy and verify the complete original migration chain before any later structural change.
Retain the original migrations in this adoption baseline. The owner permits later Django-supported squashing/collapse but does not require it now.
If a future change proposes a squash, replacement, or removal, it must first prove original-chain and replacement fresh-install parity plus upgrade/import compatibility on a production-like source snapshot. Preserve schema/state/data operations, dependencies, permissions/content types, app labels, stable keys, and behavior. Originals remain until that evidence passes.
When no production-like snapshot is available, the required safe result is exactly what this baseline does: keep every original migration and make no squash/removal claim.
Do not hand-rewrite Django models or business logic as part of any later migration collapse.
Do not opportunistically refactor scoring, submissions, peer review, leaderboards, certificates, calendars, API serializers, or cadmin behavior.
Do not silently omit failing, inconvenient, deprecated-looking, or poorly documented business behavior. A known failure must remain visible as characterized behavior or an explicitly approved exception.
Do not copy secrets, local data, deployment state, or untracked source-worktree changes.
Acceptance criteria
A clean source checkout is pinned and verified at 98a235283904b4ef9ad29e196298540756cf1bcc before any copy.
Implementation evidence shows the literal cp command copied the allowlisted source; the platform was not manually reconstructed from reading source files.
All tracked maintained Django apps, original migrations, tests/fixtures, templates/static, management commands, compatibility APIs, cadmin behavior, and app labels are present unless an explicit reviewed exception names the exact path and behavior.
A versioned provenance record contains source repository, commit, copy command/allowlist, and per-file manifest/checksums.
Integration patches are separately reviewable and limited to dependency, settings, namespace, routing, filesystem, and test-environment compatibility; every modified copied file and target-owned compatibility shim has an exact per-file ledger entry and rationale, with no business logic silently changed.
The unchanged copied characterization suite passes before Course→Cohort or other product/model work begins, with actual Django/E2E collected/pass/skip/xfail counts recorded.
Every current course HTML route, compatibility API route, management command, and cadmin route is inventoried and smoke-covered from the copied code.
The complete original migration chain is copied, retains its app labels/dependencies/state/data operations, and applies successfully from a fresh database with no migration drift.
No squash/replacement/removal is proposed by this baseline. Every original migration remains because no production-like snapshot was supplied; this is the required safe fallback and no snapshot-parity claim is made.
A documented/tested gate forbids any future squash/replacement/removal unless original-versus-replacement fresh install and production-like snapshot upgrade/import parity first pass with no unexplained schema/state/data/key/behavior differences. Originals must remain until that evidence passes.
No Course→Cohort/model refactor or manual business-logic rewrite appears in this issue's diff.
No source secret, local database, cache/build output, deployment state, or untracked local change is copied.
Test scenarios
Copy/provenance
Verify the source checkout is clean and at the pinned SHA; compare Git's tracked file list against the allowlist, destination manifest, and checksums.
Delete the adopted destination in an isolated test checkout and repeat the documented literal cp process; the resulting copied-file manifest is identical before integration patches.
Detect an intentionally omitted tracked test/template/migration/command/API/cadmin file and fail the provenance check.
Compare every modified copied file and every target-owned compatibility shim with the integration-patch ledger; a missing exact path or rationale fails this issue.
Django and migrations
Run the copied Django suite unchanged before structural work and record discovered/passed/skipped/xfail tests, including all adopted apps.
Create independent fresh databases through the complete unchanged original migration graph; verify expected app labels, numbered migrations, dependencies, schema state, and no migration drift.
Assert the adoption tree retains every copied original migration and contains no squash/replacement/removal.
Assert the migration safety gate rejects/remains unsatisfied for squash/removal when production-like snapshot parity evidence is absent.
If a later issue proposes a squash/removal, require both fresh-install equivalence and production-like snapshot upgrade/import reconciliation before originals may be removed. That conditional test is not invoked by this no-squash baseline.
Run all 48 copied E2E methods (or the actual discovered count) against the integrated copied application and record pass/skip/xfail/failure disposition.
Navigate representative public discovery, registration/login, dashboard/calendar, homework, project/peer review, leaderboard, certificate, API-backed, and cadmin workflows at desktop and mobile widths.
Capture screenshots for representative learner and cadmin pages and verify they render the copied behavior, not 404/debug/error pages.
Behavior inventory
Compare Django URL resolver output and API schemas with the source commit.
Run copied scoring, peer-assignment, certificate, communication/outbox, and management-command tests without altering expected values merely to make them pass.
For every explicit exception, demonstrate the source behavior, rationale, downstream replacement issue, and owner approval.
Parent epic: #5
Normative spec: 04 — Adoption baseline
Recorded owner decision: #13
Full production-like migration/reconciliation owner: #60
Scope
Adopt the existing course-management platform as code, not as a behavioral reimplementation. Begin from a clean checkout of exact source commit
98a235283904b4ef9ad29e196298540756cf1bccand use the literalcpcommand to copy the tracked maintained source into this repository. Integrate only enough project settings/routing/dependencies for the unchanged copied code and characterization suite to run in the new scaffold.cadmin, and app-label metadata.cpfrom that clean checkout; do not manually read and recreate files or behavior.Non-goals
cadminbehavior.Acceptance criteria
98a235283904b4ef9ad29e196298540756cf1bccbefore any copy.cpcommand copied the allowlisted source; the platform was not manually reconstructed from reading source files.cadminbehavior, and app labels are present unless an explicit reviewed exception names the exact path and behavior.cadminroute is inventoried and smoke-covered from the copied code.Test scenarios
Copy/provenance
cpprocess; the resulting copied-file manifest is identical before integration patches.Django and migrations
Playwright
cadminworkflows at desktop and mobile widths.cadminpages and verify they render the copied behavior, not 404/debug/error pages.Behavior inventory
Dependencies