Skip to content

Preserve legacy course HTML/API compatibility and rehearse full data migration #60

Description

@alexeygrigorev

Parent epics: #5, #10

Normative specs: 04 — APIs, URL consolidation, high-risk checks, 09 — Data migration controls
Decision dependency: #16

Scope

Mount copied courses.datatalks.club HTML/data/authenticated API paths as compatibility adapters in unified Django; preserve schemas/status/auth/calendar/certificate/numeric-ID semantics; introduce canonical new public/learner/admin APIs; inventory clients; build repeatable dry-run/import/delta tools and reconciliation for users, social links, campaigns/snapshots, enrollments, curriculum, submissions/reviews/votes/scores/statistics/complaints/certificates/Wrapped/outbox history; and produce the explicit final redirect path map without activating it.

Non-goals

No redirecting authenticated APIs until tested clients migrate, no blanket/homepage redirect, no outbound email during import, and no silent correction of discrepancies.

Acceptance criteria

  • All current course HTML/API routes and schemas pass compatibility contracts or have approved explicit disposition.
  • API consumers are named with owner/auth/migration status per Decision: Inventory course API consumers before legacy-host redirects #16.
  • Imports are idempotent/dry-run/snapshot-pinned and report counts, stable-ID maps, duplicates/missing refs/transforms/checksums/rejected rows.
  • Production-like full rehearsal reconciles course/cohort mapping, users, curriculum, submissions/reviews, recomputed scores/statistics, certificates, calendars, and email history with no unexplained differences.
  • Final explicit path map preserves suffix/query and distinguishes HTML from unsafe API redirect cases; unknown returns 404.
  • Old/new write freeze/delta/outbox drain and rollback procedure is tested.

Test scenarios

  1. Snapshot every compatibility response/schema/auth outcome and compare source versus unified app.
  2. Repeat dry run/import/delta; inject duplicates/missing relations/ambiguous mappings/stale campaign pointers and verify deterministic report/no email.
  3. Recompute representative complex/archived cohort results and compare totals/certificates.
  4. Test generated redirect map for one-hop targets/query/case/Unicode/unknown/API method/auth.

Playwright

Run copied full course E2E against legacy-host routing and canonical routing; verify browser URL transitions, account/dashboard/homework/project/leaderboard/certificate; capture parity screenshots.

Dependencies

Depends on #15, #16, #30, #34#35, and #51#59. Redirect infrastructure is a later issue under #9.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P0Must-have or release-blockingcoursesArea: coursesdata-migrationArea: data-migrationintegrationArea: integrationseoArea: seo

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions