Skip to content

feat: Migration Evaluation Platform (MEP) — Complete Build (Phases 0–8)#7

Open
amar-python wants to merge 11 commits into
mainfrom
feature/schema-validation
Open

feat: Migration Evaluation Platform (MEP) — Complete Build (Phases 0–8)#7
amar-python wants to merge 11 commits into
mainfrom
feature/schema-validation

Conversation

@amar-python

@amar-python amar-python commented Jul 15, 2026

Copy link
Copy Markdown
Owner

Migration Evaluation Platform (MEP) — Complete Build

This PR contains the entire MEP application (Phases 0–8), rebased cleanly on main.

⚠️ CI Fix Required (GitHub App Limitation)

The CI workflows are failing because the Phase 0 restructure moved the original engine to backend/migration/, but the workflow files still reference old root-level paths (tests/, build/, evals/).

The fix is ready — corrected workflow files are at:

  • docs/ci/quality-gate.yml → copy to .github/workflows/quality-gate.yml
  • docs/ci/python-validator-tests.yml → copy to .github/workflows/python-validator-tests.yml

The GitHub App lacks workflows permission, so these must be applied via the GitHub web UI (edit each file in-place) or pushed from your local machine. All non-workflow path fixes (Makefile, pytest.ini, scripts) are already included in this PR.


Phase 0 — Foundation

  • Repository restructured: existing engine moved to backend/migration/
  • FastAPI backend skeleton with health endpoint
  • React + TypeScript + MUI frontend shell (Azure Portal theme)
  • Docker Compose (PostgreSQL 15 + FastAPI + React/Nginx)

Phase 1 — CSV Upload

  • MigrationRun and UploadedFile ORM models with status lifecycle
  • 7 REST endpoints for run CRUD and multi-file upload
  • CSV metadata auto-detection (row count, column count, headers)
  • New Migration page: 3-step wizard (Configure → Upload → Summary)

Phases 2 & 4 — Schema Discovery + Validation

  • Type inference: integer, decimal, date, boolean, text
  • Nullability, uniqueness, sample values per column
  • 5 validation checks: duplicate columns, empty headers, null values, duplicate rows, mixed types
  • Validation page: expandable per-file schema table + severity-tagged issues

Phases 5 & 6 — Migration Execution + Evaluation

  • Staging table creation with inferred PostgreSQL types
  • Bulk CSV loading via parameterized INSERT
  • Quality evaluation: row count match, null %, duplicate detection
  • Quality score (0–100) with PASS/FAIL verdict (threshold: 70)

Phases 7 & 8 — Reports + Dashboard

  • JSON and self-contained HTML report generation
  • Report download endpoint
  • Dashboard: stat cards, status breakdown, recent runs table
  • Reports page: generate + download
  • History page: chronological run log

Additional Deliverables

  • Administration page: DB connection test, platform config, security toggles, system info
  • Full documentation suite: Architecture.md, API.md, Database.md, DeveloperGuide.md, Deployment.md, UserGuide.md, TestingStrategy.md
  • ADRs: ADR-001 (Technology), ADR-002 (Repo Structure), ADR-003 (Upload Workflow)
  • 38 backend tests passing (pytest)
  • Frontend: 645 KB production build, zero placeholders, all 7 pages functional

- Restructured repo: existing engine preserved in backend/migration/
- FastAPI backend skeleton with health endpoint
- React + TypeScript frontend shell with Azure Portal UI
- Docker Compose stack (React + FastAPI + PostgreSQL)
- GitHub Actions CI/CD pipeline
- Documentation (Architecture, DeveloperGuide, API, ADRs)
…orkflows permission — move to .github/workflows/ci.yml via web UI)
- Database: MigrationRun and UploadedFile models (auto-created on startup)
- API: CRUD endpoints for migration runs + multi-file upload/list/delete
- Service: migration_service.py with CSV metadata parsing (row/column counts)
- Frontend: New Migration page with 3-step wizard (Configure → Upload → Summary)
  - Drag-and-drop zone with multi-file support
  - Upload progress bar
  - File list table with size, rows, columns, delete action
- Frontend: Migration Runs page with live data table
- Tests: 17 new API tests (19 total) using SQLite test DB
- All tests passing, frontend build successful
…aluation, reports, dashboard

Slice 1 — Schema Discovery + Validation (Phases 2 & 4):
  - Schema inference: integer, decimal, date, boolean, text detection
  - Nullability, uniqueness, sample values per column
  - Validation: duplicate columns, empty headers, null checks, duplicate rows, mixed types
  - POST /api/migrations/{id}/validate endpoint
  - Validation page with expandable per-file schema table + issues

Slice 2 — Migration + Evaluation (Phases 5 & 6):
  - Staging table creation with inferred PostgreSQL types
  - Bulk CSV loading via parameterized INSERT
  - Quality evaluation: row count match, null %, duplicate detection
  - Quality score (0-100) with PASS/FAIL verdict
  - POST /api/migrations/{id}/execute and /evaluate endpoints
  - Execute/Evaluate actions on Migration Runs page with result dialogs

Slice 3 — Reports + Dashboard (Phases 7 & 8):
  - JSON and HTML report generation with validation/evaluation data
  - Self-contained styled HTML reports
  - Report download endpoint
  - Dashboard with stat cards, status breakdown, recent runs table
  - GET /api/dashboard endpoint

Also:
  - Shared test conftest.py (fixes cross-test DB conflicts)
  - 38 backend tests passing (19 new)
  - Frontend builds clean (630 KB)
  - Updated API.md documentation
  - History page with full chronological run log
  - MigrationRuns page with execute/evaluate action buttons
…umentation suite

- Administration page: database connection test, platform config table,
  security/RBAC toggles (planned), system info panel
- docs/Database.md: full schema reference (migration_runs, uploaded_files,
  staging tables, ER diagram, Alembic migration path)
- docs/TestingStrategy.md: test pyramid, 38-test inventory, validation
  check catalogue, evaluation scoring, CI integration, future plans
- docs/UserGuide.md: end-to-end walkthrough of all 7 pages with tables
  and troubleshooting guide
- docs/Deployment.md: Docker Compose, standalone, production checklist,
  Azure Container Apps instructions, health checks
- docs/ADR/ADR-003-Upload-Workflow.md: 6-stage pipeline design, staging
  table rationale, quality score thresholds, alternatives considered
- CI pipeline: ci.yml ready at .github/workflows/ci.yml and docs/ci/
  (requires manual move via GitHub web UI due to App permission)
- Frontend rebuild: 645 KB bundle, all pages functional, no placeholders
@amar-python
amar-python force-pushed the feature/schema-validation branch from 990fee0 to 5e4980a Compare July 15, 2026 10:07
@amar-python amar-python changed the title feat: MEP Core Completion — Schema, Validation, Execution, Evaluation, Reports, Dashboard feat: Migration Evaluation Platform (MEP) — Complete Build (Phases 0–8) Jul 15, 2026
abacusai-agent and others added 5 commits July 15, 2026 10:19
… backend/migration/ restructure

The Phase 0 restructure moved the original engine into backend/migration/
but these files still referenced old root-level paths (tests/, build/, evals/).

Updated: Makefile, pytest.ini, scripts/health_check.py, scripts/lint.sh,
scripts/select_tests.py, backend/migration/tests/run_python_tests.ps1.

Note: .github/workflows/*.yml also need the same path updates but cannot
be pushed via the GitHub App (lacks workflows permission). The corrected
versions are saved at docs/ci/ for manual application.
GitHub App lacks workflows permission to push .github/workflows/ changes.
These corrected files update paths for the backend/migration/ restructure.
Copy them to .github/workflows/ via the GitHub web UI to fix CI.
Changes made as "The argument 'backend/migration/tests/run_python_tests.ps1' to the -File parameter does not exist."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants